Skip to content

Commit

Permalink
Remove unnecessary warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Kontos committed Mar 12, 2019
1 parent 61bdb81 commit 6d47f08
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 25 deletions.
25 changes: 13 additions & 12 deletions toolkit/mozapps/extensions/content/extensions.js
Original file line number Diff line number Diff line change
Expand Up @@ -657,12 +657,12 @@ var gEventManager = {
page.setAttribute("warning", "updatesecurity");
return;
}

/*
if (!AddonManager.checkCompatibility) {
page.setAttribute("warning", "checkcompatibility");
return;
}

*/
page.removeAttribute("warning");
},

Expand Down Expand Up @@ -980,7 +980,7 @@ var gViewController = {
appStartup.quit(Ci.nsIAppStartup.eAttemptQuit | Ci.nsIAppStartup.eRestart);
}
},

/*
cmd_enableCheckCompatibility: {
isEnabled() {
return true;
Expand All @@ -989,7 +989,7 @@ var gViewController = {
AddonManager.checkCompatibility = true;
}
},

*/
cmd_enableUpdateSecurity: {
isEnabled() {
return true;
Expand All @@ -998,15 +998,16 @@ var gViewController = {
AddonManager.checkUpdateSecurity = true;
}
},

/*
cmd_pluginCheck: {
isEnabled: function() {
return true;
},
doCommand: function() {
openURL(Services.urlFormatter.formatURLPref("plugins.update.url"));
}
},
}, */

cmd_toggleAutoUpdateDefault: {
isEnabled() {
Expand Down Expand Up @@ -2210,10 +2211,10 @@ var gDiscoverView = {
this._browser = document.getElementById("discover-browser");

let compatMode = "normal";
if (!AddonManager.checkCompatibility)
/* if (!AddonManager.checkCompatibility)
compatMode = "ignore";
else if (AddonManager.strictCompatibility)
compatMode = "strict";
compatMode = "strict"; */

var url = Services.prefs.getCharPref(PREF_DISCOVERURL);
url = url.replace("%COMPATIBILITY_MODE%", compatMode);
Expand Down Expand Up @@ -3487,14 +3488,14 @@ var gDetailView = {
errorLink.value = gStrings.ext.GetStringFromName("details.notification.unsigned.link");
errorLink.href = SUPPORT_URL + "unsigned-addons";
errorLink.hidden = false;
} else if (!this._addon.isCompatible && (AddonManager.checkCompatibility ||
/* } else if (!this._addon.isCompatible && (AddonManager.checkCompatibility ||
(this._addon.blocklistState != Ci.nsIBlocklistService.STATE_SOFTBLOCKED))) {
this.node.setAttribute("notification", "warning");
document.getElementById("detail-warning").textContent = gStrings.ext.formatStringFromName(
"details.notification.incompatible",
[this._addon.name, gStrings.brandShortName, gStrings.appVersion], 3
);
document.getElementById("detail-warning-link").hidden = true;
document.getElementById("detail-warning-link").hidden = true; */
} else if (this._addon.appDisabled && !this._addon.multiprocessCompatible && !ALLOW_NON_MPC) {
this.node.setAttribute("notification", "error");
document.getElementById("detail-error").textContent = gStrings.ext.formatStringFromName(
Expand All @@ -3503,15 +3504,15 @@ var gDetailView = {
let errorLink = document.getElementById("detail-error-link");
errorLink.value = gStrings.ext.GetStringFromName("details.notification.nonMpcDisabled.link");
errorLink.href = "https://wiki.mozilla.org/Add-ons/ShimsNightly";
} else if (!isCorrectlySigned(this._addon)) {
/* } else if (!isCorrectlySigned(this._addon)) {
this.node.setAttribute("notification", "warning");
document.getElementById("detail-warning").textContent = gStrings.ext.formatStringFromName(
"details.notification.unsigned", [this._addon.name, gStrings.brandShortName], 2
);
var warningLink = document.getElementById("detail-warning-link");
warningLink.value = gStrings.ext.GetStringFromName("details.notification.unsigned.link");
warningLink.href = SUPPORT_URL + "unsigned-addons";
warningLink.hidden = false;
warningLink.hidden = false; */
} else if (this._addon.blocklistState == Ci.nsIBlocklistService.STATE_SOFTBLOCKED) {
this.node.setAttribute("notification", "warning");
document.getElementById("detail-warning").textContent = gStrings.ext.formatStringFromName(
Expand Down
8 changes: 0 additions & 8 deletions toolkit/mozapps/extensions/content/extensions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1322,14 +1322,6 @@
this._errorLink.value = gStrings.ext.GetStringFromName("notification.nonMpcDisabled.link");
this._errorLink.href = "https://wiki.mozilla.org/Add-ons/ShimsNightly";
this._errorLink.hidden = false;
} else if (!isUpgrade && !isCorrectlySigned(this.mAddon)) {
this.setAttribute("notification", "warning");
this._warning.textContent = gStrings.ext.formatStringFromName(
"notification.unsigned", [this.mAddon.name, gStrings.brandShortName], 2
);
this._warningLink.value = gStrings.ext.GetStringFromName("notification.unsigned.link");
this._warningLink.href = SUPPORT_URL + "unsigned-addons";
this._warningLink.hidden = false;
} else if (!isUpgrade && this.mAddon.blocklistState == Ci.nsIBlocklistService.STATE_SOFTBLOCKED) {
this.setAttribute("notification", "warning");
this._warning.textContent = gStrings.ext.formatStringFromName(
Expand Down
10 changes: 5 additions & 5 deletions toolkit/mozapps/extensions/content/extensions.xul
Original file line number Diff line number Diff line change
Expand Up @@ -321,9 +321,9 @@
<radio id="search-filter-local" class="search-filter-radio"
label="&search.filter2.installed.label;" value="local"
tooltiptext="&search.filter2.installed.tooltip;"/>
<radio id="search-filter-remote" class="search-filter-radio"
<!-- <radio id="search-filter-remote" class="search-filter-radio"
label="&search.filter2.available.label;" value="remote"
tooltiptext="&search.filter2.available.tooltip;"/>
tooltiptext="&search.filter2.available.tooltip;"/> -->
</radiogroup>
</hbox>
<vbox id="search-loading" class="alert-container"
Expand Down Expand Up @@ -420,15 +420,15 @@
<spacer flex="5000"/> <!-- Necessary to allow the message to wrap -->
</hbox>
</hbox>
<hbox class="view-header global-info-container plugin-info-container">
<!-- <hbox class="view-header global-info-container plugin-info-container">
<hbox class="global-info" flex="1" align="center">
<button class="button-link global-info-plugincheck"
label="Check to see if your plugins are up to date"
tooltiptext="Check to see if your plugins are up to date"
command="cmd_pluginCheck"/>
<spacer flex="5000"/> <!-- Necessary to allow the message to wrap -->
<spacer flex="5000"/>
</hbox>
</hbox>
</hbox> -->
<hbox class="view-header global-info-container experiment-info-container">
<hbox class="global-info" flex="1" align="center">
<label value="&experiment.info.label;"/>
Expand Down

0 comments on commit 6d47f08

Please sign in to comment.