Last active
January 30, 2021 09:24
-
-
Save kaho2063/ccb35138242926f70b53258483bcafeb to your computer and use it in GitHub Desktop.
カーソルの位置に日付(年/月/日 時:分)を挿入するブックマークレット。ライセンスはNYSL(http://www.kmonos.net/nysl/ )です。参考URL→http://d.hatena.ne.jp/n9d/20070606/1181133306 、http://www.hrykozw.com/blog/archives/551
This file contains hidden or 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
javascript:(function(){n=(t=(document.activeElement || window.getSelection().focusNode)).selectionStart;v=t.value;s=t.scrollTop;t.value=(v.substr(0,n)+(f=[(d=new Date()).getFullYear(),(d.getMonth()+1),d.getDate()].join("/")+" "+[(d=new Date()).getHours(),d.getMinutes(),d.getSeconds()].join(":"))+v.substr(n,v.length));t.scrollTop=s;t.setSelectionRange((p=n+f.length),p)})() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment