Fix checkUpdates

This commit is contained in:
the1812 2019-09-08 16:28:10 +08:00
parent a72c425720
commit fdb4795d10
6 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 419.02 // @version 419.03
// @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)
@ -2158,7 +2158,7 @@ class ResourceManager {
this.applyReloadables() // reloadables run sync this.applyReloadables() // reloadables run sync
// await this.applyDropdownOptions(); // await this.applyDropdownOptions();
// this.applyWidgets() // No need to wait the widgets // this.applyWidgets() // No need to wait the widgets
if (!isOffline()) { if (!isOffline() && settings.scriptDownloadMode === 'bundle') {
const checkUpdates = () => this.checkUpdates(!isCacheValid) const checkUpdates = () => this.checkUpdates(!isCacheValid)
if ('requestIdleCallback' in window) { if ('requestIdleCallback' in window) {
window.requestIdleCallback(checkUpdates) window.requestIdleCallback(checkUpdates)

View File

@ -1,6 +1,6 @@
// ==UserScript== // ==UserScript==
// @name Bilibili Evolved (Preview Offline) // @name Bilibili Evolved (Preview Offline)
// @version 419.02 // @version 419.03
// @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)
@ -2158,7 +2158,7 @@ class ResourceManager {
this.applyReloadables() // reloadables run sync this.applyReloadables() // reloadables run sync
// await this.applyDropdownOptions(); // await this.applyDropdownOptions();
// this.applyWidgets() // No need to wait the widgets // this.applyWidgets() // No need to wait the widgets
if (!isOffline()) { if (!isOffline() && settings.scriptDownloadMode === 'bundle') {
const checkUpdates = () => this.checkUpdates(!isCacheValid) const checkUpdates = () => this.checkUpdates(!isCacheValid)
if ('requestIdleCallback' in window) { if ('requestIdleCallback' in window) {
window.requestIdleCallback(checkUpdates) window.requestIdleCallback(checkUpdates)

View File

@ -2210,7 +2210,7 @@ class ResourceManager {
this.applyReloadables() // reloadables run sync this.applyReloadables() // reloadables run sync
// await this.applyDropdownOptions(); // await this.applyDropdownOptions();
// this.applyWidgets() // No need to wait the widgets // this.applyWidgets() // No need to wait the widgets
if (!isOffline()) { if (!isOffline() && settings.scriptDownloadMode === 'bundle') {
const checkUpdates = () => this.checkUpdates(!isCacheValid) const checkUpdates = () => this.checkUpdates(!isCacheValid)
if ('requestIdleCallback' in window) { if ('requestIdleCallback' in window) {
window.requestIdleCallback(checkUpdates) window.requestIdleCallback(checkUpdates)

View File

@ -2210,7 +2210,7 @@ class ResourceManager {
this.applyReloadables() // reloadables run sync this.applyReloadables() // reloadables run sync
// await this.applyDropdownOptions(); // await this.applyDropdownOptions();
// this.applyWidgets() // No need to wait the widgets // this.applyWidgets() // No need to wait the widgets
if (!isOffline()) { if (!isOffline() && settings.scriptDownloadMode === 'bundle') {
const checkUpdates = () => this.checkUpdates(!isCacheValid) const checkUpdates = () => this.checkUpdates(!isCacheValid)
if ('requestIdleCallback' in window) { if ('requestIdleCallback' in window) {
window.requestIdleCallback(checkUpdates) window.requestIdleCallback(checkUpdates)

Binary file not shown.

View File

@ -153,7 +153,7 @@ export class ResourceManager {
this.applyReloadables() // reloadables run sync this.applyReloadables() // reloadables run sync
// await this.applyDropdownOptions(); // await this.applyDropdownOptions();
// this.applyWidgets() // No need to wait the widgets // this.applyWidgets() // No need to wait the widgets
if (!isOffline()) { if (!isOffline() && settings.scriptDownloadMode === 'bundle') {
const checkUpdates = () => this.checkUpdates(!isCacheValid) const checkUpdates = () => this.checkUpdates(!isCacheValid)
if ('requestIdleCallback' in window) { if ('requestIdleCallback' in window) {
window.requestIdleCallback(checkUpdates) window.requestIdleCallback(checkUpdates)