Skip to content
This repository has been archived by the owner on Apr 22, 2022. It is now read-only.

Inject JavaScript Code

Simon Sassi edited this page Apr 23, 2019 · 4 revisions

From version 0.4.1 you can inject custom JavaScript code into websites. This is great when you want to add custom functionality to each specific service.

For example, some users want to make an Auto Refresh every X time because the service they are using, it's disconnect on inactivity. Here's an example to autorefresh every 10 minutes.

setInterval(function(){location.reload();}, 600000);

An other example is injecting custom CSS (user styles). This can be done with following snippet:

(()=>{ let css=`
/* START OF STYLE */

* {
    color: red;
}

/* END OF STYLE */
`;

var ss = document.createElement("style");
ss.type = "text/css"; ss.innerHTML = css;
document.getElementsByTagName("head")[0].appendChild(ss); })();
Clone this wiki locally