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

Delta Between Two Patch Sets: lib/inspectorObserver.js

Issue 5765003219042304: EEH inspector integration fix (Closed)
Left Patch Set: Created April 14, 2014, 3:30 p.m.
Right Patch Set: Nits fixes Created April 15, 2014, 1:53 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« chrome/skin/devToolsOverlay.css ('K') | « chrome/skin/devToolsOverlay.css ('k') | no next file » | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 /* 1 /*
2 * This Source Code is subject to the terms of the Mozilla Public License 2 * This Source Code is subject to the terms of the Mozilla Public License
3 * version 2.0 (the "License"). You can obtain a copy of the License at 3 * version 2.0 (the "License"). You can obtain a copy of the License at
4 * http://mozilla.org/MPL/2.0/. 4 * http://mozilla.org/MPL/2.0/.
5 */ 5 */
6 6
7 let InspectorObserver = 7 let InspectorObserver =
8 { 8 {
9 init: function() 9 init: function()
10 { 10 {
(...skipping 28 matching lines...) Expand all
39 39
40 inspectorReady: function(eventName, toolbox, panel) 40 inspectorReady: function(eventName, toolbox, panel)
41 { 41 {
42 let panelWindow = panel.panelWin; 42 let panelWindow = panel.panelWin;
43 let inspectBtn = panelWindow.document.getElementById("inspector-breadcrumbs" ); 43 let inspectBtn = panelWindow.document.getElementById("inspector-breadcrumbs" );
44 if (!inspectBtn) 44 if (!inspectBtn)
45 return; 45 return;
46 46
47 let tooltiptext = InspectorObserver.inspectorButtonTooltip; 47 let tooltiptext = InspectorObserver.inspectorButtonTooltip;
48 button = panelWindow.document.createElement("toolbarbutton"); 48 button = panelWindow.document.createElement("toolbarbutton");
49 button.setAttribute("id", "inspector-abp-elemhide-toolbutton"); 49 button.setAttribute("id", "ehh-inspector-toolbarbutton");
50 button.style.listStyleImage = "url('chrome://adblockplus/skin/abp-status-16. png')";
51 button.style.MozImageRegion = "rect(0px, 16px, 16px, 0px)";
52 button.style.paddingTop = "4px";
53 button.setAttribute("class", "devtools-toolbarbutton"); 50 button.setAttribute("class", "devtools-toolbarbutton");
saroyanm 2014/04/14 15:38:01 Wladimir I have doubt regarding the ABP button loo
Wladimir Palant 2014/04/14 21:40:40 No, we are not. This is only an issue with the li
saroyanm 2014/04/15 10:21:49 Thanks for notes, Done.
54 button.setAttribute("tooltiptext", tooltiptext); 51 button.setAttribute("tooltiptext", tooltiptext);
55 button.setAttribute("tabindex", "0"); 52 button.setAttribute("tabindex", "0");
56 button.addEventListener("command", function() 53 button.addEventListener("command", function()
57 { 54 {
58 panelWindow.openDialog("chrome://elemhidehelper/content/composer.xul", "_b lank", 55 panelWindow.openDialog("chrome://elemhidehelper/content/composer.xul", "_b lank",
59 "chrome,centerscreen,resizable,dialog=no", panel.se lection.node); 56 "chrome,centerscreen,resizable,dialog=no", panel.se lection.node);
60 }, false); 57 }, false);
58
59 //Override button style for light DevTools theme
60 let style = panelWindow.document.createProcessingInstruction("xml-stylesheet ", 'href="chrome://elemhidehelper/skin/devToolsOverlay.css" type="text/css"');
61 panelWindow.document.insertBefore(style, panelWindow.document.firstChild);
62
61 inspectBtn.parentNode.insertBefore(button, inspectBtn); 63 inspectBtn.parentNode.insertBefore(button, inspectBtn);
62 } 64 }
63 }; 65 };
64 66
65 InspectorObserver.init(); 67 InspectorObserver.init();
LEFTRIGHT

Powered by Google App Engine
This is Rietveld