From f1953d6d19f9461456ae70e0b3cbcb98da04d276 Mon Sep 17 00:00:00 2001 From: Mimi <1119186082@qq.com> Date: Sun, 22 Dec 2019 10:15:16 +0800 Subject: [PATCH] Drop $.ajax --- README.md | 2 +- waifu-tips.js | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 3bcc58f..4567379 100644 --- a/README.md +++ b/README.md @@ -118,7 +118,7 @@ https://github.com/akiroz/Live2D-Widget ## 更多 More -Live2D官方网站: +Live2D 官方网站: https://www.live2d.com/en/ https://live2d.github.io diff --git a/waifu-tips.js b/waifu-tips.js index 4d1454c..72bbd89 100755 --- a/waifu-tips.js +++ b/waifu-tips.js @@ -28,11 +28,9 @@ function loadWidget(waifuPath, apiPath) { if (!window.ASTEROIDSPLAYERS) window.ASTEROIDSPLAYERS = []; window.ASTEROIDSPLAYERS.push(new Asteroids()); } else { - $.ajax({ - url: "https://cdn.jsdelivr.net/gh/GalaxyMimi/CDN/asteroids.js", - dataType: "script", - cache: true - }); + var script = document.createElement('script'); + script.src = "https://cdn.jsdelivr.net/gh/GalaxyMimi/CDN/asteroids.js"; + document.head.appendChild(script); } }); document.querySelector("#waifu-tool .fa-user-circle").addEventListener("click", loadOtherModel);