Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2582)

Unified Diff: chrome/browser/resources/plugins.js

Issue 2530563002: Remove the enable/disable links for the about:plugins page. (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/resources/plugins.html ('k') | chrome/browser/ui/webui/plugins/plugins.mojom » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/plugins.js
diff --git a/chrome/browser/resources/plugins.js b/chrome/browser/resources/plugins.js
index 90d6e88816a310a44a0cb70b0e3f8ee7b40392d6..8acef3c763728f2773be649a4d82ba0232f29ce7 100644
--- a/chrome/browser/resources/plugins.js
+++ b/chrome/browser/resources/plugins.js
@@ -103,34 +103,6 @@ function returnPluginsData(pluginsData) {
renderTemplate(pluginsData);
// Add handlers to dynamically created HTML elements.
- var links = document.getElementsByClassName('disable-plugin-link');
- for (var i = 0; i < links.length; i++) {
- links[i].onclick = function() {
- handleEnablePlugin(this, false, false);
- return false;
- };
- }
- links = document.getElementsByClassName('enable-plugin-link');
- for (var i = 0; i < links.length; i++) {
- links[i].onclick = function() {
- handleEnablePlugin(this, true, false);
- return false;
- };
- }
- links = document.getElementsByClassName('disable-group-link');
- for (var i = 0; i < links.length; i++) {
- links[i].onclick = function() {
- handleEnablePlugin(this, false, true);
- return false;
- };
- }
- links = document.getElementsByClassName('enable-group-link');
- for (var i = 0; i < links.length; i++) {
- links[i].onclick = function() {
- handleEnablePlugin(this, true, true);
- return false;
- };
- }
var checkboxes = document.getElementsByClassName('always-allow');
for (var i = 0; i < checkboxes.length; i++) {
checkboxes[i].onclick = function() {
@@ -172,20 +144,6 @@ function returnPluginsData(pluginsData) {
'show-tmi-mode-initial' : 'hide-tmi-mode-initial';
}
-/**
- * Handles a 'enable' or 'disable' button getting clicked.
- * @param {HTMLElement} node The HTML element for the plugin being changed.
- * @param {boolean} enable Whether to enable or disable the plugin.
- * @param {boolean} isGroup True if we're enabling/disabling a plugin group,
- * rather than a single plugin.
- */
-function handleEnablePlugin(node, enable, isGroup) {
- if (isGroup)
- browserProxy.setPluginGroupEnabled(node.path, enable);
- else
- browserProxy.setPluginEnabled(node.path, enable);
-}
-
/*
* Toggles visibility of details.
*/
« no previous file with comments | « chrome/browser/resources/plugins.html ('k') | chrome/browser/ui/webui/plugins/plugins.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698