From 003c8f0d7a1b7a5020b3bf03fe8fb0c7da13eb53 Mon Sep 17 00:00:00 2001
From: Mike Perry <mikeperry-git@torproject.org>
Date: Thu, 28 Feb 2013 17:41:57 -0800
Subject: [PATCH 26/41] Remove "This plugin is disabled" barrier.

We do not want to encourage our users to enable plugins at this point.

The barrier also causes bad UX for HTML5 video fallback on YouTube.
---
 browser/base/content/browser-plugins.js           | 6 ++++--
 toolkit/mozapps/plugins/content/pluginProblem.xml | 2 +-
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/browser/base/content/browser-plugins.js b/browser/base/content/browser-plugins.js
index c2abebf..655c2bf 100644
--- a/browser/base/content/browser-plugins.js
+++ b/browser/base/content/browser-plugins.js
@@ -228,8 +228,10 @@ var gPluginHandler = {
         break;
 
       case "PluginDisabled":
-        let manageLink = doc.getAnonymousElementByAttribute(plugin, "class", "managePluginsLink");
-        self.addLinkClickCallback(manageLink, "managePlugins");
+        // Screw the disabled message. It messes with HTML5 fallback on YouTube
+        let plugin_overlay = doc.getAnonymousElementByAttribute(plugin, "class", "mainBox");
+        if (plugin_overlay != null)
+          plugin_overlay.style.visibility = "hidden";
         break;
 
       case "PluginScripted":
diff --git a/toolkit/mozapps/plugins/content/pluginProblem.xml b/toolkit/mozapps/plugins/content/pluginProblem.xml
index f61cb48..ed83569 100644
--- a/toolkit/mozapps/plugins/content/pluginProblem.xml
+++ b/toolkit/mozapps/plugins/content/pluginProblem.xml
@@ -38,7 +38,7 @@
             <html:div class="installStatus">
                 <html:div class="msg msgInstallPlugin"><html:a class="installPluginLink" href="">&installPlugin;</html:a></html:div>
             </html:div>
-            <html:div class="msg msgManagePlugins"><html:a class="managePluginsLink" href="">&managePlugins;</html:a></html:div>
+            <html:div class="msg msgManagePlugins"><html:a class="managePluginsLink" href=""></html:a></html:div>
             <html:div class="submitStatus">
                 <!-- links set at runtime -->
                 <html:div class="msg msgPleaseSubmit"><html:a class="pleaseSubmitLink" href="">&report.please;</html:a></html:div>
-- 
1.8.1.2

