mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 10:46:35 +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 Scripts::setupWebChannel(quint32 worldId)
|
||||||
{
|
{
|
||||||
QString source = QL1S("// ==UserScript==\n"
|
QString source = QL1S("// ==UserScript==\n"
|
||||||
"// %1\n"
|
"%1\n"
|
||||||
"// ==/UserScript==\n\n"
|
"// ==/UserScript==\n\n"
|
||||||
"(function() {"
|
"(function() {"
|
||||||
"%2"
|
"%2"
|
||||||
@ -72,9 +72,9 @@ QString Scripts::setupWebChannel(quint32 worldId)
|
|||||||
|
|
||||||
QString match;
|
QString match;
|
||||||
if (worldId == WebPage::SafeJsWorld) {
|
if (worldId == WebPage::SafeJsWorld) {
|
||||||
match = QSL("@exclude falkon:*");
|
match = QSL("// @exclude falkon:*\n// @exclude extension:*");
|
||||||
} else {
|
} else {
|
||||||
match = QSL("@include falkon:*");
|
match = QSL("// @include falkon:*\n// @include extension:*");
|
||||||
}
|
}
|
||||||
return source.arg(match, QzTools::readAllFileContents(QSL(":/qtwebchannel/qwebchannel.js")));
|
return source.arg(match, QzTools::readAllFileContents(QSL(":/qtwebchannel/qwebchannel.js")));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user