This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* This Source Code Form is subject to the terms of the Mozilla Public | |
* License, v. 2.0. If a copy of the MPL was not distributed with this | |
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | |
const { classes: Cc, interfaces: Ci, utils: Cu } = Components; | |
let EXPORTED_SYMBOLS = [ ]; | |
Cu.import("resource:///modules/devtools/gcli.jsm"); | |
Cu.import("resource://gre/modules/XPCOMUtils.jsm"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* -sp-context: browser */ | |
let domUtils = Cc["@mozilla.org/inspector/dom-utils;1"].getService(Ci.inIDOMUtils) | |
let properties = {}; | |
domUtils.getCSSPropertyNames(domUtils.INCLUDE_ALIASES) | |
.sort() | |
.filter(x=>!x.startsWith("-moz")) | |
.forEach(x=> { | |
properties[x] = domUtils.getCSSValuesForProperty(x) | |
.sort() | |
.filter(x=>!x.startsWith("-moz")); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="loader more"> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="loader"> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Converts any input box on a page to a CSS selector search and suggestion box. | |
* | |
* @constructor | |
* @param {nsIDOMDocument} aContentDocument | |
* The content document which inspector is attached to. | |
* @param {nsiInputElement|String} aInputNode | |
* The input element or the selector for teh input element to which the | |
* panel will be attached and from where search input will be taken. | |
* @param {Object} aOptions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let tempScope = {}; | |
Components.utils.import("resource:///modules/devtools/Target.jsm", tempScope); | |
let TargetFactory = tempScope.TargetFactory; | |
let target = TargetFactory.forTab(gBrowser.selectedTab); | |
gDevTools.showToolbox(target).then(function(toolbox) { | |
toolbox.selectTool("inspector").then(function(inspector) { | |
inspector.selection.setNode(window.content.document.doctype); | |
}); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Function to get the background color from an image. | |
* Its just one of the various approaches to get the result. | |
* Works for most of the cases and should be fast. | |
* It is advised to perform this kind of computation from a worker. | |
* | |
* @param imgEl [object HTMLImageElement] | |
* The image object for which background is needed. | |
* @param aDoc [object HTMLDocument] | |
* The document object. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# HG changeset patch | |
# User Girish Sharma <scrapmachines@gmail.com> | |
# Date 1347637171 -19800 | |
# Node ID da31829c11c69e85a392a4161f6167c6e2297f94 | |
# Parent a97775b456cf873ca6f809e03ff62e02028e7fe0 | |
[mq]: scratchpad | |
diff --git a/browser/devtools/webconsole/HUDService.jsm b/browser/devtools/webconsole/HUDService.jsm | |
--- a/browser/devtools/webconsole/HUDService.jsm | |
+++ b/browser/devtools/webconsole/HUDService.jsm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* This Source Code Form is subject to the terms of the Mozilla Public | |
* License, v. 2.0. If a copy of the MPL was not distributed with this | |
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | |
const { classes: Cc, interfaces: Ci, utils: Cu } = Components; | |
let EXPORTED_SYMBOLS = [ ]; | |
Cu.import("resource:///modules/devtools/gcli.jsm"); | |
Cu.import("resource://gre/modules/XPCOMUtils.jsm"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Components.utils.import("resource:///modules/devtools/gcli.jsm"); | |
gcli.addCommand({ | |
name: "exit", | |
description: "Exits GCLI and closes the Developer Toolbar", | |
returnType: "null", | |
exec: function Exit(args, context) { | |
let window = context.environment.chromeDocument.defaultView; | |
let document = window.document; |
NewerOlder