BM-2cWimYg96o7rdmFy99U5RMdQGpXrx75NCE 530ba5ccc1 Minor fixes in documentation il y a 9 ans
..
zombie 23edfc7766 Documentation updates il y a 9 ans
README.markdown 530ba5ccc1 Minor fixes in documentation il y a 9 ans
conf.json f2d0104725 Prepare version 4.0 il y a 9 ans

README.markdown

Zombie Navigator

Command-line usage example:

$ ZOMBIE_NAVIGATOR_SCRIPT_PATH=/tmp/script.js firefox

/tmp/script.js:

'use strict';

const {delay, run} = require('zombie/async');
const {console} = require('zombie/zombie');
run(function* () {
  const {openWindow, openPrivateWindow} = require('zombie/webbrowser');
  try {
    let window1 = yield openWindow('about:');
    console.log(window1.uri);
    yield delay(5); // sleep for 5 seconds

    let promise = window1.runScript(uri => {
      location.href = uri;
      return 42;
    }, 'about:buildconfig');

    yield window1.waitForReload();
    console.log((yield promise), window1.uri);

    yield delay(10.5); // sleep for 10.5 seconds
    yield window1.close();
    console.log('closed');
  } catch (e) {
    console.error('Error:', e);
  }
})
.catch(function (e) {
  // uncaught exceptions
});

Firefox (or equivalent) 38+ is required.

License

Copyright © 2016 Zombie Navigator Developers

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with this program. If not, see {@link http://www.gnu.org/licenses/}.