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: Fix for light DevTools theme Created April 15, 2014, 10:12 a.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,7 +40,7 @@
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;
@@ -58,7 +58,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", 'class="elemhidehelper-node" href="chrome://elemhidehelper/skin/devToolsOverlay.css" type="text/css"');
Wladimir Palant 2014/04/15 13:38:19 Nit: class attribute is unnecessary if we aren't g
saroyanm 2014/04/15 13:54:43 Done.
+ 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