🎉 欢迎访问GreasyFork.Org 镜像站!本镜像站由公众号【爱吃馍】搭建,用于分享脚本。联系邮箱📮

Greasy fork 爱吃馍镜像

Greasy Fork is available in English.

📂 缓存分发状态(共享加速已生效)
🕒 页面同步时间:2025/12/28 11:46:22
🔄 下次更新时间:2025/12/28 12:46:22
手动刷新缓存

Ventero's Chat-scripts Framework *OLD*

Required by all of Ventero's Kongregate scripts

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το 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          Ventero's Chat-scripts Framework *OLD*
// @namespace     tag://kongregate
// @description   Required by all of Ventero's Kongregate scripts
// @include       http://www.kongregate.com/*
// @author        Ventero
// @version       1.9
// @date          05.04.2013
// require       http://kong.ventero.de/updates/54245.js
// @grant         unsafeWindow
// @license       MIT license
// ==/UserScript==

// Written by Ventero (http://www.kongregate.com/accounts/Ventero) 07/22/09
// Copyright (c) 2009-2012 Ventero, licensed under MIT/X11 license
// http://www.opensource.org/licenses/mit-license.php
var dom = (typeof unsafeWindow === "undefined"?window:unsafeWindow);
var ready = false;

// cross window communication
window.addEventListener("message", function onMessage(e) {
	if(e.data != "__scripts_ready" || e.origin != location.origin) return;

	ready = true;
	window.removeEventListener("message", onMessage);
}, false);

injectScript(function bootstrap(dom){
	var target = ("holodeck" in dom ? "holodeck:ready" : "dom:javascript_loaded");
	document.addEventListener("dataavailable", function listener(e) {
		if(e.eventName != target) return;

		ready = true;
		window.postMessage("__scripts_ready", location.origin);
		document.removeEventListener("dataavailable", listener);
	}, false);
}, 0, true);

function injectScript(fn, to, force){
	if(!ready && !force) {
		setTimeout(function(){injectScript(fn, to)}, 100);
		return;
	}
	try{
		var inject;
		if(force ||
			 /Chrome/i.test(navigator.appVersion) ||
			 typeof unsafeWindow === "undefined"){
			var script = document.createElement("script");
			var source = fn.toString();
			if(source[source.length - 1] == ";"){
				source = source.substring(0, source.length - 1);
			}

			script.type = "text/javascript";
			script.textContent = "//<![CDATA[\n" +
			                   "(" + source + ")(window);\n" +
			                   "//]]>";

			setTimeout(function(){document.body.appendChild(script)}, to);
		}else{
			setTimeout(function(){fn(unsafeWindow);}, to);
		}

	}catch(e){console.log("Framework script: " + e)};
}
dom.injectScript = injectScript;

function init_framework(){
	if(dom.holodeck){
		dom.CDprototype = dom.ChatDialogue.prototype;
		dom.CWprototype = dom.ChatWindow.prototoype;
		dom.CRprototype = dom.ChatRoom.prototype;
		dom.Holoprototype = dom.Holodeck.prototype;
	}

	addScript = document.createElement("script");
	addScript.innerHTML = "function ajax(a, b){new Ajax.Request(a,b)};\n";
	addScript.innerHTML+= "function wrap(a, b){return a.wrap(b)};\n";
	document.body.appendChild(addScript);
}

if(window.opera){
	if(window.localStorage){
		window.GM_setValue = function(a, b){
			localStorage.setItem(a, b);
		}
		window.GM_getValue = function(a, b){
			var ret = localStorage.getItem(a);
			return (ret == null?b:ret)
		}
		window.GM_deleteValue = function(a){
			localStorage.removeItem(a);
		}
	} else {
		window.GM_setValue = function(){};
		window.GM_getValue = function(){};
		window.GM_deleteValue = function(){};
	}
}else if(/Chrome/i.test(navigator.appVersion) || typeof unsafeWindow === "undefined"){
	var s = document.createElement("script");
	s.id = "injectScriptDiv";
	s.innerHTML = "dom = window;\n";
	s.innerHTML+= "if(typeof GM_setValue === 'undefined'){\n";
	s.innerHTML+= "	window.GM_setValue = function(a,b){localStorage.setItem(a,b)}\n";
	s.innerHTML+= "	window.GM_getValue = function(a,b){var r=localStorage.getItem(a);return (r==null?b:r)}\n";
	s.innerHTML+= "	window.GM_deleteValue = function(a){localStorage.removeItem(a)}\n";
	s.innerHTML+= "}";
	s.onclick = function(){return dom.injectScript};
	document.body.appendChild(s);
}

injectScript(init_framework, 0);