2002-09-28 16:14:15 +04:00
|
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
2002-07-16 02:50:49 +04:00
|
|
|
|
2012-05-21 15:12:37 +04:00
|
|
|
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
2001-05-09 11:56:23 +04:00
|
|
|
|
2002-07-16 02:50:49 +04:00
|
|
|
<html>
|
2000-09-29 04:04:23 +04:00
|
|
|
<head>
|
2007-05-23 22:08:10 +04:00
|
|
|
<script type="application/javascript">
|
2012-10-14 22:21:00 +04:00
|
|
|
"use strict";
|
|
|
|
|
2016-11-22 23:36:32 +03:00
|
|
|
Components.utils.import("resource://gre/modules/Services.jsm");
|
|
|
|
|
2013-01-26 21:59:31 +04:00
|
|
|
var Ci = Components.interfaces;
|
|
|
|
var strBundleService = Components.classes["@mozilla.org/intl/stringbundle;1"].getService(Ci.nsIStringBundleService);
|
2004-06-20 05:42:05 +04:00
|
|
|
var pluginsbundle = strBundleService.createBundle("chrome://global/locale/plugins.properties");
|
2003-01-22 00:04:23 +03:00
|
|
|
|
|
|
|
document.writeln("<title>" + pluginsbundle.GetStringFromName("title_label") + "<\/title>");
|
2002-09-28 16:14:15 +04:00
|
|
|
</script>
|
2006-08-07 20:06:03 +04:00
|
|
|
<link rel="stylesheet" type="text/css" href="chrome://global/content/plugins.css">
|
2004-06-20 05:42:05 +04:00
|
|
|
<link rel="stylesheet" type="text/css" href="chrome://global/skin/plugins.css">
|
2000-09-29 04:04:23 +04:00
|
|
|
</head>
|
|
|
|
<body>
|
2002-09-28 16:14:15 +04:00
|
|
|
<div id="outside">
|
2007-05-23 22:08:10 +04:00
|
|
|
<script type="application/javascript">
|
2017-02-07 13:52:06 +03:00
|
|
|
/* eslint-env mozilla/frame-script */
|
|
|
|
|
2012-10-14 22:21:00 +04:00
|
|
|
"use strict";
|
2000-09-22 11:51:47 +04:00
|
|
|
|
2009-01-30 11:13:17 +03:00
|
|
|
function setDirection() {
|
|
|
|
var frame = document.getElementById("directionDetector");
|
|
|
|
var direction = frame.contentDocument
|
|
|
|
.defaultView
|
|
|
|
.window
|
2017-01-27 12:51:02 +03:00
|
|
|
.getComputedStyle(frame.contentDocument.getElementById("target"))
|
2009-01-30 11:13:17 +03:00
|
|
|
.getPropertyValue("direction");
|
|
|
|
document.body.removeChild(frame);
|
|
|
|
document.dir = direction;
|
|
|
|
}
|
|
|
|
|
|
|
|
function setupDirection() {
|
|
|
|
var frame = document.createElement("iframe");
|
|
|
|
frame.setAttribute("id", "directionDetector");
|
|
|
|
frame.setAttribute("src", "chrome://global/content/directionDetector.html");
|
|
|
|
frame.setAttribute("width", "0");
|
|
|
|
frame.setAttribute("height", "0");
|
|
|
|
frame.setAttribute("style", "visibility: hidden;");
|
|
|
|
frame.setAttribute("onload", "setDirection();");
|
|
|
|
document.body.appendChild(frame);
|
|
|
|
}
|
|
|
|
setupDirection();
|
|
|
|
|
2002-09-28 16:14:15 +04:00
|
|
|
/* JavaScript to enumerate and display all installed plug-ins
|
|
|
|
|
|
|
|
* First, refresh plugins in case anything has been changed recently in
|
|
|
|
* prefs: (The "false" argument tells refresh not to reload or activate
|
|
|
|
* any plug-ins that would be active otherwise. In contrast, one would
|
|
|
|
* use "true" in the case of ASD instead of restarting)
|
|
|
|
*/
|
|
|
|
navigator.plugins.refresh(false);
|
|
|
|
|
2015-01-08 23:40:14 +03:00
|
|
|
addMessageListener("PluginList", function({ data: aPlugins }) {
|
2012-10-14 22:21:00 +04:00
|
|
|
var fragment = document.createDocumentFragment();
|
|
|
|
|
2013-04-30 23:12:54 +04:00
|
|
|
// "Installed plugins"
|
2012-10-14 22:21:00 +04:00
|
|
|
var id, label;
|
|
|
|
if (aPlugins.length > 0) {
|
|
|
|
id = "plugs";
|
2013-04-30 23:12:54 +04:00
|
|
|
label = "installedplugins_label";
|
2012-10-14 22:21:00 +04:00
|
|
|
} else {
|
|
|
|
id = "noplugs";
|
2013-04-30 23:12:54 +04:00
|
|
|
label = "nopluginsareinstalled_label";
|
2012-10-14 22:21:00 +04:00
|
|
|
}
|
|
|
|
var enabledplugins = document.createElement("h1");
|
|
|
|
enabledplugins.setAttribute("id", id);
|
|
|
|
enabledplugins.appendChild(document.createTextNode(pluginsbundle.GetStringFromName(label)));
|
|
|
|
fragment.appendChild(enabledplugins);
|
|
|
|
|
2016-11-22 23:36:32 +03:00
|
|
|
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);
|
|
|
|
|
2013-01-26 21:59:31 +04:00
|
|
|
var stateNames = {};
|
|
|
|
["STATE_SOFTBLOCKED",
|
|
|
|
"STATE_BLOCKED",
|
|
|
|
"STATE_OUTDATED",
|
|
|
|
"STATE_VULNERABLE_UPDATE_AVAILABLE",
|
|
|
|
"STATE_VULNERABLE_NO_UPDATE"].forEach(function(label) {
|
2013-02-28 16:46:42 +04:00
|
|
|
stateNames[Ci.nsIBlocklistService[label]] = label;
|
2013-01-26 21:59:31 +04:00
|
|
|
});
|
2013-02-28 16:46:42 +04:00
|
|
|
|
2012-10-14 22:21:00 +04:00
|
|
|
for (var i = 0; i < aPlugins.length; i++) {
|
|
|
|
var plugin = aPlugins[i];
|
2013-01-26 21:59:31 +04:00
|
|
|
if (plugin) {
|
2012-10-14 22:21:00 +04:00
|
|
|
// "Shockwave Flash"
|
|
|
|
var plugname = document.createElement("h2");
|
|
|
|
plugname.setAttribute("class", "plugname");
|
|
|
|
plugname.appendChild(document.createTextNode(plugin.name));
|
|
|
|
fragment.appendChild(plugname);
|
|
|
|
|
|
|
|
var dl = document.createElement("dl");
|
|
|
|
fragment.appendChild(dl);
|
|
|
|
|
|
|
|
// "File: Flash Player.plugin"
|
|
|
|
var fileDd = document.createElement("dd");
|
|
|
|
var file = document.createElement("span");
|
|
|
|
file.setAttribute("class", "label");
|
|
|
|
file.appendChild(document.createTextNode(pluginsbundle.GetStringFromName("file_label") + " "));
|
|
|
|
fileDd.appendChild(file);
|
|
|
|
fileDd.appendChild(document.createTextNode(plugin.pluginLibraries));
|
|
|
|
dl.appendChild(fileDd);
|
|
|
|
|
2013-02-28 16:46:42 +04:00
|
|
|
// "Path: /usr/lib/mozilla/plugins/libtotem-cone-plugin.so"
|
|
|
|
var pathDd = document.createElement("dd");
|
|
|
|
var path = document.createElement("span");
|
|
|
|
path.setAttribute("class", "label");
|
|
|
|
path.appendChild(document.createTextNode(pluginsbundle.GetStringFromName("path_label") + " "));
|
|
|
|
pathDd.appendChild(path);
|
|
|
|
pathDd.appendChild(document.createTextNode(plugin.pluginFullpath));
|
|
|
|
dl.appendChild(pathDd);
|
|
|
|
|
2012-10-14 22:21:00 +04:00
|
|
|
// "Version: "
|
|
|
|
var versionDd = document.createElement("dd");
|
|
|
|
var version = document.createElement("span");
|
|
|
|
version.setAttribute("class", "label");
|
|
|
|
version.appendChild(document.createTextNode(pluginsbundle.GetStringFromName("version_label") + " "));
|
|
|
|
versionDd.appendChild(version);
|
|
|
|
versionDd.appendChild(document.createTextNode(plugin.version));
|
|
|
|
dl.appendChild(versionDd);
|
|
|
|
|
2013-01-26 21:59:31 +04:00
|
|
|
// "State: "
|
|
|
|
var stateDd = document.createElement("dd");
|
|
|
|
var state = document.createElement("span");
|
|
|
|
state.setAttribute("label", "state");
|
|
|
|
state.appendChild(document.createTextNode(pluginsbundle.GetStringFromName("state_label") + " "));
|
|
|
|
stateDd.appendChild(state);
|
2016-03-16 22:32:00 +03:00
|
|
|
var status = plugin.isActive ? pluginsbundle.GetStringFromName("state_enabled") : pluginsbundle.GetStringFromName("state_disabled");
|
2013-01-26 21:59:31 +04:00
|
|
|
if (plugin.blocklistState in stateNames) {
|
|
|
|
status += " (" + stateNames[plugin.blocklistState] + ")";
|
|
|
|
}
|
|
|
|
stateDd.appendChild(document.createTextNode(status));
|
|
|
|
dl.appendChild(stateDd);
|
|
|
|
|
2012-10-14 22:21:00 +04:00
|
|
|
// Plugin Description
|
|
|
|
var descDd = document.createElement("dd");
|
|
|
|
descDd.appendChild(document.createTextNode(plugin.description));
|
|
|
|
dl.appendChild(descDd);
|
|
|
|
|
|
|
|
// MIME Type table
|
|
|
|
var mimetypeTable = document.createElement("table");
|
|
|
|
mimetypeTable.setAttribute("border", "1");
|
|
|
|
mimetypeTable.setAttribute("class", "contenttable");
|
|
|
|
fragment.appendChild(mimetypeTable);
|
|
|
|
|
|
|
|
var thead = document.createElement("thead");
|
|
|
|
mimetypeTable.appendChild(thead);
|
|
|
|
var tr = document.createElement("tr");
|
|
|
|
thead.appendChild(tr);
|
|
|
|
|
|
|
|
// "MIME Type" column header
|
|
|
|
var typeTh = document.createElement("th");
|
|
|
|
typeTh.setAttribute("class", "type");
|
|
|
|
typeTh.appendChild(document.createTextNode(pluginsbundle.GetStringFromName("mimetype_label")));
|
|
|
|
tr.appendChild(typeTh);
|
|
|
|
|
|
|
|
// "Description" column header
|
|
|
|
var descTh = document.createElement("th");
|
|
|
|
descTh.setAttribute("class", "desc");
|
|
|
|
descTh.appendChild(document.createTextNode(pluginsbundle.GetStringFromName("description_label")));
|
|
|
|
tr.appendChild(descTh);
|
|
|
|
|
|
|
|
// "Suffixes" column header
|
|
|
|
var suffixesTh = document.createElement("th");
|
|
|
|
suffixesTh.setAttribute("class", "suff");
|
|
|
|
suffixesTh.appendChild(document.createTextNode(pluginsbundle.GetStringFromName("suffixes_label")));
|
|
|
|
tr.appendChild(suffixesTh);
|
|
|
|
|
|
|
|
var tbody = document.createElement("tbody");
|
|
|
|
mimetypeTable.appendChild(tbody);
|
|
|
|
|
|
|
|
var mimeTypes = plugin.pluginMimeTypes;
|
|
|
|
for (var j = 0; j < mimeTypes.length; j++) {
|
|
|
|
var mimetype = mimeTypes[j];
|
|
|
|
if (mimetype) {
|
|
|
|
var mimetypeRow = document.createElement("tr");
|
|
|
|
tbody.appendChild(mimetypeRow);
|
|
|
|
|
|
|
|
// "application/x-shockwave-flash"
|
|
|
|
var typename = document.createElement("td");
|
|
|
|
typename.appendChild(document.createTextNode(mimetype.type));
|
|
|
|
mimetypeRow.appendChild(typename);
|
|
|
|
|
|
|
|
// "Shockwave Flash"
|
|
|
|
var description = document.createElement("td");
|
|
|
|
description.appendChild(document.createTextNode(mimetype.description));
|
|
|
|
mimetypeRow.appendChild(description);
|
|
|
|
|
|
|
|
// "swf"
|
|
|
|
var suffixes = document.createElement("td");
|
|
|
|
suffixes.appendChild(document.createTextNode(mimetype.suffixes));
|
|
|
|
mimetypeRow.appendChild(suffixes);
|
|
|
|
}
|
2002-09-28 16:14:15 +04:00
|
|
|
}
|
2001-05-09 11:56:23 +04:00
|
|
|
}
|
2002-09-28 16:14:15 +04:00
|
|
|
}
|
2012-10-14 22:21:00 +04:00
|
|
|
|
|
|
|
document.getElementById("outside").appendChild(fragment);
|
|
|
|
});
|
2015-01-08 23:40:14 +03:00
|
|
|
|
|
|
|
sendAsyncMessage("RequestPlugins");
|
2000-09-29 04:04:23 +04:00
|
|
|
</script>
|
2001-05-09 11:56:23 +04:00
|
|
|
</div>
|
2000-09-29 04:04:23 +04:00
|
|
|
</body>
|
|
|
|
</html>
|