yoshikiito
https://gyazo.com/8d2430f526aaad2dccc04622fcf86242
仕事
個人
技術ブログ
雑記ブログ
以下、ユーザスクリプト
code:script.js
scrapbox.PageMenu.addItem({
title: 'Tweet',
onClick: () => window.open(https://twitter.com/intent/tweet?url=${encodeURIComponent(location.href)}&text=${encodeURIComponent(window.scrapbox.Page.title)})
})
code:script.js
// 日付と時刻のショートカット
scrapbox.TimeStamp.addFormat(']YYYYMMDD[')
scrapbox.TimeStamp.addFormat('HH:mm')
const date = new Date()
const thismonth = "0" +((date.getMonth() + 1).toString()).slice(-2)
const lastyear = (date.getFullYear() - 1).toString()
const thisyear = (date.getFullYear()).toString()
scrapbox.TimeStamp.addFormat(() => [ + lastyear + thismonth + ("0"+(date.getDate()).toString()).slice(-2) + ] | [ + thisyear + thismonth + ("0"+(date.getDate() - 1).toString()).slice(-2) + ], + thisyear + thismonth + ("0"+(date.getDate()).toString()).slice(-2) + , [ + thisyear + thismonth + ("0"+(date.getDate() + 1).toString()).slice(-2) + ])
code:style.css
/* バッヂ風 */
.line ahref="./memo", .line ahref="./clip" {display: inline-block; min-width: 4em; border-radius: .2em; text-align: center; color: #FFF; border: none; font-size: 1em; line-height: 2em;} .page-list-item.pin + .page-list-item:not(.pin) {
clear: both;
}