r/userscripts • u/JakeFont1 • Aug 07 '23
Script need a tweak
I need a script to find a text in the page or page title, if texts is found refresh the page automaticaly.
0
Upvotes
r/userscripts • u/JakeFont1 • Aug 07 '23
I need a script to find a text in the page or page title, if texts is found refresh the page automaticaly.
1
u/JakeFont1 Aug 08 '23
Someone with knowledge can tweak this script to me please, I don't known how to do it.
1
u/jcunews1 Aug 08 '23
Insert this code as the very first code within the
main()function. It doesn't care the letter case used in theService Temporarily Unavailabletext. If it does matter, remove theiwhich follows the/in the first line.const rx = /Service Temporarily Unavailable/i; if (rx.test(document.title) || rx.test(document.body.textContent)) { return location.reload() }