Skip to content

Commit e834387

Browse files
committed
style: 格式化代码并更新注释
1 parent 1322e29 commit e834387

2 files changed

Lines changed: 10 additions & 7 deletions

File tree

shared/md5.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ function md5(string) {
184184
}
185185

186186
function str2rstrUTF8(input) {
187-
// 浣跨敤 decodeURIComponent 鏇夸唬宸插純鐢ㄧ殑 unescape
187+
// 使用 decodeURIComponent 替代已弃用的 unescape
188188
return decodeURIComponent(encodeURIComponent(input));
189189
}
190190

@@ -196,8 +196,8 @@ function md5(string) {
196196
}
197197

198198
return hexMD5(string);
199-
}
200-
/* eslint-enable */
201-
202-
// 导出到 window 对象以便全局访问
203-
window.md5 = md5;
199+
}
200+
/* eslint-enable */
201+
202+
// 导出到 window 对象以便全局访问
203+
window.md5 = md5;

shared/shared-utils.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,10 @@ const detectCurrentLanguage = () => {
2929
*/
3030
const switchLanguageAndReload = (lang) => {
3131
try {
32-
if (typeof localStorage === "undefined" || typeof location === "undefined") {
32+
if (
33+
typeof localStorage === "undefined" ||
34+
typeof location === "undefined"
35+
) {
3336
console.warn("Language switch not supported in this environment");
3437
return false;
3538
}

0 commit comments

Comments
 (0)