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

Side by Side Diff: lib/ui.js

Issue 5734888082767872: Issue #580 - "Disable on this page only" should discard the final # from URLs (Closed)
Patch Set: check for nsIURI Created June 12, 2014, 2:19 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 <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
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
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 });
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