mirror of
https://github.com/the1812/Bilibili-Evolved.git
synced 2025-11-04 21:22:45 +08:00
Fix bugs
This commit is contained in:
parent
835d145c9f
commit
b4ce42620b
2
min/player-focus.min.js
vendored
2
min/player-focus.min.js
vendored
@ -1 +1 @@
|
||||
(()=>{return(e,o)=>{const n=document.URL.includes("bangumi")?"#bofqi":".video-info .video-title .tit";SpinQuery.count(".nav-con,#bofqi",3).then(()=>{document.querySelector(n).scrollIntoView();if(e.playerFocusOffset!==0){window.scrollBy(0,e.playerFocusOffset)}})}})();
|
||||
(()=>{return(e,o)=>{const n=document.URL.includes("bangumi")?"#bofqi":".video-info .video-title .tit";SpinQuery.count(".nav-con,#bofqi",3).then(()=>{const o=document.querySelector(n);if(o===null){return}o.scrollIntoView();if(e.playerFocusOffset!==0){window.scrollBy(0,e.playerFocusOffset)}})}})();
|
||||
@ -1,7 +1,12 @@
|
||||
const target = document.URL.includes("bangumi") ? "#bofqi" : ".video-info .video-title .tit";
|
||||
SpinQuery.count(".nav-con,#bofqi", 3).then(() =>
|
||||
{
|
||||
document.querySelector(target).scrollIntoView();
|
||||
const element = document.querySelector(target);
|
||||
if (element === null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
element.scrollIntoView();
|
||||
if (settings.playerFocusOffset !== 0)
|
||||
{
|
||||
window.scrollBy(0, settings.playerFocusOffset);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user