[Pkg-mozext-commits] [greasemonkey] 18/55: Allow scripts at `about:reader`.

David Prévot taffit at moszumanska.debian.org
Thu Oct 29 15:38:03 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository greasemonkey.

commit 02bd979102b097bd3ec7f69fdb0187b56def5ff1
Author: Anthony Lieuallen <arantius at gmail.com>
Date:   Wed Sep 23 12:50:50 2015 -0400

    Allow scripts at `about:reader`.
    
    Fixes #2195
---
 content/framescript.js             | 2 +-
 modules/util/isGreasemonkeyable.js | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/content/framescript.js b/content/framescript.js
index c3b7e00..4cae833 100644
--- a/content/framescript.js
+++ b/content/framescript.js
@@ -45,7 +45,7 @@ function contentObserver(win) {
 
 function blankLoad(aEvent) {
   var contentWin = aEvent.target.defaultView;
-  if (contentWin.location.href.match(/^about:blank/)) {
+  if (contentWin.location.href.match(/^about:(blank|reader)/)) {
     // #1696: document-element-inserted doesn't see about:blank
     runScripts('document-start', contentWin);
     runScripts('document-end', contentWin);
diff --git a/modules/util/isGreasemonkeyable.js b/modules/util/isGreasemonkeyable.js
index 5286e90..3287d9e 100644
--- a/modules/util/isGreasemonkeyable.js
+++ b/modules/util/isGreasemonkeyable.js
@@ -14,8 +14,8 @@ function isGreasemonkeyable(url) {
     case "ftp":
       return true;
     case "about":
-      // Always allow "about:blank".
-      if (/^about:blank/.test(url)) return true;
+      // Always allow "about:blank" and "about:reader".
+      if (/^about:(blank|reader)/.test(url)) return true;
       // Never allow the rest of "about:".  See #1375.
       return false;
     case "data":

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/greasemonkey.git



More information about the Pkg-mozext-commits mailing list