From ad5ae36af78793cd78236cb025307991d14833ab Mon Sep 17 00:00:00 2001 From: the1812 Date: Sat, 27 Jul 2019 12:44:08 +0800 Subject: [PATCH] Add search history settings --- @types/global/index.d.ts | 5 +++++ bilibili-evolved.offline.user.js | 7 ++++--- bilibili-evolved.preview-offline.user.js | 7 ++++--- bilibili-evolved.preview.user.js | 5 +++-- bilibili-evolved.user.js | 5 +++-- client/resource-manifest.js | 2 +- client/settings.js | 3 ++- 7 files changed, 22 insertions(+), 12 deletions(-) diff --git a/@types/global/index.d.ts b/@types/global/index.d.ts index 871b1ff83..46e5d6114 100644 --- a/@types/global/index.d.ts +++ b/@types/global/index.d.ts @@ -13,6 +13,10 @@ declare global { method: 'get' | 'post' skipByDefault: boolean } + interface SearchHistoryItem { + keyword: string + count: number + } interface MonkeyInfo { script: { author: string; @@ -292,6 +296,7 @@ declare global { foldComment: boolean, downloadVideoDefaultDanmaku: '无' | 'XML' | 'ASS', aria2RpcOption: RpcOption, + searchHistory: SearchHistoryItem[], latestVersionLink: string, currentVersion: string, } diff --git a/bilibili-evolved.offline.user.js b/bilibili-evolved.offline.user.js index 84075ca54..10b3495c9 100644 --- a/bilibili-evolved.offline.user.js +++ b/bilibili-evolved.offline.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name Bilibili Evolved (Offline) -// @version 375.22 +// @version 375.87 // @description Bilibili Evolved 的离线版, 所有功能都已内置于脚本中. // @author Grant Howard, Coulomb-G // @copyright 2019, Grant Howard (https://github.com/the1812) & Coulomb-G (https://github.com/Coulomb-G) @@ -242,7 +242,7 @@ const settings = { hideHomeLive: false, noMiniVideoAutoplay: false, useDefaultVideoSpeed: false, - defaultVideoSpeed: '1', + defaultVideoSpeed: '1.0', hideCategory: false, foldComment: true, downloadVideoDefaultDanmaku: '无', @@ -254,6 +254,7 @@ const settings = { method: 'get', skipByDefault: false, }, + searchHistory: [], cache: {}, } const fixedSettings = { @@ -1921,7 +1922,7 @@ Resource.manifest = { }, dropdown: { key: 'defaultVideoSpeed', - items: ['0.5', '0.75', '1', '1.25', '1.5', '2.0'], + items: ['0.5', '0.75', '1.0', '1.25', '1.5', '2.0'], } }, aria2Rpc: { diff --git a/bilibili-evolved.preview-offline.user.js b/bilibili-evolved.preview-offline.user.js index 2af1538e5..e405ab182 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 375.22 +// @version 375.87 // @description Bilibili Evolved 的预览离线版, 可以抢先体验新功能, 并且所有功能都已内置于脚本中. // @author Grant Howard, Coulomb-G // @copyright 2019, Grant Howard (https://github.com/the1812) & Coulomb-G (https://github.com/Coulomb-G) @@ -242,7 +242,7 @@ const settings = { hideHomeLive: false, noMiniVideoAutoplay: false, useDefaultVideoSpeed: false, - defaultVideoSpeed: '1', + defaultVideoSpeed: '1.0', hideCategory: false, foldComment: true, downloadVideoDefaultDanmaku: '无', @@ -254,6 +254,7 @@ const settings = { method: 'get', skipByDefault: false, }, + searchHistory: [], cache: {}, } const fixedSettings = { @@ -1921,7 +1922,7 @@ Resource.manifest = { }, dropdown: { key: 'defaultVideoSpeed', - items: ['0.5', '0.75', '1', '1.25', '1.5', '2.0'], + items: ['0.5', '0.75', '1.0', '1.25', '1.5', '2.0'], } }, aria2Rpc: { diff --git a/bilibili-evolved.preview.user.js b/bilibili-evolved.preview.user.js index 608e08a5d..688b03385 100644 --- a/bilibili-evolved.preview.user.js +++ b/bilibili-evolved.preview.user.js @@ -241,7 +241,7 @@ const settings = { hideHomeLive: false, noMiniVideoAutoplay: false, useDefaultVideoSpeed: false, - defaultVideoSpeed: '1', + defaultVideoSpeed: '1.0', hideCategory: false, foldComment: true, downloadVideoDefaultDanmaku: '无', @@ -253,6 +253,7 @@ const settings = { method: 'get', skipByDefault: false, }, + searchHistory: [], cache: {}, } const fixedSettings = { @@ -1834,7 +1835,7 @@ Resource.manifest = { }, dropdown: { key: 'defaultVideoSpeed', - items: ['0.5', '0.75', '1', '1.25', '1.5', '2.0'], + items: ['0.5', '0.75', '1.0', '1.25', '1.5', '2.0'], } }, aria2Rpc: { diff --git a/bilibili-evolved.user.js b/bilibili-evolved.user.js index 91f451a00..f71b27152 100644 --- a/bilibili-evolved.user.js +++ b/bilibili-evolved.user.js @@ -241,7 +241,7 @@ const settings = { hideHomeLive: false, noMiniVideoAutoplay: false, useDefaultVideoSpeed: false, - defaultVideoSpeed: '1', + defaultVideoSpeed: '1.0', hideCategory: false, foldComment: true, downloadVideoDefaultDanmaku: '无', @@ -253,6 +253,7 @@ const settings = { method: 'get', skipByDefault: false, }, + searchHistory: [], cache: {}, } const fixedSettings = { @@ -1834,7 +1835,7 @@ Resource.manifest = { }, dropdown: { key: 'defaultVideoSpeed', - items: ['0.5', '0.75', '1', '1.25', '1.5', '2.0'], + items: ['0.5', '0.75', '1.0', '1.25', '1.5', '2.0'], } }, aria2Rpc: { diff --git a/client/resource-manifest.js b/client/resource-manifest.js index 290b29266..b687c02f5 100644 --- a/client/resource-manifest.js +++ b/client/resource-manifest.js @@ -644,7 +644,7 @@ Resource.manifest = { }, dropdown: { key: 'defaultVideoSpeed', - items: ['0.5', '0.75', '1', '1.25', '1.5', '2.0'], + items: ['0.5', '0.75', '1.0', '1.25', '1.5', '2.0'], } }, aria2Rpc: { diff --git a/client/settings.js b/client/settings.js index d79955755..1b4e2813b 100644 --- a/client/settings.js +++ b/client/settings.js @@ -123,7 +123,7 @@ export const settings = { hideHomeLive: false, noMiniVideoAutoplay: false, useDefaultVideoSpeed: false, - defaultVideoSpeed: '1', + defaultVideoSpeed: '1.0', hideCategory: false, foldComment: true, downloadVideoDefaultDanmaku: '无', @@ -135,6 +135,7 @@ export const settings = { method: 'get', skipByDefault: false, }, + searchHistory: [], cache: {}, } const fixedSettings = {