Permalink
Browse files

Added Instagram support

1 parent 0d05c82 commit 70bb4e1acc48f4f0f97ee8a704a68dd723f775ac @MarcJose MarcJose committed Sep 25, 2016
Showing with 662 additions and 0 deletions.
  1. +3 −0 instagram/css/franz.css
  2. BIN instagram/icon.png
  3. +612 −0 instagram/icon.svg
  4. +2 −0 instagram/index.js
  5. +23 −0 instagram/package.json
  6. +22 −0 instagram/webview.js
@@ -0,0 +1,3 @@
+footer {
+ display: none !important;
+}
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Oops, something went wrong.
View
@@ -0,0 +1,2 @@
+// just pass through Franz
+module.exports = Franz => Franz;
@@ -0,0 +1,23 @@
+{
+ "name": "Instagram",
+ "version": "1.0.0",
+ "description": "Instagram",
+ "main": "index.js",
+ "author": "Marc Jose <Hering2007@web.de>",
+ "license": "MIT",
+ "config": {
+ "serviceURL": "https://www.instagram.com/",
+ "serviceName": "Instagram",
+ "message": "Instagram is a simple way to capture and share the world’s moments.",
+ "popup": [],
+ "hasNotificationSound": false,
+ "hasIndirectMessages": false,
+ "hasTeamID": false,
+ "customURL": false,
+ "hostedOnly": false,
+ "webviewOptions": {
+ "disablewebsecurity": ""
+ },
+ "openDevTools": false
+ }
+}
View
@@ -0,0 +1,22 @@
+const path = require('path');
+
+module.exports = (Franz, options) => {
+ const getMessages = () => {
+ // get unread messages
+ const updates = document.getElementById('franz').getAttribute('data-unread');
+
+ // get conversations in 'My Inbox'
+ const inbox = document.getElementById('franz').getAttribute('data-inbox');
+
+ // set Franz badge
+ // updates => active unread count
+ // inbox => passive unread count
+ Franz.setBadge(updates, inbox);
+ };
+
+ // inject franz.css stylesheet
+ Franz.injectCSS(path.join(__dirname, 'css', 'franz.css'));
+
+ // check for new messages every second and update Franz badge
+ Franz.loop(getMessages);
+};

0 comments on commit 70bb4e1

Please sign in to comment.