Greasy Fork is available in English.

Keyword Refresher

refresh page based on keyword

< Opiniones de Keyword Refresher

Puntuación: Bueno; el script funciona tal y como promete

§
Publicado: 2/1/2024

I like your implimentation a lot.
I made a very similar script, https://greasyfork.org/en/scripts/470927-internet-guardian/code, you could shorten/simplify your code like this:

const keywords = ["keyword1", "keyword2"];
const url = window.location.href.toLowerCase();

if (keywords.some(keyword => url.includes(keyword))) {
location.reload();
}

Publicar respuesta

Inicia sesión para responder.