Skip to content

Commit

Permalink
Do not run scripts in about:blank
Browse files Browse the repository at this point in the history
(Unless _specifically_ requested.)  Fixes #1298
  • Loading branch information
arantius committed Apr 20, 2011
1 parent 7f7848a commit 84d4a9e
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions content/script.js
Expand Up @@ -31,8 +31,15 @@ function Script(configNode) {

Script.prototype = {
matchesURL: function(url) {
function test(page) {
return convert2RegExp(page).test(url);
function test(glob) {
// Do not run in about:blank unless _specifically_ requested. See #1298
if (-1 !== url.indexOf('about:blank')
&& -1 == glob.indexOf('about:blank')
) {
return false;
}

return convert2RegExp(glob).test(url);
}

return GM_isGreasemonkeyable(url)
Expand Down

0 comments on commit 84d4a9e

Please sign in to comment.