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

Side by Side Diff: lib/ui.js

Issue 4759471792324608: Issue 1712 - Don't add "Adblock Warning Removal List" subscription on Fennec (Closed)
Patch Set: Created Jan. 6, 2015, 5:24 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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 // Load subscriptions data 152 // Load subscriptions data
153 let request = new XMLHttpRequest(); 153 let request = new XMLHttpRequest();
154 request.mozBackgroundRequest = true; 154 request.mozBackgroundRequest = true;
155 request.open("GET", "chrome://adblockplus/content/ui/subscriptions.xml") ; 155 request.open("GET", "chrome://adblockplus/content/ui/subscriptions.xml") ;
156 request.addEventListener("load", function() 156 request.addEventListener("load", function()
157 { 157 {
158 if (onShutdown.done) 158 if (onShutdown.done)
159 return; 159 return;
160 160
161 let currentSubscription = FilterStorage.subscriptions.filter((subscrip tion) => subscription instanceof DownloadableSubscription && 161 let currentSubscription = FilterStorage.subscriptions.filter((subscrip tion) => subscription instanceof DownloadableSubscription &&
162 subscription.url != Prefs.subscriptions_exceptionsurl); 162 subscription.url != Prefs.subscriptions_exceptionsurl &&
163 subscription.url != Prefs.subscriptions_antiadblockurl);
163 currentSubscription = (currentSubscription.length ? currentSubscriptio n[0] : null); 164 currentSubscription = (currentSubscription.length ? currentSubscriptio n[0] : null);
164 165
165 let subscriptions =request.responseXML.getElementsByTagName("subscript ion"); 166 let subscriptions =request.responseXML.getElementsByTagName("subscript ion");
166 for (let i = 0; i < subscriptions.length; i++) 167 for (let i = 0; i < subscriptions.length; i++)
167 { 168 {
168 let item = subscriptions[i]; 169 let item = subscriptions[i];
169 let url = item.getAttribute("url"); 170 let url = item.getAttribute("url");
170 if (!url) 171 if (!url)
171 continue; 172 continue;
172 173
(...skipping 1780 matching lines...) Expand 10 before | Expand all | Expand 10 after
1953 ["abp-command-contribute", "command", UI.openContributePage.bind(UI)], 1954 ["abp-command-contribute", "command", UI.openContributePage.bind(UI)],
1954 ["abp-command-contribute-hide", "command", UI.hideContributeButton.bind(UI)] 1955 ["abp-command-contribute-hide", "command", UI.hideContributeButton.bind(UI)]
1955 ]; 1956 ];
1956 1957
1957 onShutdown.add(function() 1958 onShutdown.add(function()
1958 { 1959 {
1959 for (let window in UI.applicationWindows) 1960 for (let window in UI.applicationWindows)
1960 if (UI.isBottombarOpen(window)) 1961 if (UI.isBottombarOpen(window))
1961 UI.toggleBottombar(window); 1962 UI.toggleBottombar(window);
1962 }); 1963 });
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