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

Side by Side Diff: lib/whitelisting.js

Issue 29330321: Issue 3334 - Fix warnings spotted during testing before release (Closed)
Patch Set: Remove changes to webrequest.js Created Nov. 17, 2015, 7:04 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
« no previous file with comments | « no previous file | metadata.common » ('j') | metadata.common » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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-2015 Eyeo GmbH 3 * Copyright (C) 2006-2015 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 63
64 if (filter) 64 if (filter)
65 return true; 65 return true;
66 66
67 frame = parent; 67 frame = parent;
68 } 68 }
69 69
70 return false; 70 return false;
71 }; 71 };
72 72
73 let getKey =
73 /** 74 /**
74 * Gets the public key, previously recorded for the given page 75 * Gets the public key, previously recorded for the given page
75 * and frame, to be considered for the $sitekey filter option. 76 * and frame, to be considered for the $sitekey filter option.
76 * 77 *
77 * @param {Page} page 78 * @param {Page} page
78 * @param {Frame} frame 79 * @param {Frame} frame
79 * @return {string} 80 * @return {string}
80 */ 81 */
81 exports.getKey = function(page, frame) 82 exports.getKey = function(page, frame)
82 { 83 {
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 { 134 {
134 if (token.indexOf("_") < 0) 135 if (token.indexOf("_") < 0)
135 return; 136 return;
136 137
137 let [key, signature] = token.split("_", 2); 138 let [key, signature] = token.split("_", 2);
138 key = key.replace(/=/g, ""); 139 key = key.replace(/=/g, "");
139 140
140 if (verifyKey(key, signature, frame.url)) 141 if (verifyKey(key, signature, frame.url))
141 recordKey(page, frame.url, key); 142 recordKey(page, frame.url, key);
142 }; 143 };
OLDNEW
« no previous file with comments | « no previous file | metadata.common » ('j') | metadata.common » ('J')

Powered by Google App Engine
This is Rietveld