Back to vBulletin 4.x Template Modifications

Showthread Autoscroll
Mod Version: 1.00, by ctsolutions

vB Version: 4.1.4 Rating: (1 vote - 5.00 average) Installs: 6
Released: 22 May 2011 Last Update: Never Downloads: 0
Not Supported Template Edits Re-usable Code  

Just a little script that I found. Credits goes not to me.
Should works with all vB Releases with Java script enabled.

Useful for:
  • Long text to read.
  • Long guides.
  • Rolleplay Story's
  • Other long threads.

Just add on bottom of your "Showthread" template.

Settings:

Scroll Speed:
var speed=1

Time after the scrolling start:
setInterval("scrollwindow()",400)

Code:
<SCRIPT language=JavaScript1.2> 
 //change 1 to another integer to alter the scroll speed. Greater is faster
 var speed=1
 var currentpos=0,alt=1,curpos1=0,curpos2=-1
 function initialize(){
 startit()
 }
 function scrollwindow(){
 if (document.all &&
 !document.getElementById)
 temp=document.body.scrollTop
 else
 temp=window.pageYOffset
 if (alt==0)
 alt=2
 else
 alt=1
 if (alt==0)
 curpos1=temp
 else
 curpos2=temp
 if (curpos1!=curpos2){
 if (document.all)
 currentpos=document.body.scrollTop+speed
 else
 currentpos=window.pageYOffset+speed
 window.scroll(0,currentpos)
 }
 else{
 currentpos=0
 window.scroll(0,currentpos)
 }
 }
 function startit(){
 setInterval("scrollwindow()",400)
 }
 window.onload=initialize
 </SCRIPT>

Download

No files for download.


vblts.ru supports vBulletin®, 2022-2024