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

Side by Side Diff: include.preload.js

Issue 8354161: Align whitelisting behavior in Chrome with Firefox (Closed)
Patch Set: Created Sept. 17, 2012, 2:52 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 Source Code is subject to the terms of the Mozilla Public License 2 * This Source Code is subject to the terms of the Mozilla Public License
3 * version 2.0 (the "License"). You can obtain a copy of the License at 3 * version 2.0 (the "License"). You can obtain a copy of the License at
4 * http://mozilla.org/MPL/2.0/. 4 * http://mozilla.org/MPL/2.0/.
5 */ 5 */
6 6
7 var SELECTOR_GROUP_SIZE = 20; 7 var SELECTOR_GROUP_SIZE = 20;
8 8
9 var savedBeforeloadEvents = new Array(); 9 var savedBeforeloadEvents = new Array();
10 10
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 } 43 }
44 setRules(); 44 setRules();
45 } 45 }
46 46
47 function sendRequests() 47 function sendRequests()
48 { 48 {
49 // Make sure this is really an HTML page, as Chrome runs these scripts on just about everything 49 // Make sure this is really an HTML page, as Chrome runs these scripts on just about everything
50 if (!(document.documentElement instanceof HTMLElement)) 50 if (!(document.documentElement instanceof HTMLElement))
51 return; 51 return;
52 52
53 chrome.extension.sendRequest({reqtype: "get-settings", selectors: true, host: window.location.hostname}, function(response) 53 chrome.extension.sendRequest({reqtype: "get-settings", selectors: true, frameU rl: window.location.href}, function(response)
54 { 54 {
55 setElemhideCSSRules(response.selectors); 55 setElemhideCSSRules(response.selectors);
56 }); 56 });
57 } 57 }
58 58
59 // In Chrome 18 the document might not be initialized yet 59 // In Chrome 18 the document might not be initialized yet
60 if (document.documentElement) 60 if (document.documentElement)
61 sendRequests(); 61 sendRequests();
62 else 62 else
63 window.setTimeout(sendRequests, 0); 63 window.setTimeout(sendRequests, 0);
OLDNEW

Powered by Google App Engine
This is Rietveld