diff options
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; | ||