Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: lib/inspectorObserver.js

Issue 5765003219042304: EEH inspector integration fix (Closed)
Patch Set: Nits fixes Created April 15, 2014, 1:53 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« chrome/skin/devToolsOverlay.css ('K') | « chrome/skin/devToolsOverlay.css ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/inspectorObserver.js
===================================================================
--- a/lib/inspectorObserver.js
+++ b/lib/inspectorObserver.js
@@ -40,16 +40,13 @@
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 @@
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);
}
};
« chrome/skin/devToolsOverlay.css ('K') | « chrome/skin/devToolsOverlay.css ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld