inject code

This commit is contained in:
2026-01-20 11:24:40 +08:00
parent cccd01e841
commit 28169843ef
2 changed files with 55 additions and 0 deletions
+23
View File
@@ -0,0 +1,23 @@
(async function ()
{
const scriptUrl = 'https://dev.deadend.work/lingdar77/bcm-tool/raw/branch/main/dist/bcm_tool.js';
try
{
const response = await fetch(scriptUrl);
const code = await response.text();
const blob = new Blob([code], { type: 'application/javascript' });
const blobUrl = URL.createObjectURL(blob);
const script = document.createElement('script');
script.src = blobUrl;
script.type = 'module';
script.onload = () =>
{
URL.revokeObjectURL(blobUrl);
console.log("插件加载成功");
};
document.head.appendChild(script);
} catch (e)
{
console.error("插件加载失败", e);
}
})();