diff --git a/README.md b/README.md
index fb65096e5..5d050bd7e 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
-
+
发现导航
@@ -70,7 +70,7 @@
- [https://faxian.vercel.app/](https://faxian.vercel.app/)
- [https://xjh22222228.github.io/nav-web/](https://xjh22222228.github.io/nav-web/)
-![Preview](https://cdn.jsdelivr.net/gh/xjh22222228/public@gh-pages/nav/preview.gif)
+![Preview](https://gcore.jsdelivr.net/gh/xjh22222228/public@gh-pages/nav/preview.gif)
## 可以干嘛
@@ -112,7 +112,7 @@
自有部署一直不是发现导航的需求目标,但陆续有人问,决定从`v8.8.0`版本开始支持!
-[成为我们的会员](https://cdn.jsdelivr.net/gh/xjh22222228/public@gh-pages/nav/support2.svg)
+[成为我们的会员](https://gcore.jsdelivr.net/gh/xjh22222228/public@gh-pages/nav/support2.svg)
#### Fork vs 自有部署
@@ -193,9 +193,9 @@ yarn build
您可以请作者喝杯咖啡,继续战斗下去(请备注 GitHub 名字)~
-
+
-
+
## License
diff --git a/scripts/db.mjs b/scripts/db.mjs
index 242b5ab6a..c33c237a7 100644
--- a/scripts/db.mjs
+++ b/scripts/db.mjs
@@ -1248,7 +1248,7 @@ export default [
id: 103,
},
{
- icon: 'https://cdn.jsdelivr.net/gh/txxxjs/fk/ifkdy/2020-03-16/favicon.ico',
+ icon: 'https://gcore.jsdelivr.net/gh/txxxjs/fk/ifkdy/2020-03-16/favicon.ico',
name: '疯狂影视搜索',
desc: '疯狂影视搜索是一款全能影视搜索引擎,帮你找到最新影视资源,一站拥有无尽影视资源',
url: 'http://ifkdy.com/',
diff --git a/scripts/loading.mjs b/scripts/loading.mjs
index 127f4849a..8698c11e2 100644
--- a/scripts/loading.mjs
+++ b/scripts/loading.mjs
@@ -25,7 +25,7 @@ export default {
`.trim(),
loading3: `
-
+
`.trim(),
diff --git a/scripts/start.mjs b/scripts/start.mjs
index f76a1a75d..4eb9f6f90 100644
--- a/scripts/start.mjs
+++ b/scripts/start.mjs
@@ -4,7 +4,14 @@
import fs from 'fs'
import path from 'path'
import defaultDb from './db.mjs'
-import { TAG_ID1, TAG_ID2, TAG_ID3, getWebCount, setWeb } from './util.mjs'
+import {
+ TAG_ID1,
+ TAG_ID2,
+ TAG_ID3,
+ getWebCount,
+ setWeb,
+ replaceJsdelivrCDN,
+} from './util.mjs'
const packagePath = path.join('.', 'package.json')
const packageJson = JSON.parse(fs.readFileSync(packagePath).toString())
@@ -50,7 +57,7 @@ try {
search = [
{
name: '站内',
- icon: 'https://cdn.jsdelivr.net/gh/xjh22222228/public@gh-pages/nav/logo.svg',
+ icon: 'https://gcore.jsdelivr.net/gh/xjh22222228/public@gh-pages/nav/logo.svg',
placeholder: '站内搜索',
blocked: false,
isInner: true,
@@ -58,7 +65,7 @@ try {
{
name: '百度',
url: 'https://www.baidu.com/s?wd=',
- icon: 'https://cdn.jsdelivr.net/gh/xjh22222228/nav-web@image/baidu.svg',
+ icon: 'https://gcore.jsdelivr.net/gh/xjh22222228/nav-web@image/baidu.svg',
placeholder: '百度一下',
blocked: false,
isInner: false,
@@ -66,21 +73,21 @@ try {
{
name: 'Google',
url: 'https://www.google.com/search?q=',
- icon: 'https://cdn.jsdelivr.net/gh/xjh22222228/nav-web@image/google.svg',
+ icon: 'https://gcore.jsdelivr.net/gh/xjh22222228/nav-web@image/google.svg',
blocked: false,
isInner: false,
},
{
name: '必应',
url: 'https://cn.bing.com/search?q=',
- icon: 'https://cdn.jsdelivr.net/gh/xjh22222228/nav-web@image/bing.svg',
+ icon: 'https://gcore.jsdelivr.net/gh/xjh22222228/nav-web@image/bing.svg',
blocked: false,
isInner: false,
},
{
name: 'GitHub',
url: 'https://github.com/search?q=',
- icon: 'https://cdn.jsdelivr.net/gh/xjh22222228/nav-web@image/github.svg',
+ icon: 'https://gcore.jsdelivr.net/gh/xjh22222228/nav-web@image/github.svg',
placeholder: 'Search GitHub',
blocked: false,
isInner: false,
@@ -88,14 +95,14 @@ try {
{
name: '知乎',
url: 'https://www.zhihu.com/search?type=content&q=',
- icon: 'https://cdn.jsdelivr.net/gh/xjh22222228/nav-web@image/zhihu.svg',
+ icon: 'https://gcore.jsdelivr.net/gh/xjh22222228/nav-web@image/zhihu.svg',
blocked: false,
isInner: false,
},
{
name: '豆瓣',
url: 'https://search.douban.com/book/subject_search?search_text=',
- icon: 'https://cdn.jsdelivr.net/gh/xjh22222228/nav-web@image/douban.svg',
+ icon: 'https://gcore.jsdelivr.net/gh/xjh22222228/nav-web@image/douban.svg',
placeholder: '书名、作者、ISBN',
blocked: false,
isInner: false,
@@ -105,6 +112,11 @@ try {
encoding: 'utf-8',
})
}
+
+ search = search.map((item) => {
+ item.icon = replaceJsdelivrCDN(item.icon)
+ return item
+ })
}
{
@@ -152,14 +164,14 @@ try {
{
const banner1 =
- 'https://cdn.jsdelivr.net/gh/xjh22222228/public@gh-pages/nav/banner1.jpg'
+ 'https://gcore.jsdelivr.net/gh/xjh22222228/public@gh-pages/nav/banner1.jpg'
const banner2 =
- 'https://cdn.jsdelivr.net/gh/xjh22222228/public@gh-pages/nav/banner2.jpg'
+ 'https://gcore.jsdelivr.net/gh/xjh22222228/public@gh-pages/nav/banner2.jpg'
const backgroundImg =
- 'https://cdn.jsdelivr.net/gh/xjh22222228/public@gh-pages/nav/background.jpg'
+ 'https://gcore.jsdelivr.net/gh/xjh22222228/public@gh-pages/nav/background.jpg'
settings.favicon ??=
- 'https://cdn.jsdelivr.net/gh/xjh22222228/public@gh-pages/nav/logo.svg'
+ 'https://gcore.jsdelivr.net/gh/xjh22222228/public@gh-pages/nav/logo.svg'
settings.language ||= 'zh-CN'
settings.loading ??= 'random'
settings.allowCollect ??= true
@@ -210,11 +222,11 @@ try {
settings.superTitle ??= ''
const defImgs = [
{
- src: 'https://cdn.jsdelivr.net/gh/xjh22222228/nav-web@image/nav-1717494364392-ad.jpg',
+ src: 'https://gcore.jsdelivr.net/gh/xjh22222228/nav-web@image/nav-1717494364392-ad.jpg',
url: 'https://haokawx.lot-ml.com/Product/index/454266',
},
{
- src: 'https://cdn.jsdelivr.net/gh/xjh22222228/public@gh-pages/img/10.png',
+ src: 'https://gcore.jsdelivr.net/gh/xjh22222228/public@gh-pages/img/10.png',
url: '',
},
]
@@ -267,6 +279,29 @@ try {
settings.loadingCode ??= ''
settings.appCardStyle ??= 'common'
+
+ // 替换CDN
+ settings.favicon = replaceJsdelivrCDN(settings.favicon)
+ settings.simThemeImages = settings.simThemeImages.map((item) => {
+ item.src = replaceJsdelivrCDN(item.src)
+ return item
+ })
+ settings.superImages = settings.superImages.map((item) => {
+ item.src = replaceJsdelivrCDN(item.src)
+ return item
+ })
+ settings.lightImages = settings.lightImages.map((item) => {
+ item.src = replaceJsdelivrCDN(item.src)
+ return item
+ })
+ settings.sideThemeImages = settings.sideThemeImages.map((item) => {
+ item.src = replaceJsdelivrCDN(item.src)
+ return item
+ })
+ settings.shortcutThemeImages = settings.shortcutThemeImages.map((item) => {
+ item.src = replaceJsdelivrCDN(item.src)
+ return item
+ })
fs.writeFileSync(settingsPath, JSON.stringify(settings), {
encoding: 'utf-8',
})
diff --git a/scripts/util.mjs b/scripts/util.mjs
index c2b523f0f..206beab12 100644
--- a/scripts/util.mjs
+++ b/scripts/util.mjs
@@ -124,6 +124,7 @@ export function setWeb(nav) {
webItem.name ||= ''
webItem.desc ||= ''
webItem.icon ||= ''
+ webItem.icon = replaceJsdelivrCDN(webItem.icon)
webItem.url = webItem.url.trim()
webItem.desc = webItem.desc.trim()
@@ -395,3 +396,10 @@ export async function spiderWeb(db, settings) {
time: diff,
}
}
+
+export function replaceJsdelivrCDN(str = '') {
+ // testingcf.jsdelivr.net
+ // img.jsdmirror.com
+ // gcore.jsdelivr.net
+ return str.replace('cdn.jsdelivr.net', 'gcore.jsdelivr.net')
+}
diff --git a/src/api/index.ts b/src/api/index.ts
index 73f01afdd..ccedd95b6 100644
--- a/src/api/index.ts
+++ b/src/api/index.ts
@@ -233,7 +233,7 @@ export function getCDN(path: string, branch = 'image') {
if (isGitee()) {
return `https://gitee.com/${authorName}/${repoName}/raw/${branch}/${path}`
}
- return `https://cdn.jsdelivr.net/gh/${authorName}/${repoName}@${branch}/${path}`
+ return `https://gcore.jsdelivr.net/gh/${authorName}/${repoName}@${branch}/${path}`
}
function requestActionUrl() {
diff --git a/src/view/system/about/index.component.html b/src/view/system/about/index.component.html
index 57f794dff..2cb2fc79e 100644
--- a/src/view/system/about/index.component.html
+++ b/src/view/system/about/index.component.html
@@ -10,6 +10,6 @@
在使用过程遇到任何问题可发送邮件寻求帮助
diff --git a/src/view/system/vip-auth/index.component.html b/src/view/system/vip-auth/index.component.html
index 0fc8e0e37..65b17f02e 100644
--- a/src/view/system/vip-auth/index.component.html
+++ b/src/view/system/vip-auth/index.component.html
@@ -17,7 +17,7 @@