PomodoroScrapbox
Select the string "Pomodoro" and press the Tomato menu to get the following notation
nishio.icon🍅03:27-03:52 Pomodoro
code:script.js
scrapbox.PopupMenu.addButton({
title: "🍅",
onClick: (text) => {
const name = "nishio";
const timeFormat = (d) => {
const h = d.getHours().toString().padStart(2, "0");
const m = d.getMinutes().toString().padStart(2, "0");
return ${h}:${m};
}
const now = new Date();
const end = new Date(now.getTime() + (1000 * 60 * 25));
return [${name}.icon]🍅${timeFormat(now)}-${timeFormat(end)} [" ${text}];
},
});
---
This page is auto-translated from /nishio/PomodoroScrapbox using DeepL. If you looks something interesting but the auto-translated English is not good enough to understand it, feel free to let me know at @nishio_en. I'm very happy to spread my thought to non-Japanese readers.