Fixed Setup Creator

Fixes the setup creator so you no longer have an infinite loading message.

2015-09-07 या दिनांकाला. सर्वात नवीन आवृत्ती पाहा.

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey, Greasemonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

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

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

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

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्क्रिप्ट व्यवस्थापक एक्स्टेंशन इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्क्रिप्ट व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्टाईल व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

// ==UserScript==
// @name         Fixed Setup Creator
// @namespace    https://greasyfork.org/en/users/9694-croned
// @version      1.0
// @description  Fixes the setup creator so you no longer have an infinite loading message.
// @author       Croned
// @match        https://epicmafia.com/game/new
// @grant        none
// ==/UserScript==

window.creategame_update = function(data) {
	var button, o, status, str, redirect, msg;
	if ($.isArray(data)) {
		status = data[0], o = data[1];
		if (o.redirect) {
			window.location.reload(true);
		}
		if (!status) {
			if (o.redirect) {
				window.location.href = o.redirect;
			}
			poptog('#pop_warn');
			errordisplay('.error', o.msg);
			if (o.code) {
				button = $("<a href='/lobby/setup/" + o.id + "' class='button create'>Setup " + o.id + "</a>");
				$('#createbuttons').append(button);
			}
			return $('#setupsubmit').attr('disabled', false);
		}
		else {
			str = '/game/' + o.table;
			if (o.password) {
				str += '?password=' + o.password;
			}
			return window.location = str;
		}
	}
	else {
		status = data.status, redirect = data.redirect, msg = data.msg;
		if (redirect) {
			window.location.href = redirect;
		}
		poptog('#pop_warn');
		errordisplay('.error', msg);
		return $('#setupsubmit').attr('disabled', false);
	}
};