aboutsummaryrefslogtreecommitdiffstats
path: root/uncompressed/skype
diff options
context:
space:
mode:
authorLibravatar Bennett <hello@vantezzen.io>2019-12-11 11:35:39 +0100
committerLibravatar Bennett <hello@vantezzen.io>2019-12-11 11:35:39 +0100
commit2491ea3c11de71391cd333cfc375576232d64cba (patch)
treecfc7b178be929d59ae75ae6ff419b3c11b3474a2 /uncompressed/skype
parentFix update error (diff)
downloadferdium-recipes-2491ea3c11de71391cd333cfc375576232d64cba.tar.gz
ferdium-recipes-2491ea3c11de71391cd333cfc375576232d64cba.tar.zst
ferdium-recipes-2491ea3c11de71391cd333cfc375576232d64cba.zip
Update packages
Diffstat (limited to 'uncompressed/skype')
-rw-r--r--uncompressed/skype/package.json4
-rw-r--r--uncompressed/skype/webview.js35
2 files changed, 36 insertions, 3 deletions
diff --git a/uncompressed/skype/package.json b/uncompressed/skype/package.json
index 4b52996..4ca6899 100644
--- a/uncompressed/skype/package.json
+++ b/uncompressed/skype/package.json
@@ -1,13 +1,13 @@
1{ 1{
2 "id": "skype", 2 "id": "skype",
3 "name": "Skype", 3 "name": "Skype",
4 "version": "1.1.1", 4 "version": "1.2.0",
5 "description": "Skype", 5 "description": "Skype",
6 "main": "index.js", 6 "main": "index.js",
7 "author": "Stefan Malzner <stefan@adlk.io>", 7 "author": "Stefan Malzner <stefan@adlk.io>",
8 "license": "MIT", 8 "license": "MIT",
9 "config": { 9 "config": {
10 "serviceURL": "https://preview.web.skype.com/", 10 "serviceURL": "https://web.skype.com/",
11 "hasNotificationSound": true 11 "hasNotificationSound": true
12 } 12 }
13} 13}
diff --git a/uncompressed/skype/webview.js b/uncompressed/skype/webview.js
index 798eccb..12ad2a8 100644
--- a/uncompressed/skype/webview.js
+++ b/uncompressed/skype/webview.js
@@ -1,6 +1,12 @@
1"use strict"; 1"use strict";
2 2
3module.exports = Franz => { 3var _electron = require("electron");
4
5const {
6 BrowserWindow
7} = _electron.remote;
8
9module.exports = (Franz, settings) => {
4 const getMessages = function getMessages() { 10 const getMessages = function getMessages() {
5 let count = 0; 11 let count = 0;
6 const container = document.querySelector('[role="tablist"] > [title="Chats"] > div'); 12 const container = document.querySelector('[role="tablist"] > [title="Chats"] > div');
@@ -22,4 +28,31 @@ module.exports = Franz => {
22 }; 28 };
23 29
24 Franz.loop(getMessages); 30 Franz.loop(getMessages);
31 document.addEventListener('click', event => {
32 const link = event.target.closest('a[href^="http"]');
33 const button = event.target.closest('button[title^="http"]');
34
35 if (link || button) {
36 const url = link ? link.getAttribute('href') : button.getAttribute('title');
37 event.preventDefault();
38 event.stopPropagation();
39
40 if (url.includes('views/imgpsh_fullsize_anim')) {
41 let win = new BrowserWindow({
42 width: 800,
43 height: window.innerHeight,
44 minWidth: 600,
45 webPreferences: {
46 partition: `persist:service-${settings.id}`
47 }
48 });
49 win.loadURL(url);
50 win.on('closed', () => {
51 win = null;
52 });
53 } else {
54 window.open(url);
55 }
56 }
57 }, true);
25}; \ No newline at end of file 58}; \ No newline at end of file