From cf37e8b454a8478854778c8dd27700cdc0be247e Mon Sep 17 00:00:00 2001 From: John Foerch Date: Thu, 25 Feb 2010 15:41:00 -0500 Subject: [PATCH] dom-inspector.js: whitespace, style, 'require' fix --- modules/extensions/dom-inspector.js | 103 +++++++++++++++++++----------------- 1 file changed, 53 insertions(+), 50 deletions(-) rewrite modules/extensions/dom-inspector.js (70%) diff --git a/modules/extensions/dom-inspector.js b/modules/extensions/dom-inspector.js dissimilarity index 70% index 96b7d4e..6b8d862 100644 --- a/modules/extensions/dom-inspector.js +++ b/modules/extensions/dom-inspector.js @@ -1,50 +1,53 @@ -/** - * (C) Copyright 2008 Jeremy Maitin-Shepard - * - * Use, modification, and distribution are subject to the terms specified in the - * COPYING file. -**/ - -require("window.js"); -require("utils.js"); - -if (!extension_is_enabled("inspector@mozilla.org")) - throw skip_module_load; - -function open_dom_inspector() { - make_chrome_window("chrome://inspector/content/"); -} - -function inspect_dom_document(document) { - make_chrome_window("chrome://inspector/content/", document); -} - -function inspect_dom_node(node) { - make_chrome_window("chrome://inspector/content/", node); -} - -function inspect_javascript_object(obj) { - make_chrome_window("chrome://inspector/content/object.xul", obj); -} - -interactive("inspector", "Open the DOM Inspector in a new window.", - function (I) { open_dom_inspector(); }); - -interactive("inspect-chrome", "Inspect the chrome document for the current Conkeror window.", - function (I) {inspect_dom_document(I.window.document);}); - -interactive("inspect-page", "Inspect the current content document.", - function (I) {inspect_dom_document(I.buffer.document);}); - -interactive("inspect-click", "Inspect the target of the next mouse click.", - function (I) { - var window = I.window; - function handler(e) { - e.preventDefault(); - e.stopPropagation(); - window.removeEventListener("click", arguments.callee, true); - inspect_dom_node(e.target); - } - window.addEventListener("click", handler, true); - I.minibuffer.message("Click in this window to select the DOM node to inspect."); - }); +/** + * (C) Copyright 2008 Jeremy Maitin-Shepard + * + * Use, modification, and distribution are subject to the terms specified in the + * COPYING file. +**/ + +require("extension.js"); + +if (!extension_is_enabled("inspector@mozilla.org")) + throw skip_module_load; + +function open_dom_inspector () { + make_chrome_window("chrome://inspector/content/"); +} + +function inspect_dom_document (document) { + make_chrome_window("chrome://inspector/content/", document); +} + +function inspect_dom_node (node) { + make_chrome_window("chrome://inspector/content/", node); +} + +function inspect_javascript_object (obj) { + make_chrome_window("chrome://inspector/content/object.xul", obj); +} + +interactive("inspector", + "Open the DOM Inspector in a new window.", + open_dom_inspector); + +interactive("inspect-chrome", + "Inspect the chrome document for the current Conkeror window.", + function (I) { inspect_dom_document(I.window.document); }); + +interactive("inspect-page", + "Inspect the current content document.", + function (I) { inspect_dom_document(I.buffer.document); }); + +interactive("inspect-click", + "Inspect the target of the next mouse click.", + function (I) { + var window = I.window; + function handler (e) { + e.preventDefault(); + e.stopPropagation(); + window.removeEventListener("click", arguments.callee, true); + inspect_dom_node(e.target); + } + window.addEventListener("click", handler, true); + I.minibuffer.message("Click in this window to select the DOM node to inspect."); + }); -- 2.11.4.GIT