Update isEmbeddedPlayer()

This commit is contained in:
the1812 2019-04-07 11:23:55 +08:00
parent 4ecd599688
commit 19e9752a83
5 changed files with 7 additions and 7 deletions

View File

@ -1,6 +1,6 @@
// ==UserScript== // ==UserScript==
// @name Bilibili Evolved (Offline) // @name Bilibili Evolved (Offline)
// @version 264.06 // @version 264.82
// @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)
@ -217,7 +217,7 @@ function fixed(number, precision = 1)
} }
function isEmbeddedPlayer() 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() function isIframe()
{ {

View File

@ -1,6 +1,6 @@
// ==UserScript== // ==UserScript==
// @name Bilibili Evolved (Preview Offline) // @name Bilibili Evolved (Preview Offline)
// @version 264.06 // @version 264.82
// @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)
@ -217,7 +217,7 @@ function fixed(number, precision = 1)
} }
function isEmbeddedPlayer() 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() function isIframe()
{ {

View File

@ -216,7 +216,7 @@ function fixed(number, precision = 1)
} }
function isEmbeddedPlayer() 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() function isIframe()
{ {

View File

@ -216,7 +216,7 @@ function fixed(number, precision = 1)
} }
function isEmbeddedPlayer() 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() function isIframe()
{ {

View File

@ -61,7 +61,7 @@ export function fixed(number, precision = 1)
} }
export function isEmbeddedPlayer() 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() export function isIframe()
{ {