mirror of
https://github.com/the1812/Bilibili-Evolved.git
synced 2025-11-04 21:22:45 +08:00
Add html tag function
This commit is contained in:
parent
e76df573c8
commit
bcc32fd77d
1
@types/global/index.d.ts
vendored
1
@types/global/index.d.ts
vendored
@ -408,6 +408,7 @@ declare global {
|
||||
function dq(element: Element, selector: string): Element | null;
|
||||
function dqa(selector: string): Element[];
|
||||
function dqa(element: Element, selector: string): Element[];
|
||||
function html(strings: TemplateStringsArray, ...values: unknown[]): string
|
||||
const formatFileSize: (bytes: number, fixed?: number) => string
|
||||
const formatDuration: (time: number, fixed?: number) => string
|
||||
const ascendingSort: <T>(itemProp: (item: T) => number) => (a: T, b: T) => number
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
// ==UserScript==
|
||||
// @name Bilibili Evolved (Offline)
|
||||
// @version 450.72
|
||||
// @version 451.12
|
||||
// @description Bilibili Evolved 的离线版, 所有功能都已内置于脚本中.
|
||||
// @author Grant Howard, Coulomb-G
|
||||
// @copyright 2019, Grant Howard (https://github.com/the1812) & Coulomb-G (https://github.com/Coulomb-G)
|
||||
@ -190,6 +190,12 @@ const formatCount = (count) => {
|
||||
const escapeFilename = (filename, replacement = '') => {
|
||||
return filename.replace(/[\/\\:\*\?"<>\|]/g, replacement)
|
||||
}
|
||||
function html(strings, ...values) {
|
||||
return [...strings].reduce((previous, current, index) => {
|
||||
const value = values[index]
|
||||
return previous + current + (value === undefined ? '' : value)
|
||||
}, '')
|
||||
}
|
||||
|
||||
const customNavbarDefaultOrders = {
|
||||
blank1: 0,
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
// ==UserScript==
|
||||
// @name Bilibili Evolved (Preview Offline)
|
||||
// @version 450.72
|
||||
// @version 451.12
|
||||
// @description Bilibili Evolved 的预览离线版, 可以抢先体验新功能, 并且所有功能都已内置于脚本中.
|
||||
// @author Grant Howard, Coulomb-G
|
||||
// @copyright 2019, Grant Howard (https://github.com/the1812) & Coulomb-G (https://github.com/Coulomb-G)
|
||||
@ -190,6 +190,12 @@ const formatCount = (count) => {
|
||||
const escapeFilename = (filename, replacement = '') => {
|
||||
return filename.replace(/[\/\\:\*\?"<>\|]/g, replacement)
|
||||
}
|
||||
function html(strings, ...values) {
|
||||
return [...strings].reduce((previous, current, index) => {
|
||||
const value = values[index]
|
||||
return previous + current + (value === undefined ? '' : value)
|
||||
}, '')
|
||||
}
|
||||
|
||||
const customNavbarDefaultOrders = {
|
||||
blank1: 0,
|
||||
|
||||
@ -189,6 +189,12 @@ const formatCount = (count) => {
|
||||
const escapeFilename = (filename, replacement = '') => {
|
||||
return filename.replace(/[\/\\:\*\?"<>\|]/g, replacement)
|
||||
}
|
||||
function html(strings, ...values) {
|
||||
return [...strings].reduce((previous, current, index) => {
|
||||
const value = values[index]
|
||||
return previous + current + (value === undefined ? '' : value)
|
||||
}, '')
|
||||
}
|
||||
|
||||
const customNavbarDefaultOrders = {
|
||||
blank1: 0,
|
||||
|
||||
@ -189,6 +189,12 @@ const formatCount = (count) => {
|
||||
const escapeFilename = (filename, replacement = '') => {
|
||||
return filename.replace(/[\/\\:\*\?"<>\|]/g, replacement)
|
||||
}
|
||||
function html(strings, ...values) {
|
||||
return [...strings].reduce((previous, current, index) => {
|
||||
const value = values[index]
|
||||
return previous + current + (value === undefined ? '' : value)
|
||||
}, '')
|
||||
}
|
||||
|
||||
const customNavbarDefaultOrders = {
|
||||
blank1: 0,
|
||||
|
||||
BIN
min/bundle.zip
BIN
min/bundle.zip
Binary file not shown.
@ -153,3 +153,9 @@ export const formatCount = (count) => {
|
||||
export const escapeFilename = (filename, replacement = '') => {
|
||||
return filename.replace(/[\/\\:\*\?"<>\|]/g, replacement)
|
||||
}
|
||||
export function html(strings, ...values) {
|
||||
return [...strings].reduce((previous, current, index) => {
|
||||
const value = values[index]
|
||||
return previous + current + (value === undefined ? '' : value)
|
||||
}, '')
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user