-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathscratchpad.js
More file actions
25 lines (20 loc) · 760 Bytes
/
scratchpad.js
File metadata and controls
25 lines (20 loc) · 760 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// Sample Firefox scratchpad to test BDGG in sidebar
// IMPORTANT: Must set scratchpad to Browser Context
// The sidebar must be visible
let w = document.getElementById("sidebar_chat").contentWindow;
/* Doesn't work
if (!w) {
alert("This window is yet to be created");
} else {
XPCOMUtils.defineLazyModuleGetter(this, "Toolbox",
"resource:///modules/devtools/Toolbox.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "TargetFactory",
"resource:///modules/devtools/Target.jsm");
let target = TargetFactory.forWindow(w);
let toolbox = gDevTools.getToolbox(target);
toolbox ? toolbox.destroy() : gDevTools.showToolbox(target, undefined, "window");
}
*/
let bdgg = w.wrappedJSObject.BetterDGG;
//bdgg.test.chat.error()
//etc.