| Left: | ||
| Right: |
| 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 location.ref = ""; |
|
Wladimir Palant
2014/06/12 08:09:36
Please don't remove |location instanceof Ci.nsIURL
saroyanm
2014/06/12 14:20:40
Done.
| |
| 1508 location.ref = ""; | |
| 1509 if (location instanceof Ci.nsIURL && location.query) | 1508 if (location instanceof Ci.nsIURL && location.query) |
| 1510 { | 1509 { |
| 1511 location.query = ""; | 1510 location.query = ""; |
| 1512 ending = "?"; | 1511 ending = "?"; |
| 1513 } | 1512 } |
| 1514 | 1513 |
| 1515 siteWhitelist = Filter.fromText("@@||" + host + "^$document"); | 1514 siteWhitelist = Filter.fromText("@@||" + host + "^$document"); |
| 1516 setChecked(prefix + "whitelistsite", siteWhitelist.subscriptions.length && !siteWhitelist.disabled); | 1515 setChecked(prefix + "whitelistsite", siteWhitelist.subscriptions.length && !siteWhitelist.disabled); |
| 1517 generateLabel(prefix + "whitelistsite", host); | 1516 generateLabel(prefix + "whitelistsite", host); |
| 1518 hideElement(prefix + "whitelistsite", false); | 1517 hideElement(prefix + "whitelistsite", false); |
| (...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1950 ["abp-command-contribute", "command", UI.openContributePage.bind(UI)], | 1949 ["abp-command-contribute", "command", UI.openContributePage.bind(UI)], |
| 1951 ["abp-command-contribute-hide", "command", UI.hideContributeButton.bind(UI)] | 1950 ["abp-command-contribute-hide", "command", UI.hideContributeButton.bind(UI)] |
| 1952 ]; | 1951 ]; |
| 1953 | 1952 |
| 1954 onShutdown.add(function() | 1953 onShutdown.add(function() |
| 1955 { | 1954 { |
| 1956 for (let window in UI.applicationWindows) | 1955 for (let window in UI.applicationWindows) |
| 1957 if (UI.isBottombarOpen(window)) | 1956 if (UI.isBottombarOpen(window)) |
| 1958 UI.toggleBottombar(window); | 1957 UI.toggleBottombar(window); |
| 1959 }); | 1958 }); |
| OLD | NEW |