Last active
June 26, 2021 22:20
-
-
Save htakeuchi/bead77366336be9265021153023c6c48 to your computer and use it in GitHub Desktop.
Bearの今日の日付のメモに追記するTextwellアクション
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function zp(n) { | |
return ( '0' + n ).slice(-2); | |
} | |
now = new Date(); | |
year = now.getFullYear(); | |
month = now.getMonth() + 1; | |
day = now.getDate(); | |
d = year + '/' + zp(month) + '/' + zp(day) | |
T( 'urlScheme', { | |
url: 'bear://x-callback-url/add-text?title=' + encodeURIComponent( d ) + '&tags=journal&text=' + encodeURIComponent( T.whole ) | |
} ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment