From 3d6e6675afd169bbfd77bd5bb84e306bcad1195d Mon Sep 17 00:00:00 2001 From: the1812 Date: Sun, 30 Dec 2018 16:54:27 +0800 Subject: [PATCH] Fix bugs --- bilibili-evolved.offline.user.js | 10 ++++++---- bilibili-evolved.preview-offline.user.js | 10 ++++++---- bilibili-evolved.preview.user.js | 8 +++++--- bilibili-evolved.user.js | 8 +++++--- 4 files changed, 22 insertions(+), 14 deletions(-) diff --git a/bilibili-evolved.offline.user.js b/bilibili-evolved.offline.user.js index 4b7858498..14fc3b74e 100644 --- a/bilibili-evolved.offline.user.js +++ b/bilibili-evolved.offline.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name Bilibili Evolved (Offline) -// @version 167.04 +// @version 167.05 // @description 增强哔哩哔哩Web端体验(离线版): 修复界面瑕疵, 删除广告, 使用夜间模式浏览; 下载视频,封面,弹幕, 以及增加对触屏设备的支持等. // @author Grant Howard, Coulomb-G // @copyright 2018, Grant Howrad (https://github.com/the1812) @@ -95,7 +95,7 @@ { if (settings.toastInternalError) { - Toast.error("stack" in message + Toast.error(typeof message === "object" && "stack" in message ? message.stack : message, "错误"); } @@ -456,9 +456,11 @@ path: "min/download-video.min.js", dependencies: [ "downloadVideoDom", - "downloadVideoStyle", // "videoInfo", ], + style: [ + "downloadVideoStyle", + ], displayNames: { "downloadVideo": "下载视频", }, @@ -837,7 +839,7 @@ } static select(query, action, failed) { - return SpinQuery.condition(query, it => it !== null, action, failed); + return SpinQuery.condition(query, it => it !== null && it !== undefined && !isNaN(it), action, failed); } static any(query, action, failed) { diff --git a/bilibili-evolved.preview-offline.user.js b/bilibili-evolved.preview-offline.user.js index 7150425cb..4908ae74d 100644 --- a/bilibili-evolved.preview-offline.user.js +++ b/bilibili-evolved.preview-offline.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name Bilibili Evolved (Preview Offline) -// @version 167.04 +// @version 167.05 // @description 增强哔哩哔哩Web端体验(预览离线版): 修复界面瑕疵, 删除广告, 使用夜间模式浏览; 下载视频,封面,弹幕, 以及增加对触屏设备的支持等. // @author Grant Howard, Coulomb-G // @copyright 2018, Grant Howrad (https://github.com/the1812) @@ -95,7 +95,7 @@ { if (settings.toastInternalError) { - Toast.error("stack" in message + Toast.error(typeof message === "object" && "stack" in message ? message.stack : message, "错误"); } @@ -456,9 +456,11 @@ path: "min/download-video.min.js", dependencies: [ "downloadVideoDom", - "downloadVideoStyle", // "videoInfo", ], + style: [ + "downloadVideoStyle", + ], displayNames: { "downloadVideo": "下载视频", }, @@ -837,7 +839,7 @@ } static select(query, action, failed) { - return SpinQuery.condition(query, it => it !== null, action, failed); + return SpinQuery.condition(query, it => it !== null && it !== undefined && !isNaN(it), action, failed); } static any(query, action, failed) { diff --git a/bilibili-evolved.preview.user.js b/bilibili-evolved.preview.user.js index f9a808bfd..2d6ce51ba 100644 --- a/bilibili-evolved.preview.user.js +++ b/bilibili-evolved.preview.user.js @@ -94,7 +94,7 @@ { if (settings.toastInternalError) { - Toast.error("stack" in message + Toast.error(typeof message === "object" && "stack" in message ? message.stack : message, "错误"); } @@ -455,9 +455,11 @@ path: "min/download-video.min.js", dependencies: [ "downloadVideoDom", - "downloadVideoStyle", // "videoInfo", ], + style: [ + "downloadVideoStyle", + ], displayNames: { "downloadVideo": "下载视频", }, @@ -836,7 +838,7 @@ } static select(query, action, failed) { - return SpinQuery.condition(query, it => it !== null, action, failed); + return SpinQuery.condition(query, it => it !== null && it !== undefined && !isNaN(it), action, failed); } static any(query, action, failed) { diff --git a/bilibili-evolved.user.js b/bilibili-evolved.user.js index 82de52cf2..7a52479cc 100644 --- a/bilibili-evolved.user.js +++ b/bilibili-evolved.user.js @@ -94,7 +94,7 @@ { if (settings.toastInternalError) { - Toast.error("stack" in message + Toast.error(typeof message === "object" && "stack" in message ? message.stack : message, "错误"); } @@ -455,9 +455,11 @@ path: "min/download-video.min.js", dependencies: [ "downloadVideoDom", - "downloadVideoStyle", // "videoInfo", ], + style: [ + "downloadVideoStyle", + ], displayNames: { "downloadVideo": "下载视频", }, @@ -836,7 +838,7 @@ } static select(query, action, failed) { - return SpinQuery.condition(query, it => it !== null, action, failed); + return SpinQuery.condition(query, it => it !== null && it !== undefined && !isNaN(it), action, failed); } static any(query, action, failed) {