Fix userscript syntax for WhatsApp quirk

We need a space there so that QtWebEngine parses the header properly.
This commit is contained in:
Florian Bruhin 2020-01-31 22:20:57 +01:00
parent c5048720d4
commit ecb43dddc0
1 changed files with 2 additions and 2 deletions

View File

@ -1111,9 +1111,9 @@ class _WebEngineScripts(QObject):
script.setWorldId(QWebEngineScript.ApplicationWorld)
script.setInjectionPoint(QWebEngineScript.DocumentReady)
script.setSourceCode(textwrap.dedent(r"""
//==UserScript==
// ==UserScript==
// @include https://web.whatsapp.com/
//==/UserScript==
// ==/UserScript==
if (document.body.innerText.replace(/\n/g, ' ').search(
/whatsapp works with.*to use whatsapp.*update/i) !== -1) {
navigator.serviceWorker.getRegistration().then(function (r) {