Bug 1311420 - Add a notice to the addon manager and about:plugins about NPAPI deprecation, r=felipe

MozReview-Commit-ID: HuHbCASJiux

--HG--
extra : rebase_source : 6a0d07abd71939c078843b90662a7ed73dd4e9fd
This commit is contained in:
Benjamin Smedberg 2016-11-22 15:36:32 -05:00
Родитель 2ebbd09068
Коммит df53257c80
7 изменённых файлов: 41 добавлений и 0 удалений

Просмотреть файл

@ -21,6 +21,9 @@ description_label=Description
suffixes_label=Suffixes
learn_more_label=Learn More
deprecation_description=Missing something? Some plugins are no longer supported.
deprecation_learn_more=Learn More.
# GMP Plugins
gmp_license_info=License information
gmp_privacy_info=Privacy Information

Просмотреть файл

@ -80,3 +80,9 @@ th.type, th.suff {
th.desc {
width: 50%;
}
.notice {
background: -moz-cellhighlight;
border: 1px solid ThreeDShadow;
padding: 10px;
}

Просмотреть файл

@ -9,6 +9,8 @@
<script type="application/javascript">
"use strict";
Components.utils.import("resource://gre/modules/Services.jsm");
var Ci = Components.interfaces;
var strBundleService = Components.classes["@mozilla.org/intl/stringbundle;1"].getService(Ci.nsIStringBundleService);
var pluginsbundle = strBundleService.createBundle("chrome://global/locale/plugins.properties");
@ -72,6 +74,15 @@
enabledplugins.appendChild(document.createTextNode(pluginsbundle.GetStringFromName(label)));
fragment.appendChild(enabledplugins);
var deprecation = document.createElement("p");
deprecation.setAttribute("class", "notice");
deprecation.textContent = pluginsbundle.GetStringFromName("deprecation_description") + " \u00A0 ";
var deprecationLink = document.createElement("a");
deprecationLink.textContent = pluginsbundle.GetStringFromName("deprecation_learn_more");
deprecationLink.href = Services.urlFormatter.formatURLPref("app.support.baseURL") + "npapi";
deprecation.appendChild(deprecationLink);
fragment.appendChild(deprecation);
var stateNames = {};
["STATE_SOFTBLOCKED",
"STATE_BLOCKED",

Просмотреть файл

@ -246,3 +246,6 @@
<!ENTITY disabledUnsigned.devInfo.start "Developers interested in getting their add-ons verified can continue by reading our ">
<!ENTITY disabledUnsigned.devInfo.linkToManual "manual">
<!ENTITY disabledUnsigned.devInfo.end ".">
<!ENTITY pluginDeprecation.description "Missing something? Some plugins are no longer supported by &brandShortName;.">
<!ENTITY pluginDeprecation.learnMore "Learn More.">

Просмотреть файл

@ -198,6 +198,10 @@ setting[type="menulist"] {
display: none;
}
#addons-page .view-pane:not([type="plugin"]) #plugindeprecation-notice {
display: none;
}
#addons-page .view-pane:not([type="experiment"]) .experiment-info-container {
display: none;
}

Просмотреть файл

@ -2757,6 +2757,13 @@ var gListView = {
} catch (e) {
document.getElementById("signing-dev-info").hidden = true;
}
if (Preferences.get("plugin.load_flash_only", true)) {
document.getElementById("plugindeprecation-learnmore-link")
.setAttribute("href", Services.urlFormatter.formatURLPref("app.support.baseURL") + "npapi");
} else {
document.getElementById("plugindeprecation-notice").hidden = true;
}
},
show: function(aType, aRequest) {

Просмотреть файл

@ -353,6 +353,13 @@
&disabledUnsigned.devInfo.start;<label class="text-link plain" id="signing-dev-manual-link">&disabledUnsigned.devInfo.linkToManual;</label>&disabledUnsigned.devInfo.end;
</description>
</vbox>
<vbox id="plugindeprecation-notice" class="alert-container">
<hbox class="alert">
<description>&pluginDeprecation.description; &#160;
<label class="text-link plain" id="plugindeprecation-learnmore-link">&pluginDeprecation.learnMore;</label>
</description>
</hbox>
</vbox>
<hbox class="view-header global-warning-container">
<!-- global warnings -->
<hbox class="global-warning" flex="1">