From d473e0fd2c0ddc4c5bac525e487548cac89918f4 Mon Sep 17 00:00:00 2001 From: reamd7 Date: Sun, 28 Nov 2021 01:22:49 +0800 Subject: [PATCH] =?UTF-8?q?feat:=202.3.7=20=E5=A2=9E=E5=8A=A0=E4=BF=AE?= =?UTF-8?q?=E6=94=B9moment.js=20=E4=B8=AD=E6=96=87=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E6=A0=BC=E5=BC=8F=E7=9A=84=E9=97=AE=E9=A2=98=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- notion-zh_CN.js | 25 ++++++++++++++++++++++++- package.json | 2 +- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/notion-zh_CN.js b/notion-zh_CN.js index 135523d..aa1d45b 100644 --- a/notion-zh_CN.js +++ b/notion-zh_CN.js @@ -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/* @@ -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(); })(); diff --git a/package.json b/package.json index 08f64c0..36938ff 100644 --- a/package.json +++ b/package.json @@ -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 ",