aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README.md1
-rw-r--r--all.json2
-rw-r--r--archives/instagram.tar.gzbin144191 -> 144370 bytes
-rw-r--r--icon.pngbin0 -> 9879 bytes
-rw-r--r--icon.svg29
-rw-r--r--uncompressed/instagram/README.md6
-rw-r--r--uncompressed/instagram/index.js9
-rw-r--r--uncompressed/instagram/package.json8
-rw-r--r--uncompressed/instagram/service.css10
-rw-r--r--uncompressed/instagram/webview.js16
10 files changed, 64 insertions, 17 deletions
diff --git a/README.md b/README.md
index 949d70d..e4c32fc 100644
--- a/README.md
+++ b/README.md
@@ -17,4 +17,3 @@ Each time you create a new service inside Ferdi, Ferdi will automatically instal
17 17
18## Creating and adding your own recipes 18## Creating and adding your own recipes
19Please refer to our documentation at https://github.com/getferdi/recipes/blob/master/docs/integration.md. 19Please refer to our documentation at https://github.com/getferdi/recipes/blob/master/docs/integration.md.
20
diff --git a/all.json b/all.json
index 313624a..d9c51cd 100644
--- a/all.json
+++ b/all.json
@@ -389,7 +389,7 @@
389 "featured": false, 389 "featured": false,
390 "id": "instagram", 390 "id": "instagram",
391 "name": "Instagram", 391 "name": "Instagram",
392 "version": "1.0.0", 392 "version": "2.0.0",
393 "icons": { 393 "icons": {
394 "png": "https://cdn.jsdelivr.net/gh/getferdi/recipes/uncompressed/instagram/icon.png", 394 "png": "https://cdn.jsdelivr.net/gh/getferdi/recipes/uncompressed/instagram/icon.png",
395 "svg": "https://cdn.jsdelivr.net/gh/getferdi/recipes/uncompressed/instagram/icon.svg" 395 "svg": "https://cdn.jsdelivr.net/gh/getferdi/recipes/uncompressed/instagram/icon.svg"
diff --git a/archives/instagram.tar.gz b/archives/instagram.tar.gz
index d86fd80..e9ac967 100644
--- a/archives/instagram.tar.gz
+++ b/archives/instagram.tar.gz
Binary files differ
diff --git a/icon.png b/icon.png
new file mode 100644
index 0000000..4b0ef94
--- /dev/null
+++ b/icon.png
Binary files differ
diff --git a/icon.svg b/icon.svg
new file mode 100644
index 0000000..6575ff6
--- /dev/null
+++ b/icon.svg
@@ -0,0 +1,29 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<svg width="80px" height="80px" viewBox="0 0 80 80" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3 <!-- Generator: Sketch 59.1 (86144) - https://sketch.com -->
4 <title>instagram</title>
5 <desc>Created with Sketch.</desc>
6 <defs>
7 <radialGradient cx="20.6715778%" cy="120.207827%" fx="20.6715778%" fy="120.207827%" r="151.403352%" id="radialGradient-1">
8 <stop stop-color="#EACC7B" offset="7.3%"></stop>
9 <stop stop-color="#ECAA59" offset="18.4%"></stop>
10 <stop stop-color="#EF802E" offset="30.7%"></stop>
11 <stop stop-color="#EF6D3A" offset="35.8%"></stop>
12 <stop stop-color="#F04B50" offset="46%"></stop>
13 <stop stop-color="#F03E58" offset="51.6%"></stop>
14 <stop stop-color="#DB359E" offset="68.9%"></stop>
15 <stop stop-color="#CE37A4" offset="72.4%"></stop>
16 <stop stop-color="#AC3CB4" offset="78.9%"></stop>
17 <stop stop-color="#7544CF" offset="87.7%"></stop>
18 <stop stop-color="#2B4FF2" offset="98%"></stop>
19 </radialGradient>
20 </defs>
21 <g id="instagram" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
22 <g id="icons8-instagram" fill-rule="nonzero">
23 <path d="M62.6086957,80 L17.3913043,80 C7.82608696,80 0,72.173913 0,62.6086957 L0,17.3913043 C0,7.82608696 7.82608696,0 17.3913043,0 L62.6086957,0 C72.173913,0 80,7.82608696 80,17.3913043 L80,62.6086957 C80,72.173913 72.173913,80 62.6086957,80 Z" id="Path" fill="url(#radialGradient-1)"></path>
24 <path d="M40,15.6521739 C48,15.6521739 48.8695652,15.6521739 52,15.826087 C54.9565217,16 56.5217391,16.5217391 57.5652174,16.8695652 C58.9565217,17.3913043 60,18.0869565 61.0434783,19.1304348 C62.0869565,20.173913 62.7826087,21.2173913 63.3043478,22.6086957 C63.6521739,23.6521739 64.173913,25.2173913 64.3478261,28.173913 C64.3478261,31.1304348 64.3478261,32 64.3478261,40 C64.3478261,48 64.3478261,48.8695652 64.173913,52 C64,54.9565217 63.4782609,56.5217391 63.1304348,57.5652174 C62.6086957,58.9565217 61.9130435,60 60.8695652,61.0434783 C59.826087,62.0869565 58.7826087,62.7826087 57.3913043,63.3043478 C56.3478261,63.6521739 54.7826087,64.173913 51.826087,64.3478261 C48.8695652,64.3478261 48,64.3478261 40,64.3478261 C32,64.3478261 31.1304348,64.3478261 28,64.173913 C25.0434783,64 23.4782609,63.4782609 22.4347826,63.1304348 C21.0434783,62.6086957 20,61.9130435 18.9565217,60.8695652 C17.9130435,59.826087 17.2173913,58.7826087 16.6956522,57.3913043 C16.3478261,56.3478261 15.826087,54.7826087 15.6521739,51.826087 C15.6521739,48.8695652 15.6521739,48 15.6521739,40 C15.6521739,32 15.6521739,31.1304348 15.826087,28 C16,25.0434783 16.5217391,23.4782609 16.8695652,22.4347826 C17.3913043,21.0434783 18.0869565,20 19.1304348,18.9565217 C20.173913,17.9130435 21.2173913,17.2173913 22.6086957,16.6956522 C23.6521739,16.3478261 25.2173913,15.826087 28.173913,15.6521739 C31.1304348,15.6521739 32,15.6521739 40,15.6521739 M40,10.4347826 C32,10.4347826 30.9565217,10.4347826 27.826087,10.6086957 C24.6956522,10.7826087 22.6086957,11.3043478 20.6956522,12 C18.7826087,12.6956522 17.0434783,13.7391304 15.4782609,15.4782609 C13.9130435,17.2173913 12.8695652,18.7826087 12,20.6956522 C11.3043478,22.6086957 10.7826087,24.6956522 10.6086957,27.826087 C10.4347826,30.9565217 10.4347826,32 10.4347826,40 C10.4347826,48 10.4347826,49.0434783 10.6086957,52.173913 C10.7826087,55.3043478 11.3043478,57.3913043 12,59.3043478 C12.6956522,61.2173913 13.7391304,62.9565217 15.4782609,64.5217391 C17.0434783,66.0869565 18.7826087,67.1304348 20.6956522,68 C22.6086957,68.6956522 24.6956522,69.2173913 27.826087,69.3913043 C30.9565217,69.5652174 32,69.5652174 40,69.5652174 C48,69.5652174 49.0434783,69.5652174 52.173913,69.3913043 C55.3043478,69.2173913 57.3913043,68.6956522 59.3043478,68 C61.2173913,67.3043478 62.9565217,66.2608696 64.5217391,64.5217391 C66.0869565,62.9565217 67.1304348,61.2173913 68,59.3043478 C68.6956522,57.3913043 69.2173913,55.3043478 69.3913043,52.173913 C69.5652174,49.0434783 69.5652174,48 69.5652174,40 C69.5652174,32 69.5652174,30.9565217 69.3913043,27.826087 C69.2173913,24.6956522 68.6956522,22.6086957 68,20.6956522 C67.3043478,18.7826087 66.2608696,17.0434783 64.5217391,15.4782609 C62.7826087,13.9130435 61.2173913,12.8695652 59.3043478,12 C57.3913043,11.3043478 55.3043478,10.7826087 52.173913,10.6086957 C49.0434783,10.4347826 48,10.4347826 40,10.4347826 L40,10.4347826 Z" id="Shape" fill="#FFFFFF"></path>
25 <path d="M40,24.3478261 C31.3043478,24.3478261 24.3478261,31.3043478 24.3478261,40 C24.3478261,48.6956522 31.3043478,55.6521739 40,55.6521739 C48.6956522,55.6521739 55.6521739,48.6956522 55.6521739,40 C55.6521739,31.3043478 48.6956522,24.3478261 40,24.3478261 Z M40,50.4347826 C34.2608696,50.4347826 29.5652174,45.7391304 29.5652174,40 C29.5652174,34.2608696 34.2608696,29.5652174 40,29.5652174 C45.7391304,29.5652174 50.4347826,34.2608696 50.4347826,40 C50.4347826,45.7391304 45.7391304,50.4347826 40,50.4347826 Z" id="Shape" fill="#FFFFFF"></path>
26 <circle id="Oval" fill="#FFFFFF" cx="55.6521739" cy="24.3478261" r="3.47826087"></circle>
27 </g>
28 </g>
29</svg> \ No newline at end of file
diff --git a/uncompressed/instagram/README.md b/uncompressed/instagram/README.md
index b8d10f8..0f54f9e 100644
--- a/uncompressed/instagram/README.md
+++ b/uncompressed/instagram/README.md
@@ -1,3 +1,5 @@
1# Franz Instagram recipe 1# Instagram for Ferdi
2This is the official Ferdi recipe for Instagram
2 3
3A Franz recipe for Instagram service. 4### How to create your own Ferdi recipes:
5* [Read the documentation](https://github.com/getferdi/recipes/blob/master/docs/integration.md) \ No newline at end of file
diff --git a/uncompressed/instagram/index.js b/uncompressed/instagram/index.js
index b64a3e4..12ff25a 100644
--- a/uncompressed/instagram/index.js
+++ b/uncompressed/instagram/index.js
@@ -1,7 +1,8 @@
1'use strict'
2
3module.exports = Franz => class Instagram extends Franz { 1module.exports = Franz => class Instagram extends Franz {
4 overrideUserAgent() { 2 overrideUserAgent() {
5 return 'Mozilla/5.0 (iPhone; CPU iPhone OS 9_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13B137 Safari/601.1' 3 return window.navigator.userAgent.replace(
4 /(Ferdi|Electron)\/\S+ \([^)]+\)/g,
5 ""
6 );
6 } 7 }
7} \ No newline at end of file 8};
diff --git a/uncompressed/instagram/package.json b/uncompressed/instagram/package.json
index 639afdb..d245ec7 100644
--- a/uncompressed/instagram/package.json
+++ b/uncompressed/instagram/package.json
@@ -1,15 +1,13 @@
1{ 1{
2 "id": "instagram", 2 "id": "instagram",
3 "name": "Instagram", 3 "name": "Instagram",
4 "version": "1.0.0", 4 "version": "2.0.0",
5 "description": "Instagram", 5 "description": "Instagram",
6 "main": "index.js", 6 "main": "index.js",
7 "author": "Amine Mouafik <amine@mouafik.fr>", 7 "author": "Amine Mouafik <amine@mouafik.fr>",
8 "license": "MIT", 8 "license": "MIT",
9 "repository": "https://github.com/getferdi/recipes",
10 "config": { 9 "config": {
11 "hasNotificationSound": false, 10 "serviceURL": "https://instagram.com/direct/inbox",
12 "hasIndirectMessages": true, 11 "hasNotificationSound": true
13 "serviceURL": "https://www.instagram.com/direct/inbox/"
14 } 12 }
15} 13}
diff --git a/uncompressed/instagram/service.css b/uncompressed/instagram/service.css
index 8b13789..2cd727c 100644
--- a/uncompressed/instagram/service.css
+++ b/uncompressed/instagram/service.css
@@ -1 +1,11 @@
1.oYYFH {
2 padding: 0 !important;
3}
1 4
5.MWDvN, .oYYFH > div {
6 max-width: 100% !important;
7}
8
9._lz6s {
10 border-bottom: 0 !important;
11} \ No newline at end of file
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};