Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added support for trillian #316

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions trillian/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Franz Trillian Plugin

This plugin adds [Trillian](http://trillian.im) integration to Franz.

The minimum requirement to run this plugin is Franz v4.0.0. To get the latest version visit [meetfranz.com](http://meetfranz.com).

## Installation
1. To install this plugin, download the plugin folder `trillian`.
2. Open the Franz Plugins folder on your machine:
* Mac: `~Library/Application Support/Franz/Plugins/`
* Windows: `%appdata%/Franz/Plugins`
* Linux: `~/.config/Franz/Plugins`
* _Alternatively: Go to your Franz settings page, scroll down to the bottom and you will see an option to "Open the Franz plugin directory"_
3. Copy the `trillian` folder into the plugins directory
4. Restart Franz

## Setup
1. Click on the menu button in the top right corner
2. Select **Trillian** from the menu
3. Enter a name and login in the new tab

## Participate
In case you like to improve this plugin feel free to just create a pull request.
Binary file added trillian/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 28 additions & 0 deletions trillian/icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions trillian/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// just pass through Franz
module.exports = Franz => Franz;
23 changes: 23 additions & 0 deletions trillian/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"name": "trillian",
"version": "1.0.0",
"description": "Trillian Web Client v4",
"main": "index.js",
"author": "KuchenKerze <[email protected]>",
"license": "MIT",
"config": {
"serviceURL": "https://www.trillian.im/web/4.0/",
"serviceName": "Trillian",
"message": "Chat with other Trillian users or those on Facebook, Google, AIM, ICQ, XMPP, Twitter, and more.",
"popup": [],
"hasNotificationSound": false,
"hasIndirectMessages": false,
"hasTeamID": false,
"customURL": false,
"hostedOnly": false,
"webviewOptions": {
"disablewebsecurity": ""
},
"openDevTools": false
}
}
16 changes: 16 additions & 0 deletions trillian/webview.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
const path = require('path');

module.exports = (Franz, options) => {
const getMessages = () => {
let count = 0;

$('div.unread').find('.count').each((i, obj) => {
count += parseInt(obj.innerText);
});

Franz.setBadge(count);
};

// check for new messages every second and update Franz badge
Franz.loop(getMessages);
};