scrapbox-script-installer
<script>タグ経由でscriptをscrapboxに読み込むUserScript
code:script.js
export const installCDN = ({id, src, module = false} = {}) => new Promise((resolve, reject) => {
const oldScript = document.getElementById(id);
oldScript?.parentNode.removeChild(oldScript);
const script = document.createElement("script");
script.addEventListener('load', () => resolve());
script.addEventListener('error', e => reject(e));
script.src = src;
script.id = id;
if (module) { script.type = 'module'; }
document.head.appendChild(script);
});