diff options
author | 2022-01-05 13:42:56 -0500 | |
---|---|---|
committer | 2022-01-05 19:42:56 +0100 | |
commit | e8a97c037dd0140222c9dd29e63a346616f29f83 (patch) | |
tree | beff398b31dc670aca573b2d390f0c0e48a6feb8 /recipes/thelounge/webview-unsafe.js | |
parent | Update featured recipes (diff) | |
download | ferdium-recipes-e8a97c037dd0140222c9dd29e63a346616f29f83.tar.gz ferdium-recipes-e8a97c037dd0140222c9dd29e63a346616f29f83.tar.zst ferdium-recipes-e8a97c037dd0140222c9dd29e63a346616f29f83.zip |
Fix notifications, badge, and icon for The Lounge (#812)
Diffstat (limited to 'recipes/thelounge/webview-unsafe.js')
-rw-r--r-- | recipes/thelounge/webview-unsafe.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/recipes/thelounge/webview-unsafe.js b/recipes/thelounge/webview-unsafe.js new file mode 100644 index 0000000..3f1358a --- /dev/null +++ b/recipes/thelounge/webview-unsafe.js | |||
@@ -0,0 +1,7 @@ | |||
1 | // Monkey patch ServiceWorker.postMessage so that it will actually post a notification in Ferdi: | ||
2 | |||
3 | function newPostMessage(options) { | ||
4 | window.ferdi.displayNotification(options.title, options); | ||
5 | } | ||
6 | |||
7 | ServiceWorker.prototype.postMessage = newPostMessage; | ||