Kongregate Chat /r Function

Allows the use of /r function in chat

As of 2016-03-06. See the latest version.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

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

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

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

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

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

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.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         Kongregate Chat /r Function
// @description  Allows the use of /r function in chat
// @version      1.0
// @include      http://www.kongregate.com/games/*
// require       http://userscripts.org/scripts/source/49229.user.js
// @namespace https://greasyfork.org/users/32649
// ==/UserScript==

// Nabb, 1st May 2009: nabb.trap17.com
// fixed? June 7th

// This script will add the '/r' feature, a shorthand for reply to whisper.
// When '/r' is typed, it will be replaced with '/w name' where name is
// username of the last user who sent a message. In the event that you
// have no received any messages, it will be replaced with '/w'.

setTimeout("nL=0;nFE((z='ChatDialogue.prototype.')+'receivedPrivateMessage',x='dMessage(',x+'nL=');nFA(z+'onKeyPress',\"(z=this._input_node).value=='/r'&&a.keyCode==32&&(z.value='/w'+(nL?' '+nL:''))\")",100)