Reload 4 Kong *OLD*

Reload games without refreshing the page.

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name           Reload 4 Kong *OLD*
// @namespace      tag://kongregate
// @description    Reload games without refreshing the page.
// @author         SReject
// @version        1.2.2.1
// @date           2013.05.21
// @include        *://www.kongregate.com/games/*/*
// ==/UserScript==

var d=document,s=d.createElement("script");
if (top===self&&/^(?:https?:\/\/)?(?:www\.)?kongregate\.com\/games\/[^\s\\\/]+\/[^\s\\\/]+$/i.test(d.location.href)) {
	s.type="text/javascript";
	d.head.appendChild(s.appendChild(d.createTextNode('('+function(){
        reload4Kong=function(a){
            var b,d=document;
            if(holodeck&&activateGame&&(b=d.getElementById("quicklinks"))!==null){
                a=d.createElement('li');
                a.innerHTML='<a href="" onclick="activateGame();return false">Reload</a>';
                b.insertBefore(a,b.firstChild);
                holodeck.addChatCommand("reload",function(a,b){
                    a.displayUnsanitizedMessage("Reloading","Please wait...",{class: "whisper whisper_received"},{non_user:true});
                    activateGame();
                    return false
                });
                setTimeout(function(){delete reload4Kong},1)
            }
            else if(a){setTimeout(function(b){reload4Kong(b)},10000,a--)}
            else{setTimeout(function(){delete reload4Kong},1)}
        }
        reload4Kong(10);
	}+')()')).parentNode);
}