aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/skype/webview.js
diff options
context:
space:
mode:
authorLibravatar Vijay Aravamudhan <vraravam@users.noreply.github.com>2022-05-23 05:55:44 -0500
committerLibravatar GitHub <noreply@github.com>2022-05-23 10:55:44 +0000
commit4983daff125009865f8482388c37f69de8a610f7 (patch)
tree4f58493028c4a2ba683da79c32676b45590cda9c /recipes/skype/webview.js
parentSupport for self-hosted github (diff)
downloadferdium-recipes-4983daff125009865f8482388c37f69de8a610f7.tar.gz
ferdium-recipes-4983daff125009865f8482388c37f69de8a610f7.tar.zst
ferdium-recipes-4983daff125009865f8482388c37f69de8a610f7.zip
Add new service-level option 'trapLinkUrls' (#30)
This option can be used to allow the user to choose how to handle links (whether to open in the default browser or within the Ferdium service itself) Removed incorrect 'if' condition for zoom and discord for clickHandler
Diffstat (limited to 'recipes/skype/webview.js')
-rw-r--r--recipes/skype/webview.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/recipes/skype/webview.js b/recipes/skype/webview.js
index 23e6919..b317d14 100644
--- a/recipes/skype/webview.js
+++ b/recipes/skype/webview.js
@@ -2,7 +2,7 @@ const _path = _interopRequireDefault(require('path'));
2 2
3function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 3function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
4 4
5module.exports = Ferdium => { 5module.exports = (Ferdium, settings) => {
6 const getMessages = () => { 6 const getMessages = () => {
7 let count = 0; 7 let count = 0;
8 const container = document.querySelector('[role="tablist"] > button > div'); 8 const container = document.querySelector('[role="tablist"] > button > div');
@@ -41,7 +41,12 @@ module.exports = Ferdium => {
41 if (url.includes('views/imgpsh_fullsize_anim')) { 41 if (url.includes('views/imgpsh_fullsize_anim')) {
42 event.preventDefault(); 42 event.preventDefault();
43 event.stopPropagation(); 43 event.stopPropagation();
44 Ferdium.openNewWindow(url); 44
45 if (settings.trapLinkClicks === true) {
46 window.location.href = url;
47 } else {
48 Ferdium.openNewWindow(url);
49 }
45 } 50 }
46 } 51 }
47 }, true); 52 }, true);