Fix scroll trembling when mini video is on

This commit is contained in:
the1812 2018-09-30 23:07:57 +08:00
parent ddb279d390
commit c82a2655c4
4 changed files with 8 additions and 5 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
(()=>{return(e,l)=>{l.applyStyle("scrollbarStyle","bilibili-scrollbar-style");SpinQuery.any(()=>$(".custom-scrollbar"),e=>e.removeClass("custom-scrollbar"));SpinQuery.any(()=>$(".bili-wrapper,#link-navbar-vm,.link-navbar"),()=>{const e=document.getElementsByClassName("bili-wrapper")[0]||document.getElementById("link-navbar-vm")||document.getElementsByClassName("link-navbar")[0];let t=false;if(e instanceof Element){const l=parseInt(window.getComputedStyle(e).height);t=l===50||l===0||l===56}if(t){l.applyStyle("style","bilibili-new-style")}else{l.applyStyle("oldStyle","bilibili-new-style")}});return{ajaxReload:false}}})();
(()=>{return(e,l)=>{l.applyStyle("scrollbarStyle","bilibili-scrollbar-style");SpinQuery.any(()=>$(".custom-scrollbar"),e=>e.removeClass("custom-scrollbar"));SpinQuery.any(()=>$(".bili-wrapper,#link-navbar-vm,.link-navbar"),()=>{const e=document.getElementsByClassName("bili-wrapper")[0]||document.getElementById("link-navbar-vm")||document.getElementsByClassName("link-navbar")[0];let t=false;if(e instanceof Element){const l=parseInt(window.getComputedStyle(e).height);t=l===50||l===0||l===56}if(t){l.applyStyle("style","bilibili-new-style")}else{l.applyStyle("oldStyle","bilibili-new-style")}});new SpinQuery(()=>$(".player-wrap,.danmaku-box"),e=>e.attr("style"),e=>e.attr("style","")).start();return{ajaxReload:false}}})();

View File

@ -32,6 +32,9 @@
resources.applyStyle("oldStyle", "bilibili-new-style");
}
});
new SpinQuery(() => $(".player-wrap,.danmaku-box"),
it => it.attr("style"),
it => it.attr("style", "")).start();
return {
ajaxReload: false
};