diff options
author | Ruben Rodriguez <ruben@gnu.org> | 2015-07-13 22:52:06 -0500 |
---|---|---|
committer | Ruben Rodriguez <ruben@gnu.org> | 2015-07-13 22:52:06 -0500 |
commit | 9cb91f8a48f9467e448f88984c20b3429e8a2510 (patch) | |
tree | 05104ee593dade85e0873615eff0ee0369361210 /data/extensions/spyblock@gnu.org/lib/downloader.js | |
parent | 58f127c1d5f8c89b9e55803701f734756d1cfa2a (diff) |
Spyblock updated to 2.6.9.0 from upstream changes
Diffstat (limited to 'data/extensions/spyblock@gnu.org/lib/downloader.js')
-rw-r--r-- | data/extensions/spyblock@gnu.org/lib/downloader.js | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/data/extensions/spyblock@gnu.org/lib/downloader.js b/data/extensions/spyblock@gnu.org/lib/downloader.js index d1ef209..320a754 100644 --- a/data/extensions/spyblock@gnu.org/lib/downloader.js +++ b/data/extensions/spyblock@gnu.org/lib/downloader.js @@ -1,6 +1,6 @@ /* - * This file is part of Adblock Plus <http://adblockplus.org/>, - * Copyright (C) 2006-2014 Eyeo GmbH + * This file is part of Adblock Plus <https://adblockplus.org/>, + * Copyright (C) 2006-2015 Eyeo GmbH * * Adblock Plus is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License version 3 as @@ -191,13 +191,18 @@ Downloader.prototype = url += "&"; else url += "?"; + // We limit the download count to 4+ to keep the request anonymized + let downloadCount = downloadable.downloadCount; + if (downloadCount > 4) + downloadCount = "4+"; url += "addonName=" + encodeURIComponent(addonName) + "&addonVersion=" + encodeURIComponent(addonVersion) + "&application=" + encodeURIComponent(application) + "&applicationVersion=" + encodeURIComponent(applicationVersion) + "&platform=" + encodeURIComponent(platform) + "&platformVersion=" + encodeURIComponent(platformVersion) + - "&lastVersion=" + encodeURIComponent(downloadable.lastVersion); + "&lastVersion=" + encodeURIComponent(downloadable.lastVersion) + + "&downloadCount=" + encodeURIComponent(downloadCount); return url; }, @@ -291,6 +296,8 @@ Downloader.prototype = return; } + downloadable.downloadCount++; + this.onDownloadSuccess(downloadable, request.responseText, errorCallback, function redirectCallback(url) { if (redirects >= this.maxRedirects) @@ -378,4 +385,10 @@ Downloadable.prototype = * @type Integer */ hardExpiration: 0, + + /** + * Number indicating how often the object was downloaded. + * @type Integer + */ + downloadCount: 0, }; |