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

Side by Side Diff: lib/options.js

Issue 29573801: Issue 4580 - Replace ext.getURL with extension.getURL (Closed) Base URL: https://hg.adblockplus.org/adblockpluschrome/
Patch Set: Created Oct. 11, 2017, 4:15 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 | « lib/notificationHelper.js ('k') | lib/subscriptionInit.js » ('j') | 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 19 matching lines...) Expand all
30 { 30 {
31 chrome.tabs.query({}, tabs => 31 chrome.tabs.query({}, tabs =>
32 { 32 {
33 // We find a tab ourselves because Edge has a bug when quering tabs with 33 // We find a tab ourselves because Edge has a bug when quering tabs with
34 // extension URL protocol: 34 // extension URL protocol:
35 // https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/8094 141/ 35 // https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/8094 141/
36 // https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/8604 703/ 36 // https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/8604 703/
37 // Firefox won't let us query for moz-extension:// pages either, though 37 // Firefox won't let us query for moz-extension:// pages either, though
38 // starting with Firefox 56 an extension can query for its own URLs: 38 // starting with Firefox 56 an extension can query for its own URLs:
39 // https://bugzilla.mozilla.org/show_bug.cgi?id=1271354 39 // https://bugzilla.mozilla.org/show_bug.cgi?id=1271354
40 let fullOptionsUrl = ext.getURL(optionsUrl); 40 let fullOptionsUrl = chrome.extension.getURL(optionsUrl);
41 callback(tabs.find(element => element.url == fullOptionsUrl)); 41 callback(tabs.find(element => element.url == fullOptionsUrl));
42 }); 42 });
43 } 43 }
44 44
45 function returnShowOptionsCall(optionsTab, callback) 45 function returnShowOptionsCall(optionsTab, callback)
46 { 46 {
47 if (!callback) 47 if (!callback)
48 return; 48 return;
49 49
50 if (optionsTab) 50 if (optionsTab)
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 args: [ 143 args: [
144 { 144 {
145 host: getDecodedHostname(currentPage.url).replace(/^www\./, ""), 145 host: getDecodedHostname(currentPage.url).replace(/^www\./, ""),
146 whitelisted: !!checkWhitelisted(currentPage) 146 whitelisted: !!checkWhitelisted(currentPage)
147 } 147 }
148 ] 148 ]
149 }); 149 });
150 }); 150 });
151 }); 151 });
152 }); 152 });
OLDNEW
« no previous file with comments | « lib/notificationHelper.js ('k') | lib/subscriptionInit.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld