ピヨピヨ日記ブックマークレットv3
code:piyopiyo diary
var date = new Date();
var year = String(date.getFullYear()).slice(2);
var month = ('00' + (date.getMonth() + 1)).slice(-2);
var day = ('00' + date.getDate()).slice(-2);
var week = 'Sun,Mon,Tue,Wed,Thu,Fri,Sat';
var title = 'ピヨピヨ日記' + year + month + day;
var body = encodeURIComponent(#ピヨピヨ日記 #${year}${month}${day} #y${year} #m${month} #d${day} #${month}${day} #${dow});
var url = baseurl + title + '?body=' + body;
window.open(url);
ブックマークレット
code:bookmarklet
javascript:var baseurl = 'https://scrapbox.io/piyopiyo/'; var date = new Date(); var year = String(date.getFullYear()).slice(2); var month = ('00' + (date.getMonth() + 1)).slice(-2); var day = ('00' + date.getDate()).slice(-2); var week = 'Sun,Mon,Tue,Wed,Thu,Fri,Sat'; var dow = week.split(',')new Date().getDay(); var title = 'ピヨピヨ日記' + year + month + day; var body = encodeURIComponent(#ピヨピヨ日記 #${year}${month}${day} #y${year} #m${month} #d${day} #${month}${day} #${dow}); var url = baseurl + title + '?body=' + body; window.open(url);