Skip to content

Commit

Permalink
Fix cdn
Browse files Browse the repository at this point in the history
  • Loading branch information
qiuxiang committed Oct 12, 2023
1 parent 5567994 commit e42f9d4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ canvaskit 实现,超级丝滑的原神地图,数据来源:[空荧酒馆](h
在线链接:

- https://qiuxiang.github.io/ky-genshin-map/ (github pages)
- https://7c00.top/ky-genshin-map/ (cloudflare)
- http://7c00.top/ky-genshin-map/ (cloudflare)
- http://106.55.55.247:8000/ (国内测试)

![图片](https://github.com/qiuxiang/ky-genshin-map/assets/1709072/2ea4b8e7-1978-4b95-a353-cc712a01b21e)
Expand Down
6 changes: 5 additions & 1 deletion src/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@ export const store = proxy({

async function init() {
const [response] = await Promise.all([
fetch("http://ky-genshin-map.test.upcdn.net/data.txt"),
fetch(
location.protocol == "http:"
? "http://ky-genshin-map.test.upcdn.net/data.txt"
: require("./data.bin")
),
initCanvaskit({
locateFile() {
return "https://cdn.staticfile.org/canvaskit-wasm/0.38.2/canvaskit.wasm";
Expand Down

0 comments on commit e42f9d4

Please sign in to comment.