mirror of
https://github.com/osmarks/mycorrhiza.git
synced 2025-04-23 03:03:13 +00:00
Add Cmd+' shortcut for local time and change the format of time
This commit is contained in:
parent
522640f8df
commit
922181ee93
@ -330,6 +330,7 @@ if (document.body.dataset.rrhAddr.startsWith('/edit')) {
|
||||
new Shortcut(isMac ? 'Meta+k' : 'Ctrl+k', wrapLink, 'Inline link', { force: true }),
|
||||
// Apparently, ⌘; conflicts with a Safari's hotkey. Whatever.
|
||||
new Shortcut(isMac ? 'Meta+;' : 'Ctrl+;', insertDateUTC, 'Insert date UTC', { force: true }),
|
||||
new Shortcut(isMac ? "Meta+'" : "Ctrl+'", insertTimeLocal, 'Insert local time', { force: true })
|
||||
]))
|
||||
}
|
||||
}
|
||||
|
@ -93,7 +93,7 @@ function insertDateUTC() {
|
||||
}
|
||||
|
||||
function insertTimeUTC() {
|
||||
let time = new Date().toISOString().substring(11, 19) + " UTC"
|
||||
let time = new Date().toISOString().substring(11, 16) + " UTC "
|
||||
textInserter(time)()
|
||||
}
|
||||
|
||||
@ -108,7 +108,7 @@ function insertDateLocal() {
|
||||
|
||||
function insertTimeLocal() {
|
||||
let d = new Date()
|
||||
textInserter(`${len2(d.getHours())}:${len2(d.getMinutes())}:${len2(d.getSeconds())}`)()
|
||||
textInserter(`${len2(d.getHours())}:${len2(d.getMinutes())} `)()
|
||||
}
|
||||
|
||||
function insertUserlink() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user