From f7e64e23536c2189fdbacaa21715c099a1f0cb38 Mon Sep 17 00:00:00 2001 From: David Rosca Date: Wed, 7 Feb 2018 10:33:13 +0100 Subject: [PATCH] Scripts: Install webchannel bridge in main world also on extension scheme --- src/lib/tools/scripts.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/tools/scripts.cpp b/src/lib/tools/scripts.cpp index b4d9042fd..529f037e8 100644 --- a/src/lib/tools/scripts.cpp +++ b/src/lib/tools/scripts.cpp @@ -25,7 +25,7 @@ QString Scripts::setupWebChannel(quint32 worldId) { QString source = QL1S("// ==UserScript==\n" - "// %1\n" + "%1\n" "// ==/UserScript==\n\n" "(function() {" "%2" @@ -72,9 +72,9 @@ QString Scripts::setupWebChannel(quint32 worldId) QString match; if (worldId == WebPage::SafeJsWorld) { - match = QSL("@exclude falkon:*"); + match = QSL("// @exclude falkon:*\n// @exclude extension:*"); } else { - match = QSL("@include falkon:*"); + match = QSL("// @include falkon:*\n// @include extension:*"); } return source.arg(match, QzTools::readAllFileContents(QSL(":/qtwebchannel/qwebchannel.js"))); }