aboutsummaryrefslogtreecommitdiffstats
path: root/uncompressed/instagram/webview.js
diff options
context:
space:
mode:
Diffstat (limited to 'uncompressed/instagram/webview.js')
-rw-r--r--uncompressed/instagram/webview.js16
1 files changed, 12 insertions, 4 deletions
diff --git a/uncompressed/instagram/webview.js b/uncompressed/instagram/webview.js
index aede5a5..f4f7f94 100644
--- a/uncompressed/instagram/webview.js
+++ b/uncompressed/instagram/webview.js
@@ -1,7 +1,15 @@
1const path = require("path"); 1const path = require("path");
2 2
3module.exports = Franz => { 3module.exports = (Franz) => {
4 // Apply fixes suggested in 4 const getMessages = function getMessages() {
5 // https://github.com/getferdi/recipes/issues/1 5 const element = document.querySelector('a[href^="/direct/inbox"]');
6 Franz.injectCSS(path.join(__dirname, "service.css")); 6
7 if (element) {
8 Franz.setBadge(parseInt(element.innerText, 10));
9 }
10 };
11
12 Franz.loop(getMessages);
13
14 Franz.injectCSS(path.join(__dirname, 'service.css'));
7}; 15};