mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2026-04-16 19:20:53 +08:00
feat: 随机背景(修正上次的错误)
This commit is contained in:
@@ -89,12 +89,6 @@ hexo.extend.helper.register('findArchivesTitle', function (page, menu, date) {
|
||||
hexo.extend.helper.register('getBgPath', function (path) {
|
||||
if (!path) return ''
|
||||
|
||||
// Random background
|
||||
if (Array.isArray(path)) {
|
||||
const i = Math.floor(Math.random() * path.length)
|
||||
path = path[i]
|
||||
}
|
||||
|
||||
const absoluteUrlPattern = /^(?:[a-z][a-z\d+.-]*:)?\/\//i
|
||||
const relativeUrlPattern = /^(\.\/|\.\.\/|\/|[^/]+\/).*$/
|
||||
const colorPattern = /^(#|rgb|rgba|hsl|hsla)/i
|
||||
|
||||
Reference in New Issue
Block a user