Chat /r Function *OLD*

Allows the use of /r function in chat

  1. // ==UserScript==
  2. // @name Chat /r Function *OLD*
  3. // @description Allows the use of /r function in chat
  4. // @version 1.0
  5. // @include http://www.kongregate.com/games/*
  6. // @require https://greatest.deepsurf.us/scripts/18194-nabb-s-func-func-framework-old/code/Nabb's%20Func%20Func%20Framework%20*OLD*.user.js
  7. // @namespace https://greatest.deepsurf.us/users/32649
  8. // ==/UserScript==
  9.  
  10. // Nabb, 1st May 2009: nabb.trap17.com
  11. // fixed? June 7th
  12.  
  13. // This script will add the '/r' feature, a shorthand for reply to whisper.
  14. // When '/r' is typed, it will be replaced with '/w name' where name is
  15. // username of the last user who sent a message. In the event that you
  16. // have no received any messages, it will be replaced with '/w'.
  17.  
  18. 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)