Skip to content

Commit

Permalink
feat: 2.3.7 增加修改moment.js 中文时间格式的问题。
Browse files Browse the repository at this point in the history
  • Loading branch information
Reamd7 committed Nov 27, 2021
1 parent 2aba96c commit d473e0f
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 2 deletions.
25 changes: 24 additions & 1 deletion notion-zh_CN.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// ==UserScript==
// @name Notion-zh_CN notion的汉化脚本
// @namespace http://tampermonkey.net/
// @version 2.3.6
// @version 2.3.7
// @description notion的100%汉化脚本,基于官方中文+机器翻译韩文,支持app版本以及网页油猴,地址:https://github.com/reamd7/notion-zh_CN
// @author reamd7
// @match *://www.notion.so/*
Expand Down Expand Up @@ -7741,4 +7741,27 @@
}
insert();
}
function insertMoment() {
try {
moment.updateLocale("zh-cn", {
longDateFormat: {
LT: "h:mm A",
LTS: "h:mm:ss A",
L: "YYYY/MM/DD",
LL: "YYYY年M月D日",
LLL: "YYYY年M月D日Ah点mm分",
LLLL: "YYYY年M月D日ddddAh点mm分",
l: "YYYY/M/D",
ll: "YYYY年M月D日",
lll: "YYYY年M月D日 HH:mm",
llll: "YYYY年M月D日dddd HH:mm",
},
});
} catch (e) {
requestAnimationFrame(() => {
insertMoment();
});
}
}
insertMoment();
})();
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "notion_zh-cn",
"version": "2.3.6",
"version": "2.3.7",
"main": "index.js",
"repository": "https://github.com/Reamd7/notion-zh_CN.git",
"author": "reamd7 <[email protected]>",
Expand Down

0 comments on commit d473e0f

Please sign in to comment.