diff options
author | 2021-09-19 00:41:52 +0200 | |
---|---|---|
committer | 2021-09-19 00:57:47 +0200 | |
commit | c5d2a889d4cb44f995d74051f83628b505383093 (patch) | |
tree | b1bab2b6d7f99ab00b0ca9860079f71472ac79ae /recipes/tweetdeck/webview.js | |
parent | Fix images opening in browser instead of in Discord (#712) (diff) | |
download | ferdium-recipes-c5d2a889d4cb44f995d74051f83628b505383093.tar.gz ferdium-recipes-c5d2a889d4cb44f995d74051f83628b505383093.tar.zst ferdium-recipes-c5d2a889d4cb44f995d74051f83628b505383093.zip |
fix: privileged API access
Privileged browser APIs should be accessed from webview.js via the Ferdi
parameter to the exported function.
If any service is broken (e.g., screen sharing), then most likely we
have to fix recipe.js or screenshare.js
Diffstat (limited to 'recipes/tweetdeck/webview.js')
-rw-r--r-- | recipes/tweetdeck/webview.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/recipes/tweetdeck/webview.js b/recipes/tweetdeck/webview.js index b60415d..54b7997 100644 --- a/recipes/tweetdeck/webview.js +++ b/recipes/tweetdeck/webview.js | |||
@@ -1,9 +1,9 @@ | |||
1 | // Tweetdeck redirect fix | ||
2 | Ferdi.ipcRenderer.on('redirect-url', (event, url) => { | ||
3 | window.location.assign(url); | ||
4 | }); | ||
5 | |||
6 | module.exports = Ferdi => { | 1 | module.exports = Ferdi => { |
2 | // Tweetdeck redirect fix | ||
3 | Ferdi.ipcRenderer.on('redirect-url', (event, url) => { | ||
4 | window.location.assign(url); | ||
5 | }); | ||
6 | |||
7 | const getMessages = function getMessages() { | 7 | const getMessages = function getMessages() { |
8 | const elements = document.querySelectorAll('.msg-unread-count'); | 8 | const elements = document.querySelectorAll('.msg-unread-count'); |
9 | let count = 0; | 9 | let count = 0; |