Greasy Fork is available in English.

Keyword Refresher

refresh page based on keyword

< Feedback on Keyword Refresher

Review: Good - script works

§
Posted: 2024.01.02.

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

Post reply

Sign in to post a reply.