mirror of
https://github.com/the1812/Bilibili-Evolved.git
synced 2025-11-04 21:22:45 +08:00
Fix bug in videoChange
This commit is contained in:
parent
b48bd05d32
commit
a8ffa0bc65
@ -1,6 +1,6 @@
|
||||
// ==UserScript==
|
||||
// @name Bilibili Evolved (Offline)
|
||||
// @version 238.23
|
||||
// @version 238.24
|
||||
// @description Bilibili Evolved 的离线版, 所有功能都已内置于脚本中.
|
||||
// @author Grant Howard, Coulomb-G
|
||||
// @copyright 2019, Grant Howard (https://github.com/the1812) & Coulomb-G (https://github.com/Coulomb-G)
|
||||
@ -1048,10 +1048,9 @@ class Observer
|
||||
{
|
||||
return null;
|
||||
}
|
||||
callback([]);
|
||||
return Observer.childList("#bofqi,#bilibiliPlayer", records =>
|
||||
{
|
||||
const isMenuAttached = records.every(it => [...it.addedNodes].some(e => e.classList.contains("bilibili-player-context-menu-container")));
|
||||
const isMenuAttached = records.length > 0 && records.every(it => [...it.addedNodes].some(e => e.classList.contains("bilibili-player-context-menu-container")));
|
||||
if (!isMenuAttached)
|
||||
{
|
||||
callback(records);
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
// ==UserScript==
|
||||
// @name Bilibili Evolved (Preview Offline)
|
||||
// @version 238.23
|
||||
// @version 238.24
|
||||
// @description Bilibili Evolved 的预览离线版, 可以抢先体验新功能, 并且所有功能都已内置于脚本中.
|
||||
// @author Grant Howard, Coulomb-G
|
||||
// @copyright 2019, Grant Howard (https://github.com/the1812) & Coulomb-G (https://github.com/Coulomb-G)
|
||||
@ -1048,10 +1048,9 @@ class Observer
|
||||
{
|
||||
return null;
|
||||
}
|
||||
callback([]);
|
||||
return Observer.childList("#bofqi,#bilibiliPlayer", records =>
|
||||
{
|
||||
const isMenuAttached = records.every(it => [...it.addedNodes].some(e => e.classList.contains("bilibili-player-context-menu-container")));
|
||||
const isMenuAttached = records.length > 0 && records.every(it => [...it.addedNodes].some(e => e.classList.contains("bilibili-player-context-menu-container")));
|
||||
if (!isMenuAttached)
|
||||
{
|
||||
callback(records);
|
||||
|
||||
@ -1047,10 +1047,9 @@ class Observer
|
||||
{
|
||||
return null;
|
||||
}
|
||||
callback([]);
|
||||
return Observer.childList("#bofqi,#bilibiliPlayer", records =>
|
||||
{
|
||||
const isMenuAttached = records.every(it => [...it.addedNodes].some(e => e.classList.contains("bilibili-player-context-menu-container")));
|
||||
const isMenuAttached = records.length > 0 && records.every(it => [...it.addedNodes].some(e => e.classList.contains("bilibili-player-context-menu-container")));
|
||||
if (!isMenuAttached)
|
||||
{
|
||||
callback(records);
|
||||
|
||||
@ -1047,10 +1047,9 @@ class Observer
|
||||
{
|
||||
return null;
|
||||
}
|
||||
callback([]);
|
||||
return Observer.childList("#bofqi,#bilibiliPlayer", records =>
|
||||
{
|
||||
const isMenuAttached = records.every(it => [...it.addedNodes].some(e => e.classList.contains("bilibili-player-context-menu-container")));
|
||||
const isMenuAttached = records.length > 0 && records.every(it => [...it.addedNodes].some(e => e.classList.contains("bilibili-player-context-menu-container")));
|
||||
if (!isMenuAttached)
|
||||
{
|
||||
callback(records);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user