Reload on error message

Reload the page on an error message you set yourself

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey, το Greasemonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

You will need to install an extension such as Tampermonkey to install this script.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Userscripts για να εγκαταστήσετε αυτόν τον κώδικα.

You will need to install an extension such as Tampermonkey to install this script.

Θα χρειαστεί να εγκαταστήσετε μια επέκταση διαχείρισης κώδικα χρήστη για να εγκαταστήσετε αυτόν τον κώδικα.

(Έχω ήδη έναν διαχειριστή κώδικα χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Έχω ήδη έναν διαχειριστή στυλ χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

// ==UserScript==
// @name        Reload on error message
// @namespace   http://userscripts.org/users/23652
// @description Reload the page on an error message you set yourself
// @version     0.5
// @copyright   JoeSimmons, Nickel
// @grant       none
// @include     *
// ==/UserScript==

// Add your errors here to the pattern ///////////////
var errors = [];
errors[0] = /Too many connections. Please try again later./i;
errors[1] = /Mysql error, could not connectToo many connections/i;
errors[2] = /max_user_connections/i;
errors[3] = /502 Bad Gateway/i;
errors[4] = /504 Gateway Time-out/i;
errors[5] = /Something broke/i;
errors[6] = /Imgur is over capacity!/i;
errors[7] = /The database timed out running your query./i;
errors[8] = /we took too long to make this page for you/i;
//////////////////////////////////////////////////////

function check() {
	for(var i=0; i<errors.length; i++) {
		if( errors[i].test(document.body.textContent) ){
			window.location.reload();
		}
	}

}

setTimeout(check, 250);