[Pkg-mozext-commits] [adblock-plus-element-hiding-helper] 459/483: Issue 317 - changed selector to add inspector button before breadcrumbs while inspect button missing in FF nighly

David Prévot taffit at moszumanska.debian.org
Thu Jan 22 21:42:06 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository adblock-plus-element-hiding-helper.

commit a965f3ce9157d85f9f64d3fb973b02ba535c99f7
Author: Manvel Saroyan <manvel at adblockplus.org>
Date:   Tue Apr 15 16:16:45 2014 +0200

    Issue 317 - changed selector to add inspector button before breadcrumbs while inspect button missing in FF nighly
---
 chrome/skin/devToolsOverlay.css | 18 ++++++++++++++++++
 lib/inspectorObserver.js        | 14 ++++++++------
 2 files changed, 26 insertions(+), 6 deletions(-)

diff --git a/chrome/skin/devToolsOverlay.css b/chrome/skin/devToolsOverlay.css
new file mode 100644
index 0000000..84e0353
--- /dev/null
+++ b/chrome/skin/devToolsOverlay.css
@@ -0,0 +1,18 @@
+/*
+ * This Source Code is subject to the terms of the Mozilla Public License
+ * version 2.0 (the "License"). You can obtain a copy of the License at
+ * http://mozilla.org/MPL/2.0/.
+ */
+
+ at namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
+
+#ehh-inspector-toolbarbutton
+{
+  list-style-image: url("chrome://adblockplus/skin/abp-status-16.png");
+  -moz-image-region: rect(0px, 16px, 16px, 0px);
+}
+
+#ehh-inspector-toolbarbutton > image
+{
+  filter: none;
+}
diff --git a/lib/inspectorObserver.js b/lib/inspectorObserver.js
index e94dcc4..e2a72bc 100644
--- a/lib/inspectorObserver.js
+++ b/lib/inspectorObserver.js
@@ -40,16 +40,13 @@ let InspectorObserver =
   inspectorReady: function(eventName, toolbox, panel)
   {
     let panelWindow = panel.panelWin;
-    let inspectBtn = panelWindow.document.getElementById("inspector-inspect-toolbutton");
+    let inspectBtn = panelWindow.document.getElementById("inspector-breadcrumbs");
     if (!inspectBtn)
       return;
 
     let tooltiptext = InspectorObserver.inspectorButtonTooltip;
     button = panelWindow.document.createElement("toolbarbutton");
-    button.setAttribute("id", "inspector-abp-elemhide-toolbutton");
-    button.style.listStyleImage = "url('chrome://adblockplus/skin/abp-status-16.png')";
-    button.style.MozImageRegion = "rect(0px, 16px, 16px, 0px)";
-    button.style.paddingTop = "4px";
+    button.setAttribute("id", "ehh-inspector-toolbarbutton");
     button.setAttribute("class", "devtools-toolbarbutton");
     button.setAttribute("tooltiptext", tooltiptext);
     button.setAttribute("tabindex", "0");
@@ -58,7 +55,12 @@ let InspectorObserver =
       panelWindow.openDialog("chrome://elemhidehelper/content/composer.xul", "_blank",
                              "chrome,centerscreen,resizable,dialog=no", panel.selection.node);
     }, false);
-    inspectBtn.parentNode.insertBefore(button, inspectBtn.nextSibling);
+    
+    //Override button style for light DevTools theme
+    let style = panelWindow.document.createProcessingInstruction("xml-stylesheet", 'href="chrome://elemhidehelper/skin/devToolsOverlay.css" type="text/css"');
+    panelWindow.document.insertBefore(style, panelWindow.document.firstChild);
+    
+    inspectBtn.parentNode.insertBefore(button, inspectBtn);
   }
 };
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/adblock-plus-element-hiding-helper.git



More information about the Pkg-mozext-commits mailing list