Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: include.preload.js

Issue 29338962: Issue 3860 - Move request blocking logic to a seperate module (Closed)
Patch Set: Created March 23, 2016, 1:55 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * This file is part of Adblock Plus <https://adblockplus.org/>, 2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-2016 Eyeo GmbH 3 * Copyright (C) 2006-2016 Eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 var mediatype = typeMap[element.localName]; 133 var mediatype = typeMap[element.localName];
134 if (!mediatype) 134 if (!mediatype)
135 return; 135 return;
136 136
137 var urls = getURLsFromElement(element); 137 var urls = getURLsFromElement(element);
138 if (urls.length == 0) 138 if (urls.length == 0)
139 return; 139 return;
140 140
141 ext.backgroundPage.sendMessage( 141 ext.backgroundPage.sendMessage(
142 { 142 {
143 type: "should-collapse", 143 type: "filters.collapse",
144 urls: urls, 144 urls: urls,
145 mediatype: mediatype, 145 mediatype: mediatype,
146 baseURL: document.location.href 146 baseURL: document.location.href
147 }, 147 },
148 148
149 function(collapse) 149 function(collapse)
150 { 150 {
151 function collapseElement() 151 function collapseElement()
152 { 152 {
153 if (element.localName == "frame") 153 if (element.localName == "frame")
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after
552 }, true); 552 }, true);
553 553
554 return updateStylesheet; 554 return updateStylesheet;
555 } 555 }
556 556
557 if (document instanceof HTMLDocument) 557 if (document instanceof HTMLDocument)
558 { 558 {
559 checkSitekey(); 559 checkSitekey();
560 window.updateStylesheet = init(document); 560 window.updateStylesheet = init(document);
561 } 561 }
OLDNEW
« no previous file with comments | « background.js ('k') | lib/requestBlocker.js » ('j') | lib/requestBlocker.js » ('J')

Powered by Google App Engine
This is Rietveld