From 19e9752a83e8961d8b2755dbe050edf5eb665dd1 Mon Sep 17 00:00:00 2001 From: the1812 Date: Sun, 7 Apr 2019 11:23:55 +0800 Subject: [PATCH] Update isEmbeddedPlayer() --- bilibili-evolved.offline.user.js | 4 ++-- bilibili-evolved.preview-offline.user.js | 4 ++-- bilibili-evolved.preview.user.js | 2 +- bilibili-evolved.user.js | 2 +- client/utils.js | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/bilibili-evolved.offline.user.js b/bilibili-evolved.offline.user.js index 791fcd94a..b14f44075 100644 --- a/bilibili-evolved.offline.user.js +++ b/bilibili-evolved.offline.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name Bilibili Evolved (Offline) -// @version 264.06 +// @version 264.82 // @description Bilibili Evolved 的离线版, 所有功能都已内置于脚本中. // @author Grant Howard, Coulomb-G // @copyright 2019, Grant Howard (https://github.com/the1812) & Coulomb-G (https://github.com/Coulomb-G) @@ -217,7 +217,7 @@ function fixed(number, precision = 1) } function isEmbeddedPlayer() { - return location.host === "player.bilibili.com"; + return location.host === "player.bilibili.com" || document.URL.startsWith("https://www.bilibili.com/html/player.html"); } function isIframe() { diff --git a/bilibili-evolved.preview-offline.user.js b/bilibili-evolved.preview-offline.user.js index 70b692198..1e1ee57ea 100644 --- a/bilibili-evolved.preview-offline.user.js +++ b/bilibili-evolved.preview-offline.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name Bilibili Evolved (Preview Offline) -// @version 264.06 +// @version 264.82 // @description Bilibili Evolved 的预览离线版, 可以抢先体验新功能, 并且所有功能都已内置于脚本中. // @author Grant Howard, Coulomb-G // @copyright 2019, Grant Howard (https://github.com/the1812) & Coulomb-G (https://github.com/Coulomb-G) @@ -217,7 +217,7 @@ function fixed(number, precision = 1) } function isEmbeddedPlayer() { - return location.host === "player.bilibili.com"; + return location.host === "player.bilibili.com" || document.URL.startsWith("https://www.bilibili.com/html/player.html"); } function isIframe() { diff --git a/bilibili-evolved.preview.user.js b/bilibili-evolved.preview.user.js index 658502312..21f30474a 100644 --- a/bilibili-evolved.preview.user.js +++ b/bilibili-evolved.preview.user.js @@ -216,7 +216,7 @@ function fixed(number, precision = 1) } function isEmbeddedPlayer() { - return location.host === "player.bilibili.com"; + return location.host === "player.bilibili.com" || document.URL.startsWith("https://www.bilibili.com/html/player.html"); } function isIframe() { diff --git a/bilibili-evolved.user.js b/bilibili-evolved.user.js index 9dbeed09a..1ea2e1fca 100644 --- a/bilibili-evolved.user.js +++ b/bilibili-evolved.user.js @@ -216,7 +216,7 @@ function fixed(number, precision = 1) } function isEmbeddedPlayer() { - return location.host === "player.bilibili.com"; + return location.host === "player.bilibili.com" || document.URL.startsWith("https://www.bilibili.com/html/player.html"); } function isIframe() { diff --git a/client/utils.js b/client/utils.js index 59bdfc3f5..6e50a5c37 100644 --- a/client/utils.js +++ b/client/utils.js @@ -61,7 +61,7 @@ export function fixed(number, precision = 1) } export function isEmbeddedPlayer() { - return location.host === "player.bilibili.com"; + return location.host === "player.bilibili.com" || document.URL.startsWith("https://www.bilibili.com/html/player.html"); } export function isIframe() {