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

Side by Side Diff: lib/ui.js

Issue 29333144: Issue 3451 - Fixed: Filter stays disabled when re-adding it through site whitelisting (Closed)
Patch Set: Created Jan. 4, 2016, 5:02 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 <https://adblockplus.org/>, 2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-2015 Eyeo GmbH 3 * Copyright (C) 2006-2015 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 1153 matching lines...) Expand 10 before | Expand all | Expand 10 after
1164 toggleFilter: function(/**Filter*/ filter) 1164 toggleFilter: function(/**Filter*/ filter)
1165 { 1165 {
1166 if (filter.subscriptions.length) 1166 if (filter.subscriptions.length)
1167 { 1167 {
1168 if (filter.disabled || filter.subscriptions.some((subscription) => !(subsc ription instanceof SpecialSubscription))) 1168 if (filter.disabled || filter.subscriptions.some((subscription) => !(subsc ription instanceof SpecialSubscription)))
1169 filter.disabled = !filter.disabled; 1169 filter.disabled = !filter.disabled;
1170 else 1170 else
1171 FilterStorage.removeFilter(filter); 1171 FilterStorage.removeFilter(filter);
1172 } 1172 }
1173 else 1173 else
1174 {
1175 filter.disabled = false;
1174 FilterStorage.addFilter(filter); 1176 FilterStorage.addFilter(filter);
1177 }
1175 }, 1178 },
1176 1179
1177 1180
1178 /** 1181 /**
1179 * Toggles "Count filter hits" option. 1182 * Toggles "Count filter hits" option.
1180 */ 1183 */
1181 toggleSaveStats: function(window) 1184 toggleSaveStats: function(window)
1182 { 1185 {
1183 if (Prefs.savestats) 1186 if (Prefs.savestats)
1184 { 1187 {
(...skipping 711 matching lines...) Expand 10 before | Expand all | Expand 10 after
1896 ["abp-command-contribute-hide", "command", UI.hideContributeButton.bind(UI)], 1899 ["abp-command-contribute-hide", "command", UI.hideContributeButton.bind(UI)],
1897 ["abp-command-toggleshownotifications", "command", Notification.toggleIgnoreCa tegory.bind(Notification, "*", null)] 1900 ["abp-command-toggleshownotifications", "command", Notification.toggleIgnoreCa tegory.bind(Notification, "*", null)]
1898 ]; 1901 ];
1899 1902
1900 onShutdown.add(function() 1903 onShutdown.add(function()
1901 { 1904 {
1902 for (let window of UI.applicationWindows) 1905 for (let window of UI.applicationWindows)
1903 if (UI.isBottombarOpen(window)) 1906 if (UI.isBottombarOpen(window))
1904 UI.toggleBottombar(window); 1907 UI.toggleBottombar(window);
1905 }); 1908 });
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