Skip to content

Instantly share code, notes, and snippets.

View g2p's full-sized avatar
🪓
Hacking

Gabriel de Perthuis g2p

🪓
Hacking
View GitHub Profile
@harthur
harthur / debug-chrome.js
Last active December 16, 2015 14:20
Open a Firefox devtools window that's debugging the current browser window.
/*
* Running this scratchpad in chrome mode will open a devtools window that's debugging
* the current browser window
*/
let {devtools} = Components.utils.import("resource:///modules/devtools/gDevTools.jsm", {});
let win = Services.wm.getMostRecentWindow("navigator:browser");
let target = devtools.TargetFactory.forWindow(win);
let toolbox = gDevTools.showToolbox(target, "styleeditor", "window");