diff --git a/README.md b/README.md index 598c660..1829a37 100644 --- a/README.md +++ b/README.md @@ -43,6 +43,7 @@ In addition, you can access the files in the `/DATA/AppData/casamod/icon` direct | Name | Description | Author | | ---- | ----------- | ------ | +| add-widget-saying | Merger of hello and quotable 👋 | ChishFoxcat | | dont-change-my-icon | Disable auto-matching icons when editing image 🚫 | Cp0204 | | add-hostname-to-title | Add hostname to title ➕ | Cp0204 | | small-app-icon | Smaller app icons 🤏 | Cp0204 | diff --git a/README_CN.md b/README_CN.md index 9fd12ce..e04c139 100644 --- a/README_CN.md +++ b/README_CN.md @@ -42,6 +42,7 @@ | 名称 | 功能描述 | 作者 | | --- | -------- | ---- | +| add-widget-saying | 头像和一言融合版本 👋 | ChishFoxcat | | dont-change-my-icon | 禁止编辑镜像地址时自动匹配图标 🚫 | Cp0204 | | add-hostname-to-title | 添加主机名到网页标题 ➕ | Cp0204 | | small-app-icon | 更小的应用图标 🤏 | Cp0204 | diff --git a/app/mod/one-saying/mod.js b/app/mod/add-widget-saying/mod.js similarity index 88% rename from app/mod/one-saying/mod.js rename to app/mod/add-widget-saying/mod.js index 1d53bb5..d24291e 100644 --- a/app/mod/one-saying/mod.js +++ b/app/mod/add-widget-saying/mod.js @@ -7,7 +7,7 @@ userImage = "/v1/users/avatar?token=" + localStorage.getItem('access_token'); userName = JSON.parse(localStorage.getItem('user')).username; - saying = "你好!一言加载中..." + saying = localStorage.getItem('lang') === "zh_cn" ? "你好!一言加载中..." : "Hi, Saying is loading..."; newElement.innerHTML = `
@@ -17,12 +17,12 @@
- +
-

`+ userName + `

-

-

${saying}

+

${userName}

+

+ ${saying}

@@ -69,7 +69,7 @@ } document.querySelector('#saying').innerHTML = await cacheSaying(); - document.querySelector('#saying').addEventListener('click', async function() { + document.querySelector('#saying').addEventListener('click', async function () { document.querySelector('#saying').innerHTML = await cacheSaying(true); }); }