Greasy Fork is available in English.

UserList Scroll Enhancement

Prevents the UserList in chat from scrolling from it's current view when users join or leave.

このスクリプトの質問や評価の投稿はこちら通報はこちらへお寄せください。
  1. // ==UserScript==
  2. // @name UserList Scroll Enhancement
  3. // @author skyboy
  4. // @version 1.0.0
  5. // @description Prevents the UserList in chat from scrolling from it's current view when users join or leave.
  6. // @include http://www.kongregate.com/games/*/*
  7. // @homepage http://userscripts.org/scripts/show/72288
  8. // @namespace https://greatest.deepsurf.us/users/32649
  9. // ==/UserScript==
  10. if (/^\/?games\/[^\/]+\/[^\/?]+(\?.*)?$/.test(window.location.pathname))
  11. setTimeout(function() {
  12. window.location.assign("javascript:(function(){function a(){holodeck.userRowHeight=(function(){var a={innerHTML:''},i = 0;do{(a=$$('.user_row')[i])||alert('Error: Userlist scroll enhancement may not work correctly.');}while((!a.innerHTML.match(new RegExp(holodeck.username())))&&(++i));return(a.clientHeight||20);})();var a=ChatRoom.prototype,x=a.userLeft,z=a.userJoined;a.userLeft = function(b){var a=(function(b,q){return $(q.usernameNodeId(b)).offsetTop - $(q.usernameNodeId(holodeck.username())).offsetTop;})(b.data.user.username,this),c=this._users_in_room_node;if(c.scrollTop>a){c.scrollTop-=holodeck.userRowHeight;}x.apply(this,arguments);};a.userJoined = function(b){z.apply(this,arguments);var a=(function(b,q){return $(q.usernameNodeId(b)).offsetTop - $(q.usernameNodeId(holodeck.username())).offsetTop;})(b.data.user.username,this),c=this._users_in_room_node;if(c.scrollTop>a){c.scrollTop+=holodeck.userRowHeight;}};};if (holodeck.activeDialogue()){a()}else{holodeck.registerKonduitCallback(KonduitEvent.JOIN_ROOM,function(){setTimeout(a, 5000)})}})();void(0);");
  13. }, 5000);