aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/slack/webview.js
diff options
context:
space:
mode:
Diffstat (limited to 'recipes/slack/webview.js')
-rw-r--r--recipes/slack/webview.js14
1 files changed, 0 insertions, 14 deletions
diff --git a/recipes/slack/webview.js b/recipes/slack/webview.js
index 652b586..b3722f0 100644
--- a/recipes/slack/webview.js
+++ b/recipes/slack/webview.js
@@ -75,18 +75,4 @@ module.exports = Ferdium => {
75 }, 4000); 75 }, 4000);
76 76
77 Ferdium.injectCSS(_path.default.join(__dirname, 'service.css')); 77 Ferdium.injectCSS(_path.default.join(__dirname, 'service.css'));
78
79 // TODO: See how this can be moved into the main ferdium app and sent as an ipc message for opening with a new window or same Ferdium recipe's webview based on user's preferences
80 document.addEventListener('click', event => {
81 const link = event.target.closest('a[href^="http"]');
82 const button = event.target.closest('button[title^="http"]');
83
84 if (link || button) {
85 const url = link ? link.getAttribute('href') : button.getAttribute('title');
86
87 event.preventDefault();
88 event.stopPropagation();
89 window.location.href = url;
90 }
91 }, true);
92}; 78};