4 Inject JavaScript Code
Simon Sassi edited this page 6 years ago

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); })();