mirror of
https://github.com/the1812/Bilibili-Evolved.git
synced 2025-11-04 21:22:45 +08:00
Fix bug in Observer
This commit is contained in:
parent
7c53c51f5f
commit
1e6a95719f
@ -1,6 +1,6 @@
|
|||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name Bilibili Evolved (Offline)
|
// @name Bilibili Evolved (Offline)
|
||||||
// @version 267.86
|
// @version 267.90
|
||||||
// @description Bilibili Evolved 的离线版, 所有功能都已内置于脚本中.
|
// @description Bilibili Evolved 的离线版, 所有功能都已内置于脚本中.
|
||||||
// @author Grant Howard, Coulomb-G
|
// @author Grant Howard, Coulomb-G
|
||||||
// @copyright 2019, Grant Howard (https://github.com/the1812) & Coulomb-G (https://github.com/Coulomb-G)
|
// @copyright 2019, Grant Howard (https://github.com/the1812) & Coulomb-G (https://github.com/Coulomb-G)
|
||||||
@ -606,7 +606,7 @@ class Observer
|
|||||||
.some(e => e.classList && e.classList.contains("bilibili-player-context-menu-container")));
|
.some(e => e.classList && e.classList.contains("bilibili-player-context-menu-container")));
|
||||||
const isMiniPlayer = recordTest(records, it => [...it.addedNodes]
|
const isMiniPlayer = recordTest(records, it => [...it.addedNodes]
|
||||||
.concat([...it.removedNodes])
|
.concat([...it.removedNodes])
|
||||||
.every(it => it.classList.contains("drag-bar")));
|
.every(it => it.classList && it.classList.contains("drag-bar")));
|
||||||
if (!isMenuAttached && !isMiniPlayer)
|
if (!isMenuAttached && !isMiniPlayer)
|
||||||
{
|
{
|
||||||
callback(records);
|
callback(records);
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name Bilibili Evolved (Preview Offline)
|
// @name Bilibili Evolved (Preview Offline)
|
||||||
// @version 267.86
|
// @version 267.90
|
||||||
// @description Bilibili Evolved 的预览离线版, 可以抢先体验新功能, 并且所有功能都已内置于脚本中.
|
// @description Bilibili Evolved 的预览离线版, 可以抢先体验新功能, 并且所有功能都已内置于脚本中.
|
||||||
// @author Grant Howard, Coulomb-G
|
// @author Grant Howard, Coulomb-G
|
||||||
// @copyright 2019, Grant Howard (https://github.com/the1812) & Coulomb-G (https://github.com/Coulomb-G)
|
// @copyright 2019, Grant Howard (https://github.com/the1812) & Coulomb-G (https://github.com/Coulomb-G)
|
||||||
@ -606,7 +606,7 @@ class Observer
|
|||||||
.some(e => e.classList && e.classList.contains("bilibili-player-context-menu-container")));
|
.some(e => e.classList && e.classList.contains("bilibili-player-context-menu-container")));
|
||||||
const isMiniPlayer = recordTest(records, it => [...it.addedNodes]
|
const isMiniPlayer = recordTest(records, it => [...it.addedNodes]
|
||||||
.concat([...it.removedNodes])
|
.concat([...it.removedNodes])
|
||||||
.every(it => it.classList.contains("drag-bar")));
|
.every(it => it.classList && it.classList.contains("drag-bar")));
|
||||||
if (!isMenuAttached && !isMiniPlayer)
|
if (!isMenuAttached && !isMiniPlayer)
|
||||||
{
|
{
|
||||||
callback(records);
|
callback(records);
|
||||||
|
|||||||
@ -605,7 +605,7 @@ class Observer
|
|||||||
.some(e => e.classList && e.classList.contains("bilibili-player-context-menu-container")));
|
.some(e => e.classList && e.classList.contains("bilibili-player-context-menu-container")));
|
||||||
const isMiniPlayer = recordTest(records, it => [...it.addedNodes]
|
const isMiniPlayer = recordTest(records, it => [...it.addedNodes]
|
||||||
.concat([...it.removedNodes])
|
.concat([...it.removedNodes])
|
||||||
.every(it => it.classList.contains("drag-bar")));
|
.every(it => it.classList && it.classList.contains("drag-bar")));
|
||||||
if (!isMenuAttached && !isMiniPlayer)
|
if (!isMenuAttached && !isMiniPlayer)
|
||||||
{
|
{
|
||||||
callback(records);
|
callback(records);
|
||||||
|
|||||||
@ -605,7 +605,7 @@ class Observer
|
|||||||
.some(e => e.classList && e.classList.contains("bilibili-player-context-menu-container")));
|
.some(e => e.classList && e.classList.contains("bilibili-player-context-menu-container")));
|
||||||
const isMiniPlayer = recordTest(records, it => [...it.addedNodes]
|
const isMiniPlayer = recordTest(records, it => [...it.addedNodes]
|
||||||
.concat([...it.removedNodes])
|
.concat([...it.removedNodes])
|
||||||
.every(it => it.classList.contains("drag-bar")));
|
.every(it => it.classList && it.classList.contains("drag-bar")));
|
||||||
if (!isMenuAttached && !isMiniPlayer)
|
if (!isMenuAttached && !isMiniPlayer)
|
||||||
{
|
{
|
||||||
callback(records);
|
callback(records);
|
||||||
|
|||||||
@ -102,7 +102,7 @@ export class Observer
|
|||||||
.some(e => e.classList && e.classList.contains("bilibili-player-context-menu-container")));
|
.some(e => e.classList && e.classList.contains("bilibili-player-context-menu-container")));
|
||||||
const isMiniPlayer = recordTest(records, it => [...it.addedNodes]
|
const isMiniPlayer = recordTest(records, it => [...it.addedNodes]
|
||||||
.concat([...it.removedNodes])
|
.concat([...it.removedNodes])
|
||||||
.every(it => it.classList.contains("drag-bar")));
|
.every(it => it.classList && it.classList.contains("drag-bar")));
|
||||||
if (!isMenuAttached && !isMiniPlayer)
|
if (!isMenuAttached && !isMiniPlayer)
|
||||||
{
|
{
|
||||||
callback(records);
|
callback(records);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user