Greasy Fork is available in English.

Auto-Page Refresh

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

Автор
misspent
Установок в день
0
Всего установок
88
Оценки
0 0 0
Версия
4.0
Создан
12.09.2023
Обновлён
26.07.2024
Лицензия
MIT
Работает на

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.