aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/skype
diff options
context:
space:
mode:
authorLibravatar Vijay Raghavan Aravamudhan <vraravam@users.noreply.github.com>2021-08-27 18:13:24 +0530
committerLibravatar GitHub <noreply@github.com>2021-08-27 18:13:24 +0530
commit155c4b832281348c16be1f4ef667e6e23dbf1bd8 (patch)
treed144e2de2e6c7fb2e334246e8a4aecdbeb08ef8d /recipes/skype
parentdocs: fixed template file for creating recipe. (diff)
downloadferdium-recipes-155c4b832281348c16be1f4ef667e6e23dbf1bd8.tar.gz
ferdium-recipes-155c4b832281348c16be1f4ef667e6e23dbf1bd8.tar.zst
ferdium-recipes-155c4b832281348c16be1f4ef667e6e23dbf1bd8.zip
chore: normalized all recipes to ensure compatibility with es6 (#639)
- Removed some calls to set badge with '0' all the time. - Removed all 'sourceMaps' since they are all outdated atm.
Diffstat (limited to 'recipes/skype')
-rw-r--r--recipes/skype/index.js7
-rw-r--r--recipes/skype/package.json2
-rw-r--r--recipes/skype/webview.js17
3 files changed, 14 insertions, 12 deletions
diff --git a/recipes/skype/index.js b/recipes/skype/index.js
index f122bf4..7ea3060 100644
--- a/recipes/skype/index.js
+++ b/recipes/skype/index.js
@@ -1,8 +1,5 @@
1module.exports = (Franz) => class Messenger extends Franz { 1module.exports = (Ferdi) => class Messenger extends Ferdi {
2 overrideUserAgent() { 2 overrideUserAgent() {
3 return window.navigator.userAgent.replace( 3 return window.navigator.userAgent.replace(/(Ferdi|Electron)\/\S+ \([^)]+\)/g, '').trim();
4 /(Ferdi|Electron)\/\S+ \([^)]+\)/g,
5 '',
6 );
7 } 4 }
8}; 5};
diff --git a/recipes/skype/package.json b/recipes/skype/package.json
index 7f401bf..57f4d87 100644
--- a/recipes/skype/package.json
+++ b/recipes/skype/package.json
@@ -1,7 +1,7 @@
1{ 1{
2 "id": "skype", 2 "id": "skype",
3 "name": "Skype", 3 "name": "Skype",
4 "version": "3.0.1", 4 "version": "3.1.0",
5 "license": "MIT", 5 "license": "MIT",
6 "config": { 6 "config": {
7 "serviceURL": "https://web.skype.com/", 7 "serviceURL": "https://web.skype.com/",
diff --git a/recipes/skype/webview.js b/recipes/skype/webview.js
index c20726c..9af7c2b 100644
--- a/recipes/skype/webview.js
+++ b/recipes/skype/webview.js
@@ -1,7 +1,10 @@
1const _path = _interopRequireDefault(require('path'));
2
3function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
4
1const { remote: { BrowserWindow } } = require('electron'); 5const { remote: { BrowserWindow } } = require('electron');
2const path = require('path');
3 6
4module.exports = (Franz, settings) => { 7module.exports = (Ferdi, settings) => {
5 const getMessages = function getMessages() { 8 const getMessages = function getMessages() {
6 let count = 0; 9 let count = 0;
7 const container = document.querySelector('[role="tablist"] > [title="Chats"] > div'); 10 const container = document.querySelector('[role="tablist"] > [title="Chats"] > div');
@@ -19,12 +22,14 @@ module.exports = (Franz, settings) => {
19 } 22 }
20 } 23 }
21 24
22 Franz.setBadge(count); 25 Ferdi.setBadge(count);
23 }; 26 };
24 27
25 Franz.injectCSS(path.join(__dirname, 'service.css')); 28 Ferdi.loop(getMessages);
26 Franz.injectJSUnsafe(path.join(__dirname, 'webview-unsafe.js')); 29
27 Franz.loop(getMessages); 30 Ferdi.injectCSS(_path.default.join(__dirname, 'service.css'));
31 Ferdi.injectJSUnsafe(_path.default.join(__dirname, 'webview-unsafe.js'));
32
28 document.addEventListener('click', event => { 33 document.addEventListener('click', event => {
29 const link = event.target.closest('a[href^="http"]'); 34 const link = event.target.closest('a[href^="http"]');
30 const button = event.target.closest('button[title^="http"]'); 35 const button = event.target.closest('button[title^="http"]');