diff options
author | portix <portix@gmx.net> | 2012-03-11 18:39:08 +0100 |
---|---|---|
committer | portix <portix@gmx.net> | 2012-03-11 18:39:08 +0100 |
commit | 68e21a64bad74cecff91d4933af85ffada4b79d1 (patch) | |
tree | f30e4f564600f81a3b9578e7dd6690de33554574 /src/adblock.c | |
parent | 90ac389ed134fc329c09ba8c508ef0de5d9dea1b (diff) | |
download | dwb-68e21a64bad74cecff91d4933af85ffada4b79d1.zip |
Execute the adblock element hider function as an anonymous function in subframes, fixes #123
Diffstat (limited to 'src/adblock.c')
-rw-r--r-- | src/adblock.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/adblock.c b/src/adblock.c index c39100f6..9eae2481 100644 --- a/src/adblock.c +++ b/src/adblock.c @@ -351,9 +351,9 @@ adblock_apply_element_hider(WebKitWebFrame *frame, GList *gl) { } } char *script = g_strdup_printf( - "var st=document.createElement('style');\ + "(function() {var st=document.createElement('style');\ document.head.appendChild(st);\ - document.styleSheets[document.styleSheets.length-1].insertRule('%s', 0);", + document.styleSheets[document.styleSheets.length-1].insertRule('%s', 0);})();", css_rule->str); dwb_execute_script(frame, script, false); g_free(script); |