OLD | NEW |
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-2013 Eyeo GmbH | 3 * Copyright (C) 2006-2013 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 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
291 for (let i = 0; i < FilterStorage.subscriptions.length; i++) | 291 for (let i = 0; i < FilterStorage.subscriptions.length; i++) |
292 { | 292 { |
293 let subscription = FilterStorage.subscriptions[i]; | 293 let subscription = FilterStorage.subscriptions[i]; |
294 if (!this.subscriptionFilter(subscription)) | 294 if (!this.subscriptionFilter(subscription)) |
295 continue; | 295 continue; |
296 | 296 |
297 let subscriptionXML = appendElement(subscriptions, "subscription", { | 297 let subscriptionXML = appendElement(subscriptions, "subscription", { |
298 id: subscription.url, | 298 id: subscription.url, |
299 disabledFilters: subscription.filters.filter(function(filter) filter ins
tanceof ActiveFilter && filter.disabled).length | 299 disabledFilters: subscription.filters.filter(function(filter) filter ins
tanceof ActiveFilter && filter.disabled).length |
300 }); | 300 }); |
| 301 if (subscription.version) |
| 302 subscriptionXML.setAttribute("version", subscription.version); |
301 if (subscription.lastDownload) | 303 if (subscription.lastDownload) |
302 subscriptionXML.setAttribute("lastDownloadAttempt", subscription.lastDow
nload - now); | 304 subscriptionXML.setAttribute("lastDownloadAttempt", subscription.lastDow
nload - now); |
303 if (subscription instanceof DownloadableSubscription) | 305 if (subscription instanceof DownloadableSubscription) |
304 { | 306 { |
305 if (subscription.lastSuccess) | 307 if (subscription.lastSuccess) |
306 subscriptionXML.setAttribute("lastDownloadSuccess", subscription.lastS
uccess - now); | 308 subscriptionXML.setAttribute("lastDownloadSuccess", subscription.lastS
uccess - now); |
307 if (subscription.softExpiration) | 309 if (subscription.softExpiration) |
308 subscriptionXML.setAttribute("softExpiration", subscription.softExpira
tion - now); | 310 subscriptionXML.setAttribute("softExpiration", subscription.softExpira
tion - now); |
309 if (subscription.expires) | 311 if (subscription.expires) |
310 subscriptionXML.setAttribute("hardExpiration", subscription.expires -
now); | 312 subscriptionXML.setAttribute("hardExpiration", subscription.expires -
now); |
(...skipping 1249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1560 | 1562 |
1561 function censorURL(url) | 1563 function censorURL(url) |
1562 { | 1564 { |
1563 return url.replace(/([?;&\/#][^?;&\/#]+?=)[^?;&\/#]+/g, "$1*"); | 1565 return url.replace(/([?;&\/#][^?;&\/#]+?=)[^?;&\/#]+/g, "$1*"); |
1564 } | 1566 } |
1565 | 1567 |
1566 function encodeHTML(str) | 1568 function encodeHTML(str) |
1567 { | 1569 { |
1568 return str.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").
replace(/"/g, """); | 1570 return str.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").
replace(/"/g, """); |
1569 } | 1571 } |
OLD | NEW |