ExitGameChat

Exits game chat when the page loads.

  1. // ==UserScript==
  2. // @name ExitGameChat
  3. // @namespace skyboy@kongregate
  4. // @author skyboy
  5. // @version 1.0.1
  6. // @description Exits game chat when the page loads.
  7. // @include http://www.kongregate.com/games/*/*
  8. // @homepage http://userscripts.org/scripts/show/120982
  9. // ==/UserScript==
  10. if (/^\/?games\/[^\/]+\/[^\/?]+(\?.*)?$/.test(window.location.pathname)) {
  11. setTimeout(function() {
  12. window.location.assign("javascript:void(document.observe('load', function(){holodeck.chatWindow().joinRoom(holodeck.chatWindow()._deferred_room_params),(function(){holodeck.chatWindow().setFirstAvailableRoomAsActive(['chat']),holodeck.leaveRoom('game'),$('game_room_tab').hide()}).delay(10)}));");
  13. }, 50);
  14. }