Kongregate Chat /r Function

Allows the use of /r function in chat

当前为 2016-03-06 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Kongregate Chat /r Function
  3. // @description Allows the use of /r function in chat
  4. // @version 1.0
  5. // @include http://www.kongregate.com/games/*
  6. // require http://userscripts.org/scripts/source/49229.user.js
  7. // @namespace https://greasyfork.org/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)