ReplacementText *OLD*

Replaces text you choose with a substitute

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==   
// @name            ReplacementText *OLD*
// @namespace       skyboy@kongregate
// @author          skyboy
// @version         1.0.0
// @description     Replaces text you choose with a substitute
// @include         http://www.kongregate.com/games/*/*
// @homepage        
// ==/UserScript==   
if (/^\/?games\/[^\/]+\/[^\/?]+(\?.*)?$/.test(window.location.pathname)) {
setTimeout(function() {
var r = function(){return eval("("+GM_getValue("skyreplacements", "{ }")+")")};
var stringit = function(a){var i="{ ";for(var d in a){i += '"' + d.replace(/"/g,'\\"') + '":"' + String(a[d]).replace(/"/g,'\\"') + '",'}return i.substring(0, i.length - 1) + " }"};
unsafeWindow.holodeck.addOutgoingMessageFilter(function(m,n){for(var i in r()){m=m.replace(new RegExp(i,"g"),r()[i]);}n(m);})
GM_registerMenuCommand("Add replacement text (ie. faces)", function(){
var k = r();
var i = prompt("What text do you want to replace?");
if (!i) return;
var j = prompt("What do you want to replace it with?\n(Empty to delete replacement)", k[i] || i);
if (j) k[i] = j; else delete k[i];
GM_setValue("skyreplacements", stringit(k))
});
}, 1250);
}