mirror of
https://github.com/the1812/Bilibili-Evolved.git
synced 2025-11-04 21:22:45 +08:00
Bug fixes
This commit is contained in:
parent
a5faa42a4c
commit
d58c5da3d9
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,6 +1,6 @@
|
|||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name Bilibili Evolved (Preview)
|
// @name Bilibili Evolved (Preview)
|
||||||
// @version 1.5.29
|
// @version 1.5.30
|
||||||
// @description 增强哔哩哔哩Web端体验(预览版分支): 修复界面瑕疵, 删除广告, 使用夜间模式浏览, 下载视频或视频封面, 以及增加对触屏设备的支持等.
|
// @description 增强哔哩哔哩Web端体验(预览版分支): 修复界面瑕疵, 删除广告, 使用夜间模式浏览, 下载视频或视频封面, 以及增加对触屏设备的支持等.
|
||||||
// @author Grant Howard, Coulomb-G
|
// @author Grant Howard, Coulomb-G
|
||||||
// @copyright 2018, Grant Howrad (https://github.com/the1812)
|
// @copyright 2018, Grant Howrad (https://github.com/the1812)
|
||||||
@ -944,6 +944,10 @@
|
|||||||
downloadText(this.url, text =>
|
downloadText(this.url, text =>
|
||||||
{
|
{
|
||||||
this.text = this.type.preprocessor(text);
|
this.text = this.type.preprocessor(text);
|
||||||
|
if (text === null)
|
||||||
|
{
|
||||||
|
reject("download failed");
|
||||||
|
}
|
||||||
if (cache !== this.text)
|
if (cache !== this.text)
|
||||||
{
|
{
|
||||||
if (cache === null)
|
if (cache === null)
|
||||||
@ -1097,6 +1101,7 @@
|
|||||||
{
|
{
|
||||||
return new Promise(resolve =>
|
return new Promise(resolve =>
|
||||||
{
|
{
|
||||||
|
this.validateCache();
|
||||||
const promises = [];
|
const promises = [];
|
||||||
for (const key in settings)
|
for (const key in settings)
|
||||||
{
|
{
|
||||||
@ -1109,7 +1114,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.validateCache();
|
|
||||||
Promise.all(promises).then(() =>
|
Promise.all(promises).then(() =>
|
||||||
{
|
{
|
||||||
this.applySettingsWidgets();
|
this.applySettingsWidgets();
|
||||||
@ -1203,14 +1207,15 @@
|
|||||||
if (settings.cache.version !== settings.currentVersion)
|
if (settings.cache.version !== settings.currentVersion)
|
||||||
{
|
{
|
||||||
settings.cache = {};
|
settings.cache = {};
|
||||||
|
saveSettings(settings);
|
||||||
}
|
}
|
||||||
if (settings.cache.version === undefined)
|
if (settings.cache.version === undefined)
|
||||||
{
|
{
|
||||||
settings.cache.version = settings.currentVersion;
|
settings.cache.version = settings.currentVersion;
|
||||||
}
|
|
||||||
saveSettings(settings);
|
saveSettings(settings);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
loadResources();
|
loadResources();
|
||||||
loadSettings();
|
loadSettings();
|
||||||
@ -1220,12 +1225,12 @@
|
|||||||
resources.fetchByKey("toast").then(() =>
|
resources.fetchByKey("toast").then(() =>
|
||||||
{
|
{
|
||||||
Toast = resources.attributes.toast.export;
|
Toast = resources.attributes.toast.export;
|
||||||
resources.fetch();
|
resources.fetch().then(() => saveSettings(settings));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
resources.fetch();
|
resources.fetch().then(() => saveSettings(settings));
|
||||||
}
|
}
|
||||||
|
|
||||||
})(window.jQuery.noConflict(true));
|
})(window.jQuery.noConflict(true));
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name Bilibili Evolved
|
// @name Bilibili Evolved
|
||||||
// @version 1.5.29
|
// @version 1.5.30
|
||||||
// @description 增强哔哩哔哩Web端体验: 修复界面瑕疵, 删除广告, 使用夜间模式浏览, 下载视频或视频封面, 以及增加对触屏设备的支持等.
|
// @description 增强哔哩哔哩Web端体验: 修复界面瑕疵, 删除广告, 使用夜间模式浏览, 下载视频或视频封面, 以及增加对触屏设备的支持等.
|
||||||
// @author Grant Howard, Coulomb-G
|
// @author Grant Howard, Coulomb-G
|
||||||
// @copyright 2018, Grant Howrad (https://github.com/the1812)
|
// @copyright 2018, Grant Howrad (https://github.com/the1812)
|
||||||
@ -944,6 +944,10 @@
|
|||||||
downloadText(this.url, text =>
|
downloadText(this.url, text =>
|
||||||
{
|
{
|
||||||
this.text = this.type.preprocessor(text);
|
this.text = this.type.preprocessor(text);
|
||||||
|
if (text === null)
|
||||||
|
{
|
||||||
|
reject("download failed");
|
||||||
|
}
|
||||||
if (cache !== this.text)
|
if (cache !== this.text)
|
||||||
{
|
{
|
||||||
if (cache === null)
|
if (cache === null)
|
||||||
@ -1097,6 +1101,7 @@
|
|||||||
{
|
{
|
||||||
return new Promise(resolve =>
|
return new Promise(resolve =>
|
||||||
{
|
{
|
||||||
|
this.validateCache();
|
||||||
const promises = [];
|
const promises = [];
|
||||||
for (const key in settings)
|
for (const key in settings)
|
||||||
{
|
{
|
||||||
@ -1109,7 +1114,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.validateCache();
|
|
||||||
Promise.all(promises).then(() =>
|
Promise.all(promises).then(() =>
|
||||||
{
|
{
|
||||||
this.applySettingsWidgets();
|
this.applySettingsWidgets();
|
||||||
@ -1203,14 +1207,15 @@
|
|||||||
if (settings.cache.version !== settings.currentVersion)
|
if (settings.cache.version !== settings.currentVersion)
|
||||||
{
|
{
|
||||||
settings.cache = {};
|
settings.cache = {};
|
||||||
|
saveSettings(settings);
|
||||||
}
|
}
|
||||||
if (settings.cache.version === undefined)
|
if (settings.cache.version === undefined)
|
||||||
{
|
{
|
||||||
settings.cache.version = settings.currentVersion;
|
settings.cache.version = settings.currentVersion;
|
||||||
}
|
|
||||||
saveSettings(settings);
|
saveSettings(settings);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
loadResources();
|
loadResources();
|
||||||
loadSettings();
|
loadSettings();
|
||||||
@ -1220,12 +1225,12 @@
|
|||||||
resources.fetchByKey("toast").then(() =>
|
resources.fetchByKey("toast").then(() =>
|
||||||
{
|
{
|
||||||
Toast = resources.attributes.toast.export;
|
Toast = resources.attributes.toast.export;
|
||||||
resources.fetch();
|
resources.fetch().then(() => saveSettings(settings));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
resources.fetch();
|
resources.fetch().then(() => saveSettings(settings));
|
||||||
}
|
}
|
||||||
|
|
||||||
})(window.jQuery.noConflict(true));
|
})(window.jQuery.noConflict(true));
|
||||||
|
|||||||
@ -1 +1 @@
|
|||||||
1.5.29
|
1.5.30
|
||||||
Loading…
Reference in New Issue
Block a user