aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/steamchat/webview.js
diff options
context:
space:
mode:
Diffstat (limited to 'recipes/steamchat/webview.js')
-rw-r--r--recipes/steamchat/webview.js10
1 files changed, 8 insertions, 2 deletions
diff --git a/recipes/steamchat/webview.js b/recipes/steamchat/webview.js
index 3773bad..4e8519b 100644
--- a/recipes/steamchat/webview.js
+++ b/recipes/steamchat/webview.js
@@ -1,4 +1,4 @@
1module.exports = Ferdium => { 1module.exports = (Ferdium, settings) => {
2 const getMessages = () => { 2 const getMessages = () => {
3 // get new msg count 3 // get new msg count
4 let count = 0; 4 let count = 0;
@@ -37,7 +37,13 @@ module.exports = Ferdium => {
37 if (link && link.getAttribute('target') === '_top') { 37 if (link && link.getAttribute('target') === '_top') {
38 event.preventDefault(); 38 event.preventDefault();
39 event.stopPropagation(); 39 event.stopPropagation();
40 Ferdium.openNewWindow(link.getAttribute('href')); 40 const url = link.getAttribute('href');
41
42 if (settings.trapLinkClicks === true) {
43 window.location.href = url;
44 } else {
45 Ferdium.openNewWindow(url);
46 }
41 } 47 }
42 }, true); 48 }, true);
43}; 49};