123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- 'use strict';
- /**
- Part of Zombie Navigator
- Copyright © 2016 Zombie Navigator Developers
-
- @file
- @license AGPL-3.0+
- */
- /*
- Zombie script example (= unprivileged)
- Do NOT require () this script from the addon code.
- */
- const {zombie, console} = require('zombie/zombie');
- const {openWindow, openPrivateWindow, closeAll} = require('zombie/webbrowser');
- const {run, delay} = require('zombie/async');
- run(function* () {
- let w = yield openPrivateWindow('about:addons');
-
- console.log(w);
- console.log(w.uri);
- yield w.runScript(function (addonID) {
- AddonManager.getAddonByID(
- addonID
- , addon => {
- unsafeWindow.gViewController.commands.cmd_showItemDetails
- .doCommand(addon, true);
- }
- );
- }, '@zombie-navigator');
- yield delay(3);
- console.log(yield w.screenshot());
-
- console.log('Done!');
- closeAll();
- });
- // vim: ts=4 noet ai
|