[Pkg-mozext-commits] [requestpolicy] 63/100: Do not put placeholders for blacklisted images

David Prévot taffit at moszumanska.debian.org
Fri Dec 12 22:56:59 UTC 2014


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

taffit pushed a commit to branch master
in repository requestpolicy.

commit 46a6744dbaec54ab0bf589f70c6639c1d593b3c3
Author: Gaetan Gilbert <gaetan.gilbert at ens-lyon.fr>
Date:   Wed Nov 5 13:33:21 2014 +0100

    Do not put placeholders for blacklisted images
---
 src/content/overlay.js | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/content/overlay.js b/src/content/overlay.js
index 64379b7..414bd5a 100644
--- a/src/content/overlay.js
+++ b/src/content/overlay.js
@@ -673,7 +673,12 @@ requestpolicy.overlay = {
     for (var destBase in rejectedRequests) {
       for (var destIdent in rejectedRequests[destBase]) {
         for (var destUri in rejectedRequests[destBase][destIdent]) {
-          blockedUris[destUri] = true;
+          var shouldPlacehold = false; // = pref(show placeholder for blacklisted images)
+          var results = rejectedRequests[destBase][destIdent][destUri];
+          for(var i=0; i < results.length && !shouldPlacehold; i++)
+            shouldPlacehold = results[i].isDefaultPolicyUsed(); // if a request is blocked not by the default policy it's by a blacklist
+          if(shouldPlacehold)
+            blockedUris[destUri] = true;
         }
       }
     }

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



More information about the Pkg-mozext-commits mailing list