Add rpc option profiles

This commit is contained in:
the1812 2019-09-06 20:27:31 +08:00
parent c6481aa2c5
commit bbdca79f60
7 changed files with 67 additions and 47 deletions

View File

@ -49,6 +49,9 @@ declare global {
skipByDefault: boolean
maxDownloadLimit: string
}
interface RpcOptionProfile extends RpcOption {
name: string
}
interface SearchHistoryItem {
keyword: string
count: number
@ -334,6 +337,7 @@ declare global {
foldComment: boolean,
downloadVideoDefaultDanmaku: '无' | 'XML' | 'ASS',
aria2RpcOption: RpcOption,
aria2RpcOptionProfiles: RpcOptionProfile[],
searchHistory: SearchHistoryItem[],
seedsToCoins: boolean,
autoSeedsToCoins: boolean,
@ -349,6 +353,7 @@ declare global {
}
const settings: BilibiliEvolvedSettings;
const customNavbarDefaultOrders: CustomNavbarOrders;
const aria2RpcDefaultOption: RpcOption;
const languageNameToCode: { [key: string]: string };
const languageCodeToName: { [key: string]: string };
function logError(message: Error | string): void;

View File

@ -1,6 +1,6 @@
// ==UserScript==
// @name Bilibili Evolved (Offline)
// @version 417.19
// @version 417.20
// @description Bilibili Evolved 的离线版, 所有功能都已内置于脚本中.
// @author Grant Howard, Coulomb-G
// @copyright 2019, Grant Howard (https://github.com/the1812) & Coulomb-G (https://github.com/Coulomb-G)
@ -177,6 +177,16 @@ const customNavbarDefaultOrders = {
upload: 19,
blank3: 20,
}
const aria2RpcDefaultOption = {
secretKey: '',
dir: '',
host: '127.0.0.1',
port: '6800',
method: 'get',
skipByDefault: false,
maxDownloadLimit: '',
baseDir: '',
}
const settings = {
useDarkStyle: false,
compactLayout: false,
@ -281,15 +291,8 @@ const settings = {
hideCategory: false,
foldComment: true,
downloadVideoDefaultDanmaku: '无',
aria2RpcOption: {
secretKey: '',
dir: '',
host: '127.0.0.1',
port: '6800',
method: 'get',
skipByDefault: false,
maxDownloadLimit: '',
},
aria2RpcOption: {...aria2RpcDefaultOption},
aria2RpcOptionProfiles: [],
searchHistory: [],
seedsToCoins: true,
autoSeedsToCoins: true,

View File

@ -1,6 +1,6 @@
// ==UserScript==
// @name Bilibili Evolved (Preview Offline)
// @version 417.19
// @version 417.20
// @description Bilibili Evolved 的预览离线版, 可以抢先体验新功能, 并且所有功能都已内置于脚本中.
// @author Grant Howard, Coulomb-G
// @copyright 2019, Grant Howard (https://github.com/the1812) & Coulomb-G (https://github.com/Coulomb-G)
@ -177,6 +177,16 @@ const customNavbarDefaultOrders = {
upload: 19,
blank3: 20,
}
const aria2RpcDefaultOption = {
secretKey: '',
dir: '',
host: '127.0.0.1',
port: '6800',
method: 'get',
skipByDefault: false,
maxDownloadLimit: '',
baseDir: '',
}
const settings = {
useDarkStyle: false,
compactLayout: false,
@ -281,15 +291,8 @@ const settings = {
hideCategory: false,
foldComment: true,
downloadVideoDefaultDanmaku: '无',
aria2RpcOption: {
secretKey: '',
dir: '',
host: '127.0.0.1',
port: '6800',
method: 'get',
skipByDefault: false,
maxDownloadLimit: '',
},
aria2RpcOption: {...aria2RpcDefaultOption},
aria2RpcOptionProfiles: [],
searchHistory: [],
seedsToCoins: true,
autoSeedsToCoins: true,

View File

@ -176,6 +176,16 @@ const customNavbarDefaultOrders = {
upload: 19,
blank3: 20,
}
const aria2RpcDefaultOption = {
secretKey: '',
dir: '',
host: '127.0.0.1',
port: '6800',
method: 'get',
skipByDefault: false,
maxDownloadLimit: '',
baseDir: '',
}
const settings = {
useDarkStyle: false,
compactLayout: false,
@ -280,15 +290,8 @@ const settings = {
hideCategory: false,
foldComment: true,
downloadVideoDefaultDanmaku: '无',
aria2RpcOption: {
secretKey: '',
dir: '',
host: '127.0.0.1',
port: '6800',
method: 'get',
skipByDefault: false,
maxDownloadLimit: '',
},
aria2RpcOption: {...aria2RpcDefaultOption},
aria2RpcOptionProfiles: [],
searchHistory: [],
seedsToCoins: true,
autoSeedsToCoins: true,

View File

@ -176,6 +176,16 @@ const customNavbarDefaultOrders = {
upload: 19,
blank3: 20,
}
const aria2RpcDefaultOption = {
secretKey: '',
dir: '',
host: '127.0.0.1',
port: '6800',
method: 'get',
skipByDefault: false,
maxDownloadLimit: '',
baseDir: '',
}
const settings = {
useDarkStyle: false,
compactLayout: false,
@ -280,15 +290,8 @@ const settings = {
hideCategory: false,
foldComment: true,
downloadVideoDefaultDanmaku: '无',
aria2RpcOption: {
secretKey: '',
dir: '',
host: '127.0.0.1',
port: '6800',
method: 'get',
skipByDefault: false,
maxDownloadLimit: '',
},
aria2RpcOption: {...aria2RpcDefaultOption},
aria2RpcOptionProfiles: [],
searchHistory: [],
seedsToCoins: true,
autoSeedsToCoins: true,

Binary file not shown.

View File

@ -21,6 +21,16 @@ export const customNavbarDefaultOrders = {
upload: 19,
blank3: 20,
}
export const aria2RpcDefaultOption = {
secretKey: '',
dir: '',
host: '127.0.0.1',
port: '6800',
method: 'get',
skipByDefault: false,
maxDownloadLimit: '',
baseDir: '',
}
export const settings = {
useDarkStyle: false,
compactLayout: false,
@ -125,15 +135,8 @@ export const settings = {
hideCategory: false,
foldComment: true,
downloadVideoDefaultDanmaku: '无',
aria2RpcOption: {
secretKey: '',
dir: '',
host: '127.0.0.1',
port: '6800',
method: 'get',
skipByDefault: false,
maxDownloadLimit: '',
},
aria2RpcOption: {...aria2RpcDefaultOption},
aria2RpcOptionProfiles: [],
searchHistory: [],
seedsToCoins: true,
autoSeedsToCoins: true,