Overview
A user script is a customizable script you can add to your Sessions.
The script executes on every page you visit. The possibilities are endless!
Overview
A user script is programming that modifies the appearance or behavior of a website. A user script, for example, can automatically perform tasks on websites or disable things like advertisements.
user-script.js
Skeleton Script
Simply export
a function in your user-script.js
file.
The user-script.js
script runs on every page navigation
module.exports = function () {
}
Using Node.js Modules in user-script.js
From within the user-script.js
script you can require
any Node.js module that is a dependency in Somiibo.
Visit somiibo://developer and go to the "Using Node.js Modules" tab to see the currently supported modules.
user-script.js
Example Script
module.exports = function () {
// This script has access to Node.js and it's modules
const { get, set } = require('lodash');
console.log('Hello, World!');
// We can attach event listeners
document.addEventListener('click', function (event) {
console.log('Clicked', event);
})
// We can automatically click on elements
setTimeout(function () {
document.body.click();
}, 1000);
// The posibilities are endless!
}