Green Friends *OLD*

Friends names appear green in chat

  1. // ==UserScript==
  2. // @name Green Friends *OLD*
  3. // @namespace skyboy@kongregate
  4. // @author skyboy
  5. // @version 1.1.0
  6. // @description Friends names appear green in chat
  7. // @include http://www.kongregate.com/games/*/*
  8. // @exclude http://www.kongregate.com/games/*/*/*
  9. // @homepage http://userscripts-mirror.org/scripts/show/72289
  10. // ==/UserScript==
  11. if (/^\/?games\/[^\/]+\/[^\/?]+(\?.*)?$/.test(window.location.pathname))
  12. setTimeout(function() {
  13. window.location.assign("javascript:(function(){var f=ChatDialogue.prototype.displayUnsanitizedMessage,t=ChatDialogue.prototype.displayUnsanitizedMessage=function(e,d,a,b,q){if(!a){a={}}if(this._user_manager.isFriend(e)){a['class']?a['class']+=' friend_message':a['class']='friend_message'};return f.call(this,e,d,a,b)};t=document.createElement('span');t.update('<style>#kong_game_ui .chat_message_window .friend_message .chat_message_window_username{color:#288855 !important}</style>');$('gamepage_header').appendChild(t)})();void(0)");
  14. }, 1250);