Left: | ||
Right: |
LEFT | RIGHT |
---|---|
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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
79 switch (message.type) | 79 switch (message.type) |
80 { | 80 { |
81 case "app.get": | 81 case "app.get": |
82 if (message.what == "issues") | 82 if (message.what == "issues") |
83 { | 83 { |
84 var info = require("info"); | 84 var info = require("info"); |
85 callback({ | 85 callback({ |
86 seenDataCorruption: "seenDataCorruption" in global ? global.seenData Corruption : false, | 86 seenDataCorruption: "seenDataCorruption" in global ? global.seenData Corruption : false, |
87 filterlistsReinitialized: "filterlistsReinitialized" in global ? glo bal.filterlistsReinitialized : false, | 87 filterlistsReinitialized: "filterlistsReinitialized" in global ? glo bal.filterlistsReinitialized : false, |
88 legacySafariVersion: (info.platform == "safari" && ( | 88 legacySafariVersion: (info.platform == "safari" && ( |
89 parseInt(info.platformVersion, 10) < 6 || // beforeload breaks w ebsites in Safari 5 | 89 Services.vc.compare(info.platformVersion, "6.0") < 0 || // bef oreload breaks websites in Safari 5 |
Thomas Greiner
2014/12/19 16:58:23
Since this is only running in the context of the b
Wladimir Palant
2014/12/19 17:45:38
Done.
| |
90 info.platformVersion == "6.1" || // extensions are brok en in 6.1 and 7.0 | 90 Services.vc.compare(info.platformVersion, "6.1") == 0 || // ext ensions are broken in 6.1 and 7.0 |
91 info.platformVersion == "7.0")) | 91 Services.vc.compare(info.platformVersion, "7.0") == 0)) |
92 }); | 92 }); |
93 } | 93 } |
94 else if (message.what == "doclink") | 94 else if (message.what == "doclink") |
95 callback(Utils.getDocLink(message.link)); | 95 callback(Utils.getDocLink(message.link)); |
96 else | 96 else |
97 callback(null); | 97 callback(null); |
98 break; | 98 break; |
99 case "app.open": | 99 case "app.open": |
100 if (message.what == "options") | 100 if (message.what == "options") |
101 { | 101 { |
102 if (typeof UI != "undefined") | 102 if (typeof UI != "undefined") |
103 UI.openFiltersDialog(); | 103 UI.openFiltersDialog(); |
104 else | 104 else |
105 global.openOptions(); | 105 global.openOptions(); |
Sebastian Noack
2014/12/22 09:56:17
window.openOptions() is deprecated. Please use ext
Wladimir Palant
2015/01/15 13:03:22
I filed #1813 and #1814 on that.
| |
106 } | 106 } |
107 break; | 107 break; |
108 case "subscriptions.get": | 108 case "subscriptions.get": |
109 var subscriptions = FilterStorage.subscriptions.filter(function(s) | 109 var subscriptions = FilterStorage.subscriptions.filter(function(s) |
110 { | 110 { |
111 if (message.ignoreDisabled && s.disabled) | 111 if (message.ignoreDisabled && s.disabled) |
112 return false; | 112 return false; |
113 if (s instanceof DownloadableSubscription && message.downloadable) | 113 if (s instanceof DownloadableSubscription && message.downloadable) |
114 return true; | 114 return true; |
115 if (s instanceof SpecialSubscription && message.special) | 115 if (s instanceof SpecialSubscription && message.special) |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
151 } | 151 } |
152 | 152 |
153 if (message.filter) | 153 if (message.filter) |
154 filters.subscription = message.filter; | 154 filters.subscription = message.filter; |
155 else | 155 else |
156 delete filters.subscription; | 156 delete filters.subscription; |
157 break; | 157 break; |
158 } | 158 } |
159 }); | 159 }); |
160 })(this); | 160 })(this); |
LEFT | RIGHT |