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

Delta Between Two Patch Sets: include.preload.js

Issue 5644946291818496: Issue 433 - Made adjustments for $sitekey-related changes to the Matcher API (Closed)
Left Patch Set: Created Sept. 10, 2014, 3:38 p.m.
Right Patch Set: Created Sept. 15, 2014, 9:22 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « background.js ('k') | lib/whitelisting.js » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 /* 1 /*
2 * This file is part of Adblock Plus <http://adblockplus.org/>, 2 * This file is part of Adblock Plus <http://adblockplus.org/>,
3 * Copyright (C) 2006-2014 Eyeo GmbH 3 * Copyright (C) 2006-2014 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 } 55 }
56 } 56 }
57 ); 57 );
58 } 58 }
59 } 59 }
60 60
61 function checkSitekey() 61 function checkSitekey()
62 { 62 {
63 var attr = document.documentElement.getAttribute("data-adblockkey"); 63 var attr = document.documentElement.getAttribute("data-adblockkey");
64 if (attr) 64 if (attr)
65 ext.backgroundPage.sendMessage({type: "add-sitekey", sitekey: attr}); 65 ext.backgroundPage.sendMessage({type: "add-sitekey", token: attr});
Wladimir Palant 2014/09/10 18:27:04 IMHO, the parameter name "token" is better left as
Thomas Greiner 2014/09/15 09:24:59 Done.
66 } 66 }
67 67
68 function hasInlineURL(element, attribute) 68 function hasInlineURL(element, attribute)
69 { 69 {
70 var value = element.getAttribute(attribute); 70 var value = element.getAttribute(attribute);
71 return value == null || /^\s*(javascript:|about:|$)/i.test(value); 71 return value == null || /^\s*(javascript:|about:|$)/i.test(value);
72 } 72 }
73 73
74 function isInlineFrame(element) 74 function isInlineFrame(element)
75 { 75 {
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 }, true); 199 }, true);
200 200
201 ext.backgroundPage.sendMessage({type: "get-selectors"}, setElemhideCSSRules); 201 ext.backgroundPage.sendMessage({type: "get-selectors"}, setElemhideCSSRules);
202 } 202 }
203 203
204 if (document instanceof HTMLDocument) 204 if (document instanceof HTMLDocument)
205 { 205 {
206 checkSitekey(); 206 checkSitekey();
207 init(document); 207 init(document);
208 } 208 }
LEFTRIGHT

Powered by Google App Engine
This is Rietveld