aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/thelounge/webview-unsafe.js
diff options
context:
space:
mode:
authorLibravatar Brian Kendall <7917884+briankendall@users.noreply.github.com>2022-01-05 13:42:56 -0500
committerLibravatar GitHub <noreply@github.com>2022-01-05 19:42:56 +0100
commite8a97c037dd0140222c9dd29e63a346616f29f83 (patch)
treebeff398b31dc670aca573b2d390f0c0e48a6feb8 /recipes/thelounge/webview-unsafe.js
parentUpdate featured recipes (diff)
downloadferdium-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.js7
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
3function newPostMessage(options) {
4 window.ferdi.displayNotification(options.title, options);
5}
6
7ServiceWorker.prototype.postMessage = newPostMessage;