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

Side by Side Diff: devtools-panel.js

Issue 29716584: Issue 6451 - Generate $csp exception filters properly (Closed)
Patch Set: Lowercase the $csp option Created March 7, 2018, 3:10 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 | no next file » | no next file with comments »
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-present eyeo GmbH 3 * Copyright (C) 2006-present 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 let options = []; 42 let options = [];
43 43
44 if (request.type == "POPUP") 44 if (request.type == "POPUP")
45 { 45 {
46 options.push("popup"); 46 options.push("popup");
47 47
48 if (request.url == "about:blank") 48 if (request.url == "about:blank")
49 domainSpecific = true; 49 domainSpecific = true;
50 } 50 }
51 51
52 if (request.type == "CSP")
53 options.push("csp");
54
52 if (domainSpecific) 55 if (domainSpecific)
53 options.push("domain=" + request.docDomain); 56 options.push("domain=" + request.docDomain);
54 57
55 if (options.length > 0) 58 if (options.length > 0)
56 filter += "$" + options.join(","); 59 filter += "$" + options.join(",");
57 60
58 return filter; 61 return filter;
59 } 62 }
60 63
61 function createActionButton(action, label, filter) 64 function createActionButton(action, label, filter)
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 break; 258 break;
256 } 259 }
257 }); 260 });
258 261
259 // Since Chrome 54 the themeName is accessible, for earlier versions we must 262 // Since Chrome 54 the themeName is accessible, for earlier versions we must
260 // assume the default theme is being used. 263 // assume the default theme is being used.
261 // https://bugs.chromium.org/p/chromium/issues/detail?id=608869 264 // https://bugs.chromium.org/p/chromium/issues/detail?id=608869
262 let theme = browser.devtools.panels.themeName || "default"; 265 let theme = browser.devtools.panels.themeName || "default";
263 document.body.classList.add(theme); 266 document.body.classList.add(theme);
264 }, false); 267 }, false);
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld