BundleするUserScript
BundleするUserScriptの一覧
code:script.ts
import '/api/code/crapbox/%E6%97%A5%E8%A8%98%E3%82%92%E8%87%AA%E5%8B%95%E7%94%9F%E6%88%90%E3%81%99%E3%82%8BUserScript/script.js';
code:script.ts
import '/api/code/crapbox/Markdown%E3%82%92Scrapbox%E8%A8%98%E6%B3%95%E3%81%AB%E7%BD%AE%E6%8F%9B%E3%81%99%E3%82%8BUserScript/script.js';
code:script.ts
const projects = [
scrapbox.Project.name, "crapbox", "accojams-private", "magicalfireru", "villagepump"
];
const ops = await setup({
limit: 10,
projects,
mark: {
"crapbox": "/api/pages/crapbox/kbyshwtn/icon",
"accojams-private": "/api/pages/accojams-private/accojams/icon",
"magicalfireru": "/api/pages/magicalfireru/mfurのアイコン/icon",
"villagepump": "/api/pages/villagepump/井戸端/icon"
},
});
document.getElementById("text-input")!.addEventListener("keydown", (e) => {
if (e.ctrlKey || e.metaKey || e.altKey) return;
switch (e.key) {
case "Tab": {
const executed = e.shiftKey
? ops.selectPrev({ cyclic: true })
: ops.selectNext({ cyclic: true });
if (!executed) return;
break;
}
case "Enter": {
if (e.shiftKey) return;
if (!ops.confirm()) return;
break;
}
case "Escape": {
if (e.shiftKey) return;
if (!ops.cancel()) return;
break;
}
default:
return;
}
e.preventDefault();
e.stopPropagation();
});