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

Delta Between Two Patch Sets: lib/whitelisting.js

Issue 6445129351036928: Noissue - Fixed issue where JsDoc documented module functions incorrectly (Closed)
Left Patch Set: Created April 15, 2015, 3:52 p.m.
Right Patch Set: Fixed syntax error Created April 18, 2015, 2:54 p.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 | « lib/url.js ('k') | no next file » | 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 <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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 }; 71 };
72 72
73 /** 73 /**
74 * Gets the public key, previously recorded for the given page 74 * Gets the public key, previously recorded for the given page
75 * and frame, to be considered for the $sitekey filter option. 75 * and frame, to be considered for the $sitekey filter option.
76 * 76 *
77 * @param {Page} page 77 * @param {Page} page
78 * @param {Frame} frame 78 * @param {Frame} frame
79 * @return {string} 79 * @return {string}
80 */ 80 */
81 exports.getKey(page, frame) 81 exports.getKey = function(page, frame)
82 { 82 {
83 let urlsWithKey = pagesWithKey.get(page); 83 let urlsWithKey = pagesWithKey.get(page);
84 if (!urlsWithKey) 84 if (!urlsWithKey)
85 return null; 85 return null;
86 86
87 for (; frame != null; frame = frame.parent) 87 for (; frame != null; frame = frame.parent)
88 { 88 {
89 let key = urlsWithKey[stringifyURL(frame.url)]; 89 let key = urlsWithKey[stringifyURL(frame.url)];
90 if (key) 90 if (key)
91 return key; 91 return key;
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 { 133 {
134 if (token.indexOf("_") < 0) 134 if (token.indexOf("_") < 0)
135 return; 135 return;
136 136
137 let [key, signature] = token.split("_", 2); 137 let [key, signature] = token.split("_", 2);
138 key = key.replace(/=/g, ""); 138 key = key.replace(/=/g, "");
139 139
140 if (verifyKey(key, signature, frame.url)) 140 if (verifyKey(key, signature, frame.url))
141 recordKey(page, frame.url, key); 141 recordKey(page, frame.url, key);
142 }; 142 };
LEFTRIGHT
« lib/url.js ('k') | no next file » | Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Toggle Comments ('s')

Powered by Google App Engine
This is Rietveld