Fixed Setup Creator

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

2015-09-07 기준 버전입니다. 최신 버전을 확인하세요.

이 스크립트를 설치하려면 Tampermonkey, Greasemonkey 또는 Violentmonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey와 같은 확장 프로그램을 설치해야 합니다.

이 스크립트를 설치하려면 Tampermonkey 또는 Violentmonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey 또는 Userscripts와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 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);
	}
};