| 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); |
| } |
| }; |