Fossil

Check-in [9ea4805e]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Add the missing forum.js file. Adjust forum.js so that it does a better job of autoscrolling to the selected forum message.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | forum-v2
Files: files | file ages | folders
SHA3-256: 9ea4805e5c998a69bdbb0419b6c6546a7727d9ad764795926fbf984fb156c327
User & Date: drh 2018-07-26 10:50:51.025
Context
2018-07-27
13:29
Improvements to forum thread display. ... (check-in: fd06544c user: drh tags: forum-v2)
2018-07-26
10:50
Add the missing forum.js file. Adjust forum.js so that it does a better job of autoscrolling to the selected forum message. ... (check-in: 9ea4805e user: drh tags: forum-v2)
01:33
Automatic scroll to the specific message of the thread when calling /info on a forum message. ... (check-in: 8f0e18f4 user: drh tags: forum-v2)
Changes
Unified Diff Ignore Whitespace Patch
Added src/forum.js.










































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
(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);
  }
}())