aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/steamchat
diff options
context:
space:
mode:
Diffstat (limited to 'recipes/steamchat')
-rw-r--r--recipes/steamchat/package.json2
-rw-r--r--recipes/steamchat/webview.js10
2 files changed, 9 insertions, 3 deletions
diff --git a/recipes/steamchat/package.json b/recipes/steamchat/package.json
index 28434b1..9489add 100644
--- a/recipes/steamchat/package.json
+++ b/recipes/steamchat/package.json
@@ -1,7 +1,7 @@
1{ 1{
2 "id": "steamchat", 2 "id": "steamchat",
3 "name": "SteamChat", 3 "name": "SteamChat",
4 "version": "1.4.1", 4 "version": "1.4.2",
5 "license": "MIT", 5 "license": "MIT",
6 "config": { 6 "config": {
7 "serviceURL": "https://steamcommunity.com/chat", 7 "serviceURL": "https://steamcommunity.com/chat",
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};