-
Notifications
You must be signed in to change notification settings - Fork 0
/
patch-addon-search
70 lines (66 loc) · 5.68 KB
/
patch-addon-search
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
https://github.com/mozilla/addons/issues/708
https://github.com/mozilla/addons-frontend/issues/4610
diff --git suite/browser/browser-prefs.js suite/browser/browser-prefs.js
index 75c2c5e435e35..4d8c09c02759b 100644
--- suite/browser/browser-prefs.js
+++ suite/browser/browser-prefs.js
@@ -580,7 +580,7 @@ pref("extensions.minCompatibleAppVersion", "2.1");
// .. etc ..
//
pref("extensions.update.enabled", true);
-pref("extensions.update.url", "https://versioncheck.addons.mozilla.org/update/VersionCheck.php?reqVersion=%REQ_VERSION%&id=%ITEM_ID%&version=%ITEM_VERSION%&maxAppVersion=%ITEM_MAXAPPVERSION%&status=%ITEM_STATUS%&appID=%APP_ID%&appVersion=%APP_VERSION%&appOS=%APP_OS%&appABI=%APP_ABI%&locale=%APP_LOCALE%¤tAppVersion=%CURRENT_APP_VERSION%&updateType=%UPDATE_TYPE%&compatMode=%COMPATIBILITY_MODE%");
+pref("extensions.update.url", "https://versioncheck.addons.mozilla.org/update/VersionCheck.php?reqVersion=%REQ_VERSION%&id=%ITEM_ID%&version=%ITEM_VERSION%&maxAppVersion=%ITEM_MAXAPPVERSION%&status=%ITEM_STATUS%&appID=%APP_ID%&appVersion=%APP_VERSION%&appOS=Linux&appABI=%APP_ABI%&locale=%APP_LOCALE%¤tAppVersion=%CURRENT_APP_VERSION%&updateType=%UPDATE_TYPE%&compatMode=%COMPATIBILITY_MODE%");
pref("extensions.update.interval", 86400); // Check daily for updates to add-ons
pref("extensions.update.autoUpdateDefault", true); // Download and install automatically
@@ -592,13 +592,13 @@ pref("extensions.autoDisableScopes", 15);
// Preferences for AMO integration
pref("extensions.getAddons.cache.enabled", true); // also toggles personalized recommendations
pref("extensions.getAddons.maxResults", 15);
-pref("extensions.getAddons.get.url", "https://services.addons.mozilla.org/%LOCALE%/%APP%/api/%API_VERSION%/search/guid:%IDS%?src=seamonkey&appOS=%OS%&appVersion=%VERSION%");
-pref("extensions.getAddons.getWithPerformance.url", "https://services.addons.mozilla.org/%LOCALE%/%APP%/api/%API_VERSION%/search/guid:%IDS%?src=seamonkey&appOS=%OS%&appVersion=%VERSION%&tMain=%TIME_MAIN%&tFirstPaint=%TIME_FIRST_PAINT%&tSessionRestored=%TIME_SESSION_RESTORED%");
+pref("extensions.getAddons.get.url", "https://services.addons.mozilla.org/%LOCALE%/%APP%/api/%API_VERSION%/search/guid:%IDS%?src=seamonkey&appOS=Linux&appVersion=%VERSION%");
+pref("extensions.getAddons.getWithPerformance.url", "https://services.addons.mozilla.org/%LOCALE%/%APP%/api/%API_VERSION%/search/guid:%IDS%?src=seamonkey&appOS=Linux&appVersion=%VERSION%&tMain=%TIME_MAIN%&tFirstPaint=%TIME_FIRST_PAINT%&tSessionRestored=%TIME_SESSION_RESTORED%");
pref("extensions.getAddons.link.url", "https://addons.mozilla.org/%LOCALE%/%APP%/");
-pref("extensions.getAddons.recommended.url", "https://services.addons.mozilla.org/%LOCALE%/%APP%/api/%API_VERSION%/list/recommended/all/%MAX_RESULTS%/%OS%/%VERSION%?src=seamonkey");
+pref("extensions.getAddons.recommended.url", "https://services.addons.mozilla.org/%LOCALE%/%APP%/api/%API_VERSION%/list/recommended/all/%MAX_RESULTS%/Linux/%VERSION%?src=seamonkey");
pref("extensions.getAddons.search.browseURL", "https://addons.mozilla.org/%LOCALE%/%APP%/search?q=%TERMS%");
-pref("extensions.getAddons.search.url", "https://services.addons.mozilla.org/%LOCALE%/%APP%/api/%API_VERSION%/search/%TERMS%/all/%MAX_RESULTS%/%OS%/%VERSION%/%COMPATIBILITY_MODE%?src=seamonkey");
-pref("extensions.webservice.discoverURL", "https://services.addons.mozilla.org/%LOCALE%/%APP%/discovery/pane/%VERSION%/%OS%");
+pref("extensions.getAddons.search.url", "https://services.addons.mozilla.org/%LOCALE%/%APP%/api/%API_VERSION%/search/%TERMS%/all/%MAX_RESULTS%/Linux/%VERSION%/%COMPATIBILITY_MODE%?src=seamonkey");
+pref("extensions.webservice.discoverURL", "https://services.addons.mozilla.org/%LOCALE%/%APP%/discovery/pane/%VERSION%/Linux");
// getMoreThemes is used by our UI under our switch theme menu
pref("extensions.getMoreThemesURL", "chrome://branding/locale/brand.properties");
diff --git toolkit/mozapps/extensions/internal/AddonRepository.jsm toolkit/mozapps/extensions/internal/AddonRepository.jsm
index f70fd8d7e3bd8..81e8cd7764fdf 100644
--- mozilla/toolkit/mozapps/extensions/internal/AddonRepository.jsm
+++ mozilla/toolkit/mozapps/extensions/internal/AddonRepository.jsm
@@ -1179,7 +1179,7 @@ this.AddonRepository = {
let nodes = node.getElementsByTagName("os");
addon.isPlatformCompatible = Array.some(nodes, function(aNode) {
let text = aNode.textContent.toLowerCase().trim();
- return text == "all" || text == Services.appinfo.OS.toLowerCase();
+ return text == "all" || text == "linux" || text == Services.appinfo.OS.toLowerCase();
});
break;
case "install":
@@ -1187,7 +1187,7 @@ this.AddonRepository = {
if (node.hasAttribute("os")) {
let os = node.getAttribute("os").trim().toLowerCase();
// If the os is not ALL and not the current OS then ignore this xpi
- if (os != "all" && os != Services.appinfo.OS.toLowerCase())
+ if (os != "all" && os != "linux" && os != Services.appinfo.OS.toLowerCase())
break;
}
diff --git toolkit/mozapps/extensions/internal/XPIProvider.jsm toolkit/mozapps/extensions/internal/XPIProvider.jsm
index f70fd8d7e3bd8..81e8cd7764fdf 100644
--- mozilla/toolkit/mozapps/extensions/internal/XPIProvider.jsm
+++ mozilla/toolkit/mozapps/extensions/internal/XPIProvider.jsm
@@ -7186,7 +7186,7 @@ AddonInternal.prototype = {
// Something is causing errors in here
try {
for (let platform of this.targetPlatforms) {
- if (platform.os == Services.appinfo.OS) {
+ if (platform.os == "Linux" || platform.os == Services.appinfo.OS) {
if (platform.abi) {
needsABI = true;
if (platform.abi === abi)