Artifact 853fa1422e07fd4a60bea2338d5a30c8ff45a48c346d61542c33b28353412b99:
- File src/forum.js — part of check-in [18da05b903] at 2020-07-31 16:14:43 on branch ajax-wiki-editor — Extended /builtin/filename to support /builtin/:filename for packing up cacheable bundles of page-specific code. /wikiedit, /fileedit, and /forumpost now serve their JS that way. (user: stephan size: 428) [more...]
(function(){ function absoluteY(obj){ var top = 0; if( obj.offsetParent ){ do{ top += obj.offsetTop; }while( obj = obj.offsetParent ); } return top; } var x = document.getElementsByClassName('forumSel'); if(x[0]){ var w = window.innerHeight; var h = x[0].scrollHeight; var y = absoluteY(x[0]); if( w>h ) y = y + (h-w)/2; if( y>0 ) window.scrollTo(0, y); } })();