MCPcopy Create free account
hub / github.com/hoothin/UserScripts / scrollToChange

Function scrollToChange

Picviewer CE+/Picviewer CE+.user.js:15607–15617  ·  view source on GitHub ↗
(next)

Source from the content-addressed store, hash-verified

15605
15606 this.canScroll=true;
15607 var scrollToChange=function(next){
15608 if(self.canScroll){
15609 if(prefs.gallery.transition){
15610 self.canScroll=false;
15611 setTimeout(function(){
15612 self.canScroll=true;
15613 },200);
15614 }
15615 next ? self.selectNext() : self.selectPrevious();
15616 }
15617 }
15618 addWheelEvent(eleMaps['body'],function(e){//wheel事件
15619 if(e.deltaZ!=0 || e.target.nodeName=="TEXTAREA")return;//z轴
15620 if(eleMaps['sidebar-toggle'].style.visibility == 'hidden')return;

Callers 1

initFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected