From cbc2d1867b5fd94368af3756ad264ecb8ecf2aaf Mon Sep 17 00:00:00 2001 From: Monet Joe <20459298+george-chou@users.noreply.github.com> Date: Mon, 3 Jul 2023 12:36:50 +0800 Subject: [PATCH] Revert "feat: credits" --- README.md | 2 +- index.html | 7 +++--- static/css/style.css | 11 +-------- static/js/preload.js | 55 -------------------------------------------- static/js/script.js | 8 +++---- 5 files changed, 8 insertions(+), 75 deletions(-) delete mode 100644 static/js/preload.js diff --git a/README.md b/README.md index 41d97a4..39665c2 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ The counter has paused, awaiting additional remediation measures, as a result of [![Chat on Discord](https://img.shields.io/badge/chat-discord-blue?style=flat&logo=discord)](https://discord.gg/yzkEz6xxdM) # Herta Kuru | 黑塔转圈圈 | ヘルタクルへ -[Home Page | 主页 | ホーム ページ (Netlify)](https://herta.ft2.ltd/) +[Home Page | 主页 | ホーム ページ](https://duiqt.github.io/herta_kuru) Herta GIF and art made by | 黑塔 GIF 绘画者 : [@Seseren_kr](https://twitter.com/Seseren_kr) diff --git a/index.html b/index.html index 87b07ff..2277616 100644 --- a/index.html +++ b/index.html @@ -6,9 +6,8 @@ Kuru Kuru~ - - - + + @@ -76,7 +75,7 @@

The kuru~ has been squished

- + diff --git a/static/css/style.css b/static/css/style.css index 7da9b7a..9a37b76 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -130,7 +130,6 @@ h2 { } #counter-button { - visibility: hidden; background-color: #574f84; border: none; border-radius: 16px; @@ -359,12 +358,4 @@ h2 { /* position: absolute; */ top: 0px; left: 0px; -} - -/* .bili-icon { - background: url('https://www.bilibili.com/favicon.ico'); - display: block; - width: 32px; - height: 32px; - float: right; -} */ \ No newline at end of file +} \ No newline at end of file diff --git a/static/js/preload.js b/static/js/preload.js deleted file mode 100644 index d131186..0000000 --- a/static/js/preload.js +++ /dev/null @@ -1,55 +0,0 @@ -async function convertMp3FilesToBase64(dict) { - const promises = []; - for (const lang in dict) { - if (dict.hasOwnProperty(lang)) { - const audioList = dict[lang].audioList; - if (Array.isArray(audioList)) { - for (let i = 0; i < audioList.length; i++) { - const url = audioList[i]; - if (typeof url === "string" && url.endsWith(".mp3")) { - promises.push(loadAndEncode("static/" + url).then(result => dict[lang].audioList[i] = result)); - } - } - } - } - } - await Promise.all(promises); - return dict; -} - -function loadAndEncode(url) { - return new Promise((resolve, reject) => { - const xhr = new XMLHttpRequest(); - xhr.open("GET", url, true); - xhr.responseType = "arraybuffer"; - xhr.onload = function () { - if (xhr.status === 200) { - const buffer = xhr.response; - const blob = new Blob([buffer], { type: "audio/mpeg" }); - const reader = new FileReader(); - reader.readAsDataURL(blob); - reader.onloadend = function () { - const base64data = reader.result; - resolve(base64data); - } - } else { - reject(xhr.statusText); - } - }; - xhr.onerror = function () { - reject(xhr.statusText); - }; - xhr.send(); - }); -} - -window.onload = function () { - // Calling method - convertMp3FilesToBase64(LANGUAGES).then(() => { - // show counter-button - document.getElementById('counter-button').style.visibility = 'visible'; - // Other operations on dict or passed to other functions for processing - }).catch(error => { - console.error(error); - }); -} \ No newline at end of file diff --git a/static/js/script.js b/static/js/script.js index 741cb3f..5933bce 100644 --- a/static/js/script.js +++ b/static/js/script.js @@ -424,14 +424,12 @@ const progress = [0, 1]; }); }; - - // NOTE the deployment on Github pages is stopped and deprecated. - // TODO Waiting for decision as the final production website + // NOTE the deployment on Github pages is stopped and deprecated. This tip is not useful anymore. // if (location.hostname.endsWith("duiqt.github.io")) { - // window.location.href = "https://herta.ft2.ltd"; + // window.location.href = "https://herta.onrender.com"; // } - // A fun manual implementation for integration between MDUI and Font-Awesome + // This function create bilibili icon in 2 cases: activated & inactivated function bilibiliIcon(color) { return `