mokeduo
2020-11-05 18:29:56 +08:00
古老的 JS 小书签可以帮忙在支持 JavaScript 的浏览器里执行自动滚屏操作。下面是一个自定义速度的例子,速度可自行修改。
javascript:var%20_ss_interval_pointer;_ss_speed=prompt(%22SPEED%22);_ss_speed_pairs=%5B%5B0,0%5D,%5B1,200.0%5D,%5B1,120.0%5D,%5B1,72.0%5D,%5B1,43.2%5D,%5B1,25.9%5D,%5B2,31.0%5D,%5B4,37.2%5D,%5B8,44.8%5D,%5B8,26.4%5D,%5B16,32.0%5D%5D;_ss_last_onkeypress=document.onkeypress;_ss_stop=function()%7BclearTimeout(_ss_interval_pointer)%7D;_ss_start=function()%7B_ss_abs_speed=Math.abs(_ss_speed);_ss_direction=_ss_speed/_ss_abs_speed;_ss_speed_pair=_ss_speed_pairs%5B_ss_abs_speed%5D;_ss_interval_pointer=setInterval('scrollBy(0,'+_ss_direction*_ss_speed_pair%5B0%5D+');%20if((pageYOffset%3C=1)%7C%7C(pageYOffset==document.height-innerHeight))%20_ss_speed=0;',_ss_speed_pair%5B1%5D);%7D;_ss_adj=function(q)%7B_ss_speed+=q;if(Math.abs(_ss_speed)%3E=_ss_speed_pairs.length)_ss_speed=(_ss_speed_pairs.length-1)*(_ss_speed/Math.abs(_ss_speed))%7D;_ss_quit=function()%7B_ss_stop();document.onkeypress=_ss_last_onkeypress;%7D;document.onkeypress=function(e)%7Bif((e.charCode==113)%7C%7C(e.keyCode==27))%7B_ss_quit();return;%7D;if(e.charCode%3E=48&&e.charCode%3C=57)_ss_speed=e.charCode-48;else%20switch(e.charCode)%7Bcase%2095:_ss_adj(-2);case%2045:_ss_adj(-1);break;case%2043:_ss_adj(2);case%2061:_ss_adj(1);break;%7D;_ss_stop();_ss_start();%7D;_ss_stop();_ss_start();