qutejs
v1.1.1
Published
> A library for building qutebrowser userscripts with nodejs
Downloads
11
Readme
qutejs
A library for building qutebrowser userscripts with nodejs
Usage
const qutejs = require('qutejs');
qutejs.jseval([], function () {
alert('Hello World');
});
See the examples for some basic examples.
NOTE: Commands are camel-cased e.g the command adblock-update
becomes adblockUpdate
as shown in examples/adblockupdate.js.
Commands take either multiple function arguments or an array of options. There is one special case being jseval (as shown above).
The jseval function allows you to pass a function as the second argument which is parsed by qutejs. If the function is undefined we will assume the javascript to be executed is contained within the options array.
Running extra commands
If for some reason a command isn't directly exposed by qutejs you can directly execute commands to the $QUTE_FIFO
using the _execFifo method as follows:
const qutejs = require('qutejs');
qutejs._execFifo(null, ['open','-t','https://duckduckgo.com']);
This command is prefixed with an underscore due to the unlikely event that qutebrowser introduces an execFifo command.