mirror of
https://github.com/the1812/Bilibili-Evolved.git
synced 2025-11-04 21:22:45 +08:00
commit
7bfcab4e18
@ -1,6 +1,6 @@
|
||||
// ==UserScript==
|
||||
// @name Bilibili Evolved (Offline)
|
||||
// @version 616.26
|
||||
// @version 616.33
|
||||
// @description Bilibili Evolved 的离线版, 所有功能都已内置于脚本中.
|
||||
// @author Grant Howard, Coulomb-G
|
||||
// @copyright 2020, Grant Howard (https://github.com/the1812) & Coulomb-G (https://github.com/Coulomb-G)
|
||||
@ -2758,7 +2758,13 @@ class ResourceManager {
|
||||
url,
|
||||
responseType: 'blob',
|
||||
}))
|
||||
const latestVersion = await Ajax.monkey({ url: Resource.root + 'version.txt' })
|
||||
let latestVersion
|
||||
const zipVersion = zip.file('version.txt')
|
||||
if (zipVersion) {
|
||||
latestVersion = await zipVersion.async('text')
|
||||
} else {
|
||||
latestVersion = await Ajax.monkey({ url: (Resource.cdnRoot || Resource.root) + 'version.txt' })
|
||||
}
|
||||
isTimeout = false
|
||||
if (settings.currentVersion !== latestVersion) {
|
||||
console.log(`bundle version not match. current=${settings.currentVersion}, latest=${latestVersion}`)
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
// ==UserScript==
|
||||
// @name Bilibili Evolved (Preview Offline)
|
||||
// @version 616.26
|
||||
// @version 616.33
|
||||
// @description Bilibili Evolved 的预览离线版, 可以抢先体验新功能, 并且所有功能都已内置于脚本中.
|
||||
// @author Grant Howard, Coulomb-G
|
||||
// @copyright 2020, Grant Howard (https://github.com/the1812) & Coulomb-G (https://github.com/Coulomb-G)
|
||||
@ -2758,7 +2758,13 @@ class ResourceManager {
|
||||
url,
|
||||
responseType: 'blob',
|
||||
}))
|
||||
const latestVersion = await Ajax.monkey({ url: Resource.root + 'version.txt' })
|
||||
let latestVersion
|
||||
const zipVersion = zip.file('version.txt')
|
||||
if (zipVersion) {
|
||||
latestVersion = await zipVersion.async('text')
|
||||
} else {
|
||||
latestVersion = await Ajax.monkey({ url: (Resource.cdnRoot || Resource.root) + 'version.txt' })
|
||||
}
|
||||
isTimeout = false
|
||||
if (settings.currentVersion !== latestVersion) {
|
||||
console.log(`bundle version not match. current=${settings.currentVersion}, latest=${latestVersion}`)
|
||||
|
||||
@ -2817,7 +2817,13 @@ class ResourceManager {
|
||||
url,
|
||||
responseType: 'blob',
|
||||
}))
|
||||
const latestVersion = await Ajax.monkey({ url: Resource.root + 'version.txt' })
|
||||
let latestVersion
|
||||
const zipVersion = zip.file('version.txt')
|
||||
if (zipVersion) {
|
||||
latestVersion = await zipVersion.async('text')
|
||||
} else {
|
||||
latestVersion = await Ajax.monkey({ url: (Resource.cdnRoot || Resource.root) + 'version.txt' })
|
||||
}
|
||||
isTimeout = false
|
||||
if (settings.currentVersion !== latestVersion) {
|
||||
console.log(`bundle version not match. current=${settings.currentVersion}, latest=${latestVersion}`)
|
||||
|
||||
@ -2817,7 +2817,13 @@ class ResourceManager {
|
||||
url,
|
||||
responseType: 'blob',
|
||||
}))
|
||||
const latestVersion = await Ajax.monkey({ url: Resource.root + 'version.txt' })
|
||||
let latestVersion
|
||||
const zipVersion = zip.file('version.txt')
|
||||
if (zipVersion) {
|
||||
latestVersion = await zipVersion.async('text')
|
||||
} else {
|
||||
latestVersion = await Ajax.monkey({ url: (Resource.cdnRoot || Resource.root) + 'version.txt' })
|
||||
}
|
||||
isTimeout = false
|
||||
if (settings.currentVersion !== latestVersion) {
|
||||
console.log(`bundle version not match. current=${settings.currentVersion}, latest=${latestVersion}`)
|
||||
|
||||
@ -53,6 +53,7 @@ namespace BilibiliEvolved.Build
|
||||
zip.CreateEntryFromFile(url, filename, CompressionLevel.NoCompression);
|
||||
hashDict.Add(filename, hash);
|
||||
}
|
||||
zip.CreateEntryFromFile("version.txt", "version.txt", CompressionLevel.NoCompression);
|
||||
}
|
||||
File.WriteAllText("min/bundle.json", JsonConvert.SerializeObject(hashDict, Formatting.Indented));
|
||||
WriteSuccess("Bundle build complete.");
|
||||
|
||||
Binary file not shown.
BIN
min/bundle.zip
BIN
min/bundle.zip
Binary file not shown.
@ -266,7 +266,13 @@ export class ResourceManager {
|
||||
url,
|
||||
responseType: 'blob',
|
||||
}))
|
||||
const latestVersion = await Ajax.monkey({ url: Resource.root + 'version.txt' })
|
||||
let latestVersion
|
||||
const zipVersion = zip.file('version.txt')
|
||||
if (zipVersion) {
|
||||
latestVersion = await zipVersion.async('text')
|
||||
} else {
|
||||
latestVersion = await Ajax.monkey({ url: (Resource.cdnRoot || Resource.root) + 'version.txt' })
|
||||
}
|
||||
isTimeout = false
|
||||
if (settings.currentVersion !== latestVersion) {
|
||||
console.log(`bundle version not match. current=${settings.currentVersion}, latest=${latestVersion}`)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user