generated at
hem6
へむろく(twitter)です。
本職はSE(スーパーエクセルマン)をしています。
script.js
import '/api/code/kimaben/hem6/日報テンプレート.js' import '/api/code/kimaben/hem6/みんなで書き込むようのページをつくるスクリプト.js'

日報テンプレート.js
const projectURL = 'https://scrapbox.io/kimaben/' const userName = 'hem6' const nippoTemplate = () => { const date = new Date(Date.now() + 9 * 60 * 60 * 1000).toISOString().slice(0,10) const title = date + '-' + userName const body = `\n\n[* 雑談など]\n\n[${date}] [${userName}] [日報]` window.open( projectURL + encodeURIComponent(title) + '?body=' + encodeURIComponent(body) ) } scrapbox.PageMenu.addItem({title: "日報テンプレート", onClick: nippoTemplate})

gaaamii 日報テンプレスクリプト よさそう tommy よさそうwakameよさそう

みんなで書き込むようのページをつくるスクリプト.js
scrapbox.PageMenu.addItem({ title: '今日のもくもくページ作成', image: 'https://i.gyazo.com/00c6ce2d4659ab83b80b899ce52c204d.png', onClick: () => { const prj = "kimaben"; const userName = "hem6"; let toDoubleDigits = function(num) { num += ""; if (num.length === 1) { num = "0" + num; } return num; }; let date = new Date(); let yyyy = date.getFullYear(); let mm = toDoubleDigits(date.getMonth() + 1); let dd = toDoubleDigits(date.getDate()); let hh = toDoubleDigits(date.getHours()); let MM = toDoubleDigits(date.getMinutes()); let content = "[*** やること宣言]%0A["+ userName +".icon]%0A%20%0A%0A[*** 勉強中メモ]%0A["+ userName +".icon]%0A%20%0A%0A[*** やったこと]%0A["+ userName +".icon]%0A%20%0A%0A" + "[" + yyyy + "-" + mm + "-" + dd + "] "+ "[日報]"; let title = yyyy + "-" + mm + "-" + dd; window.open("https://scrapbox.io/" + prj + "/" + title + "?body=" + content); } })