Auto-Page Refresh

Automatically refresh the page if specific errors are detected in specified divs

Maker
misspent
Dagelijks aantal installaties
0
Totaal aantal installaties
68
Beoordelingen
0 0 0
Versie
4.0
Gemaakt op
12-09-2023
Bijgewerkt op
21-04-2024
Licentie
MIT
Wordt toegepast op

I had enough of having to click when something had a stroke, so I “created” this. It has worked well so far, and it has made me want to cry with joy a few times, so I thought I'd upload it here.

  • If you notice something that should refresh but doesn't, just let me know.
  • You can customize it, add text you want it to refresh when it detects it, and whitelist sites yourself. It does work on many sites, but I'm rather lazy, so I used @include.

Description (21/04/2024):

The script is designed to automatically refresh the page if specific errors are detected within specified div elements. It utilizes MutationObserver to monitor changes in the DOM and triggers a reload if the defined conditions are met.

What You Can Do:

  1. Specify Target Divs: You can specify the div elements (div) within the document to monitor for errors.
  2. Check for Specific Text: You can optionally specify specific text (text) within the target divs to trigger a reload if found.
  3. Set Individual Delay: You can optionally set a delay (delay) for each target, allowing you to customize the timing of checks.

Usage Notes:

  • Ensure that the specified div elements accurately represent error conditions on the page.
  • Use the optional text parameter to narrow down specific error messages within the target divs.
  • Customize the delay parameter to control the timing of checks for each target.
  • Keep in mind that excessive use of delays or frequent page reloads may impact user experience negatively.