Fixed JS part for Edge.

This commit is contained in:
Revertron
2021-05-07 11:28:24 +02:00
parent 01e97ed7a0
commit 8c2e89da0b
3 changed files with 9 additions and 2 deletions
+7 -1
View File
@@ -183,7 +183,13 @@ function editDomain(domain, event) {
function onLoad() {
// Workaround for Arch Linux Webkit
// https://github.com/Boscop/web-view/issues/212#issuecomment-671055663
window.external={invoke:function(x){window.webkit.messageHandlers.external.postMessage(x);}};
if (typeof window.external == 'undefined' || typeof window.external.invoke == 'undefined') {
window.external = {
invoke: function(x) {
window.webkit.messageHandlers.external.postMessage(x);
}
};
}
external.invoke(JSON.stringify({cmd: 'loaded'}));
}