ReplacementText *OLD*

Replaces text you choose with a substitute

Versione datata 26/03/2016. Vedi la nuova versione l'ultima versione.

Dovrai installare un'estensione come Tampermonkey, Greasemonkey o Violentmonkey per installare questo script.

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

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Userscripts per installare questo script.

Dovrai installare un'estensione come ad esempio Tampermonkey per installare questo script.

Dovrai installare un gestore di script utente per installare questo script.

(Ho già un gestore di script utente, lasciamelo installare!)

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

(Ho già un gestore di stile utente, lasciamelo installare!)

// ==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);
}