From cfafafaa51f9eb50d8cb9e309495f6bc06b567a9 Mon Sep 17 00:00:00 2001 From: Mimi <1119186082@qq.com> Date: Sat, 21 May 2022 02:40:56 +0800 Subject: [PATCH] Update CDN URL --- README.md | 6 +++--- autoload.js | 4 ++-- demo/demo.html | 2 +- demo/login.html | 4 ++-- waifu-tips.js | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 9e9052f..cf0192f 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ Add Live2D widget to web page. Compatible with PJAX. 本插件需要 Font Awesome 图标支持,请确保相关样式表已在页面中加载。以 Font Awesome v6 为例,请在 `` 中加入: Font Awesome is required for this plugin. Take Font Awesome v6 as an example, please add the following in ``: ```xml - + ``` 否则图标将无法正常显示。(如果网页中已经加载了任何版本的 Font Awesome,就不要重复加载了) @@ -39,7 +39,7 @@ Font Awesome is required for this plugin. Take Font Awesome v6 as an example, pl 将这一行代码加入 `` 或 ``,即可展现出效果: ```xml - + ``` 如果网站启用了 PJAX,由于看板娘不必每页刷新,因此要注意将相关脚本放到 PJAX 刷新区域之外。 @@ -53,7 +53,7 @@ Font Awesome is required for this plugin. Take Font Awesome v6 as an example, pl 要自定义有关内容,可以把这个仓库 Fork 一份,然后进行修改。这时,使用方法对应地变为 ```xml - + ``` 将此处的 `username` 替换为你的 GitHub 用户名。为了使 CDN 的内容正常刷新,需要创建新的 git tag 并推送至 GitHub 仓库中,否则此处的 `@latest` 仍然指向更新前的文件。此外 CDN 本身存在缓存,因此改动可能需要一定的时间生效。相关文档: - [Git Basics - Tagging](https://git-scm.com/book/en/v2/Git-Basics-Tagging) diff --git a/autoload.js b/autoload.js index e9ae7e9..3f585a6 100644 --- a/autoload.js +++ b/autoload.js @@ -1,5 +1,5 @@ // 注意:live2d_path 参数应使用绝对路径 -const live2d_path = "https://cdn.jsdelivr.net/gh/stevenjoezhang/live2d-widget@latest/"; +const live2d_path = "https://fastly.jsdelivr.net/gh/stevenjoezhang/live2d-widget@latest/"; //const live2d_path = "/live2d-widget/"; // 封装异步加载资源的方法 @@ -34,7 +34,7 @@ if (screen.width >= 768) { initWidget({ waifuPath: live2d_path + "waifu-tips.json", //apiPath: "https://live2d.fghrsh.net/api/", - cdnPath: "https://cdn.jsdelivr.net/gh/fghrsh/live2d_api/" + cdnPath: "https://fastly.jsdelivr.net/gh/fghrsh/live2d_api/" }); }); } diff --git a/demo/demo.html b/demo/demo.html index 2c5e37d..366d4ce 100755 --- a/demo/demo.html +++ b/demo/demo.html @@ -3,7 +3,7 @@ Live2D 看板娘 / Demo - +