| Left: | ||
| Right: |
| LEFT | RIGHT |
|---|---|
| 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-2015 Eyeo GmbH | 3 * Copyright (C) 2006-2015 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 14 matching lines...) Expand all Loading... | |
| 25 { | 25 { |
| 26 let search = []; | 26 let search = []; |
| 27 let keys = ["addonName", "addonVersion", "application", "applicationVersion", | 27 let keys = ["addonName", "addonVersion", "application", "applicationVersion", |
| 28 "platform", "platformVersion"]; | 28 "platform", "platformVersion"]; |
| 29 for (let key of keys) | 29 for (let key of keys) |
| 30 search.push(key + "=" + encodeURIComponent(info[key])); | 30 search.push(key + "=" + encodeURIComponent(info[key])); |
| 31 | 31 |
| 32 let downlCount = Prefs.notificationdata.downloadCount || 0; | 32 let downlCount = Prefs.notificationdata.downloadCount || 0; |
| 33 search.push("notificationDownloadCount=" + encodeURIComponent(downlCount)); | 33 search.push("notificationDownloadCount=" + encodeURIComponent(downlCount)); |
| 34 | 34 |
| 35 chrome.runtime.setUninstallURL(Utils.getDocLink("uninstalled") + "&" + | 35 chrome.runtime.setUninstallURL(Utils.getDocLink("uninstalled") + "&" + |
|
Sebastian Noack
2015/12/15 06:41:18
How I could I miss that? Of course, we have to che
kzar
2015/12/15 11:34:16
Done.
| |
| 36 search.join("&")); | 36 search.join("&")); |
| 37 } | 37 } |
| 38 | 38 |
| 39 function onPrefsLoaded() | 39 function onPrefsLoaded() |
| 40 { | 40 { |
| 41 Prefs.onLoaded.removeListener(onPrefsLoaded); | 41 Prefs.onLoaded.removeListener(onPrefsLoaded); |
| 42 setUninstallURL(); | 42 setUninstallURL(); |
| 43 } | 43 } |
| 44 | 44 |
| 45 // The uninstall URL contains the notification download count as a parameter, | 45 // The uninstall URL contains the notification download count as a parameter, |
| 46 // therefore we must wait for preferences to be loaded before generating the | 46 // therefore we must wait for preferences to be loaded before generating the |
| 47 // URL and we need to re-generate it each time the notification data changes. | 47 // URL and we need to re-generate it each time the notification data changes. |
| 48 Prefs.onLoaded.addListener(onPrefsLoaded); | 48 if ("setUninstallURL" in chrome.runtime) |
| 49 Prefs.onChanged.addListener(function(name) | |
| 50 { | 49 { |
| 51 if (name == "notificationdata") | 50 Prefs.onLoaded.addListener(onPrefsLoaded); |
| 52 setUninstallURL(); | 51 Prefs.onChanged.addListener(function(name) |
| 53 }); | 52 { |
| 53 if (name == "notificationdata") | |
| 54 setUninstallURL(); | |
| 55 }); | |
| 56 } | |
| LEFT | RIGHT |