1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-19 18:26:34 +01:00

GreaseMonkey: Run scripts on DOMContentLoaded event capture

Fixes second part of  #1457 (not working on settings, identities, ..
pages)
This commit is contained in:
David Rosca 2014-09-16 17:18:13 +02:00
parent 171267cfb0
commit f86d1b8f2d
3 changed files with 4 additions and 2 deletions

View File

@ -7,6 +7,8 @@ Version 1.7.0
* completely rewritten bookmarks (including multi-level folders support)
* menus are not closed when opening links with middle mouse button
* support for shadow builds with Qt Creator
* GreaseMonkey: correctly load scripts in frames
* GreaseMonkey: fix rare issue that userscripts won't load on some sites
Version 1.6.6
* released 12 May 2014

View File

@ -220,7 +220,7 @@ void GM_Manager::frameLoadStart()
foreach (GM_Script* script, m_endScripts) {
if (script->match(urlString)) {
const QString jscript = QString(QSL("window.addEventListener(\"DOMContentLoaded\","
"function(e) { \n%1\n }, false);")).arg(m_bootstrap + script->script());
"function(e) { \n%1\n }, true);")).arg(m_bootstrap + script->script());
frame->evaluateJavaScript(jscript);
}
}

View File

@ -41,7 +41,7 @@ PluginSpec GM_Plugin::pluginSpec()
spec.name = "GreaseMonkey";
spec.info = "Userscripts for QupZilla";
spec.description = "Provides support for userscripts (www.userscripts.org)";
spec.version = "0.5.0";
spec.version = "0.5.1";
spec.author = "David Rosca <nowrep@gmail.com>";
spec.icon = QPixmap(":gm/data/icon.png");
spec.hasSettings = true;