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

Side by Side Diff: lib/inspectorObserver.js

Issue 6520005931827200: Issue 2259 - Removed non-standard JavaScript code from Element Hiding Helper (Closed)
Patch Set: Turned knownClasses into a Set as well Created April 4, 2015, 3:28 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
OLDNEW
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 14 matching lines...) Expand all
25 gDevTools.off("inspector-ready", this.inspectorReady); 25 gDevTools.off("inspector-ready", this.inspectorReady);
26 }.bind(this)); 26 }.bind(this));
27 }, 27 },
28 28
29 get inspectorButtonTooltip() 29 get inspectorButtonTooltip()
30 { 30 {
31 // Randomize URI to work around bug 719376 31 // Randomize URI to work around bug 719376
32 let stringBundle = Services.strings.createBundle("chrome://elemhidehelper/lo cale/global.properties?" + Math.random()); 32 let stringBundle = Services.strings.createBundle("chrome://elemhidehelper/lo cale/global.properties?" + Math.random());
33 let result = stringBundle.GetStringFromName("inspector.button.tooltiptext"); 33 let result = stringBundle.GetStringFromName("inspector.button.tooltiptext");
34 34
35 delete this.inspectorButtonTooltip; 35 Object.defineProperty(this, "inspectorButtonTooltip", {value: result, enumer able: true});
36 this.__defineGetter__("inspectorButtonTooltip", function() result);
37 return this.inspectorButtonTooltip; 36 return this.inspectorButtonTooltip;
38 }, 37 },
39 38
40 inspectorReady: function(eventName, toolbox, panel) 39 inspectorReady: function(eventName, toolbox, panel)
41 { 40 {
42 let panelWindow = panel.panelWin; 41 let panelWindow = panel.panelWin;
43 let inspectBtn = panelWindow.document.getElementById("inspector-breadcrumbs" ); 42 let inspectBtn = panelWindow.document.getElementById("inspector-breadcrumbs" );
44 if (!inspectBtn) 43 if (!inspectBtn)
45 return; 44 return;
46 45
(...skipping 11 matching lines...) Expand all
58 57
59 //Override button style for light DevTools theme 58 //Override button style for light DevTools theme
60 let style = panelWindow.document.createProcessingInstruction("xml-stylesheet ", 'href="chrome://elemhidehelper/skin/devToolsOverlay.css" type="text/css"'); 59 let style = panelWindow.document.createProcessingInstruction("xml-stylesheet ", 'href="chrome://elemhidehelper/skin/devToolsOverlay.css" type="text/css"');
61 panelWindow.document.insertBefore(style, panelWindow.document.firstChild); 60 panelWindow.document.insertBefore(style, panelWindow.document.firstChild);
62 61
63 inspectBtn.parentNode.insertBefore(button, inspectBtn); 62 inspectBtn.parentNode.insertBefore(button, inspectBtn);
64 } 63 }
65 }; 64 };
66 65
67 InspectorObserver.init(); 66 InspectorObserver.init();
OLDNEW
« chrome/content/composer.js ('K') | « lib/aardvark.js ('k') | lib/main.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld