diff --git a/bilibili-evolved.offline.user.js b/bilibili-evolved.offline.user.js index 7dc2a5759..64b07b955 100644 --- a/bilibili-evolved.offline.user.js +++ b/bilibili-evolved.offline.user.js @@ -1213,7 +1213,7 @@ class Resource { return this.text !== null; } - constructor(url, { styles = [], alwaysPreview: false } = {}) + constructor(url, { styles = [], alwaysPreview = false } = {}) { this.rawUrl = Resource.root + "min/" + url; this.dependencies = []; @@ -1227,7 +1227,7 @@ class Resource } get url() { - if (this.alwaysPreview) + if (typeof offlineData === "undefined" && this.alwaysPreview) { return this.rawUrl.replace("/master/", "/preview/"); } diff --git a/bilibili-evolved.preview-offline.user.js b/bilibili-evolved.preview-offline.user.js index 003d90cb0..7bde87f2b 100644 --- a/bilibili-evolved.preview-offline.user.js +++ b/bilibili-evolved.preview-offline.user.js @@ -1213,7 +1213,7 @@ class Resource { return this.text !== null; } - constructor(url, { styles = [], alwaysPreview: false } = {}) + constructor(url, { styles = [], alwaysPreview = false } = {}) { this.rawUrl = Resource.root + "min/" + url; this.dependencies = []; @@ -1227,7 +1227,7 @@ class Resource } get url() { - if (this.alwaysPreview) + if (typeof offlineData === "undefined" && this.alwaysPreview) { return this.rawUrl.replace("/master/", "/preview/"); } diff --git a/bilibili-evolved.preview.user.js b/bilibili-evolved.preview.user.js index 5c050fe87..f9c16a8df 100644 --- a/bilibili-evolved.preview.user.js +++ b/bilibili-evolved.preview.user.js @@ -1093,7 +1093,7 @@ class Resource { return this.text !== null; } - constructor(url, { styles = [], alwaysPreview: false } = {}) + constructor(url, { styles = [], alwaysPreview = false } = {}) { this.rawUrl = Resource.root + "min/" + url; this.dependencies = []; @@ -1107,7 +1107,7 @@ class Resource } get url() { - if (this.alwaysPreview) + if (typeof offlineData === "undefined" && this.alwaysPreview) { return this.rawUrl.replace("/master/", "/preview/"); } diff --git a/bilibili-evolved.user.js b/bilibili-evolved.user.js index 893481891..251159c42 100644 --- a/bilibili-evolved.user.js +++ b/bilibili-evolved.user.js @@ -1093,7 +1093,7 @@ class Resource { return this.text !== null; } - constructor(url, { styles = [], alwaysPreview: false } = {}) + constructor(url, { styles = [], alwaysPreview = false } = {}) { this.rawUrl = Resource.root + "min/" + url; this.dependencies = []; @@ -1107,7 +1107,7 @@ class Resource } get url() { - if (this.alwaysPreview) + if (typeof offlineData === "undefined" && this.alwaysPreview) { return this.rawUrl.replace("/master/", "/preview/"); } diff --git a/client/resource.js b/client/resource.js index 20a54ac99..27d147d2e 100644 --- a/client/resource.js +++ b/client/resource.js @@ -4,7 +4,7 @@ export class Resource { return this.text !== null; } - constructor(url, { styles = [], alwaysPreview: false } = {}) + constructor(url, { styles = [], alwaysPreview = false } = {}) { this.rawUrl = Resource.root + "min/" + url; this.dependencies = []; @@ -18,7 +18,7 @@ export class Resource } get url() { - if (this.alwaysPreview) + if (typeof offlineData === "undefined" && this.alwaysPreview) { return this.rawUrl.replace("/master/", "/preview/"); }