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

Delta Between Two Patch Sets: lib/ui.js

Issue 5734888082767872: Issue #580 - "Disable on this page only" should discard the final # from URLs (Closed)
Left Patch Set: assign empty string to location.ref Created June 12, 2014, 7:16 a.m.
Right 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:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « no previous file | no next file » | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
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 location.ref = ""; 1507 if (location instanceof Ci.nsIURL)
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 = "";
1508 if (location instanceof Ci.nsIURL && location.query) 1509 if (location instanceof Ci.nsIURL && location.query)
1509 { 1510 {
1510 location.query = ""; 1511 location.query = "";
1511 ending = "?"; 1512 ending = "?";
1512 } 1513 }
1513 1514
1514 siteWhitelist = Filter.fromText("@@||" + host + "^$document"); 1515 siteWhitelist = Filter.fromText("@@||" + host + "^$document");
1515 setChecked(prefix + "whitelistsite", siteWhitelist.subscriptions.length && !siteWhitelist.disabled); 1516 setChecked(prefix + "whitelistsite", siteWhitelist.subscriptions.length && !siteWhitelist.disabled);
1516 generateLabel(prefix + "whitelistsite", host); 1517 generateLabel(prefix + "whitelistsite", host);
1517 hideElement(prefix + "whitelistsite", false); 1518 hideElement(prefix + "whitelistsite", false);
(...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after
1949 ["abp-command-contribute", "command", UI.openContributePage.bind(UI)], 1950 ["abp-command-contribute", "command", UI.openContributePage.bind(UI)],
1950 ["abp-command-contribute-hide", "command", UI.hideContributeButton.bind(UI)] 1951 ["abp-command-contribute-hide", "command", UI.hideContributeButton.bind(UI)]
1951 ]; 1952 ];
1952 1953
1953 onShutdown.add(function() 1954 onShutdown.add(function()
1954 { 1955 {
1955 for (let window in UI.applicationWindows) 1956 for (let window in UI.applicationWindows)
1956 if (UI.isBottombarOpen(window)) 1957 if (UI.isBottombarOpen(window))
1957 UI.toggleBottombar(window); 1958 UI.toggleBottombar(window);
1958 }); 1959 });
LEFTRIGHT
« no previous file | no next file » | Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Toggle Comments ('s')

Powered by Google App Engine
This is Rietveld