OLD | NEW |
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 1486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1497 let host = null; | 1497 let host = null; |
1498 try | 1498 try |
1499 { | 1499 { |
1500 host = location.host.replace(/^www\./, ""); | 1500 host = location.host.replace(/^www\./, ""); |
1501 } catch (e) {} | 1501 } catch (e) {} |
1502 | 1502 |
1503 if (host) | 1503 if (host) |
1504 { | 1504 { |
1505 let ending = "|"; | 1505 let ending = "|"; |
1506 location = location.clone(); | 1506 location = location.clone(); |
1507 if (location instanceof Ci.nsIURL && location.ref) | 1507 if (location instanceof Ci.nsIURL) |
1508 location.ref = ""; | 1508 location.ref = ""; |
1509 if (location instanceof Ci.nsIURL && location.query) | 1509 if (location instanceof Ci.nsIURL && location.query) |
1510 { | 1510 { |
1511 location.query = ""; | 1511 location.query = ""; |
1512 ending = "?"; | 1512 ending = "?"; |
1513 } | 1513 } |
1514 | 1514 |
1515 siteWhitelist = Filter.fromText("@@||" + host + "^$document"); | 1515 siteWhitelist = Filter.fromText("@@||" + host + "^$document"); |
1516 setChecked(prefix + "whitelistsite", siteWhitelist.subscriptions.length
&& !siteWhitelist.disabled); | 1516 setChecked(prefix + "whitelistsite", siteWhitelist.subscriptions.length
&& !siteWhitelist.disabled); |
1517 generateLabel(prefix + "whitelistsite", host); | 1517 generateLabel(prefix + "whitelistsite", host); |
(...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1950 ["abp-command-contribute", "command", UI.openContributePage.bind(UI)], | 1950 ["abp-command-contribute", "command", UI.openContributePage.bind(UI)], |
1951 ["abp-command-contribute-hide", "command", UI.hideContributeButton.bind(UI)] | 1951 ["abp-command-contribute-hide", "command", UI.hideContributeButton.bind(UI)] |
1952 ]; | 1952 ]; |
1953 | 1953 |
1954 onShutdown.add(function() | 1954 onShutdown.add(function() |
1955 { | 1955 { |
1956 for (let window in UI.applicationWindows) | 1956 for (let window in UI.applicationWindows) |
1957 if (UI.isBottombarOpen(window)) | 1957 if (UI.isBottombarOpen(window)) |
1958 UI.toggleBottombar(window); | 1958 UI.toggleBottombar(window); |
1959 }); | 1959 }); |
OLD | NEW |