mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 02:36:34 +01:00
Scripts: Install webchannel bridge in main world also on extension scheme
This commit is contained in:
parent
1ff43ec6d8
commit
f7e64e2353
@ -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")));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user