Skip to content
This repository has been archived by the owner on May 10, 2018. It is now read-only.

Commit

Permalink
GreaseMonkey: Run scripts on DOMContentLoaded event capture
Browse files Browse the repository at this point in the history
Fixes second part of  #1457 (not working on settings, identities, ..
pages)
  • Loading branch information
nowrep committed Sep 16, 2014
1 parent 171267c commit f86d1b8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/GreaseMonkey/gm_manager.cpp
Expand Up @@ -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);
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/GreaseMonkey/gm_plugin.cpp
Expand Up @@ -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;
Expand Down

0 comments on commit f86d1b8

Please sign in to comment.