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

Side by Side Diff: messageResponder.js

Issue 29371585: Issue 4783 - Drop Safari support [adblockplusui] (Closed)
Patch Set: Created Jan. 12, 2017, 9:55 a.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 | « locale/en-US/new-options.json ('k') | new-options.html » ('j') | 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-2016 Eyeo GmbH 3 * Copyright (C) 2006-2016 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 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 } 153 }
154 return listenerFilters; 154 return listenerFilters;
155 } 155 }
156 156
157 port.on("app.get", (message, sender) => 157 port.on("app.get", (message, sender) =>
158 { 158 {
159 if (message.what == "issues") 159 if (message.what == "issues")
160 { 160 {
161 let subscriptionInit = tryRequire("subscriptionInit"); 161 let subscriptionInit = tryRequire("subscriptionInit");
162 return { 162 return {
163 filterlistsReinitialized: subscriptionInit ? subscriptionInit.reinitiali zed : false, 163 filterlistsReinitialized: subscriptionInit ? subscriptionInit.reinitiali zed : false
164 legacySafariVersion: (info.platform == "safari" && (
165 Services.vc.compare(info.platformVersion, "6.0") < 0 || // beforel oad breaks websites in Safari 5
166 Services.vc.compare(info.platformVersion, "6.1") == 0 || // extensi ons are broken in 6.1 and 7.0
167 Services.vc.compare(info.platformVersion, "7.0") == 0))
168 }; 164 };
169 } 165 }
170 166
171 if (message.what == "doclink") 167 if (message.what == "doclink")
172 return Utils.getDocLink(message.link); 168 return Utils.getDocLink(message.link);
173 169
174 if (message.what == "localeInfo") 170 if (message.what == "localeInfo")
175 { 171 {
176 let bidiDir; 172 let bidiDir;
177 if ("chromeRegistry" in Utils) 173 if ("chromeRegistry" in Utils)
178 bidiDir = Utils.chromeRegistry.isLocaleRTL("adblockplus") ? "rtl" : "ltr "; 174 bidiDir = Utils.chromeRegistry.isLocaleRTL("adblockplus") ? "rtl" : "ltr ";
179 else 175 else
180 bidiDir = ext.i18n.getMessage("@@bidi_dir"); 176 bidiDir = ext.i18n.getMessage("@@bidi_dir");
181 177
182 return {locale: Utils.appLocale, bidiDir: bidiDir}; 178 return {locale: Utils.appLocale, bidiDir: bidiDir};
183 } 179 }
184 180
185 if (message.what == "features") 181 if (message.what == "features")
186 { 182 {
187 return { 183 return {
188 devToolsPanel: info.platform == "chromium", 184 devToolsPanel: info.platform == "chromium"
189 safariContentBlocker: "safari" in global
190 && "extension" in global.safari
191 && "setContentBlocker" in global.safari.extension
192 }; 185 };
193 } 186 }
194 187
195 return info[message.what]; 188 return info[message.what];
196 }); 189 });
197 190
198 port.on("app.listen", (message, sender) => 191 port.on("app.listen", (message, sender) =>
199 { 192 {
200 getListenerFilters(sender.page).app = message.filter; 193 getListenerFilters(sender.page).app = message.filter;
201 }); 194 });
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
423 416
424 port.on("subscriptions.update", (message, sender) => 417 port.on("subscriptions.update", (message, sender) =>
425 { 418 {
426 let subscriptions = message.url ? [Subscription.fromURL(message.url)] : 419 let subscriptions = message.url ? [Subscription.fromURL(message.url)] :
427 FilterStorage.subscriptions; 420 FilterStorage.subscriptions;
428 for (let subscription of subscriptions) 421 for (let subscription of subscriptions)
429 if (subscription instanceof DownloadableSubscription) 422 if (subscription instanceof DownloadableSubscription)
430 Synchronizer.execute(subscription, true); 423 Synchronizer.execute(subscription, true);
431 }); 424 });
432 })(this); 425 })(this);
OLDNEW
« no previous file with comments | « locale/en-US/new-options.json ('k') | new-options.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld