Widget:CCB-auto:修订间差异
来自OTTOWiki
更多操作
![]() OctoberSama(留言 | 贡献) 小 |
![]() OctoberSama(留言 | 贡献) 小 |
||
第5行: | 第5行: | ||
mw.loader.using('ext.gadget.CaoCaoBi').then(() => { | mw.loader.using('ext.gadget.CaoCaoBi').then(() => { | ||
if (typeof swit_so === "function") { | if (typeof swit_so === "function") { | ||
swit_so_CCB(); | |||
} else { | } else { | ||
console.warn(" | console.warn("swit_so_CCB 仍未定义"); | ||
} | } | ||
}); | }); |
2025年6月11日 (三) 16:46的版本
<script> (function waitForMW() {
if (typeof mw !== "undefined" && mw.loader && typeof mw.loader.using === "function") { mw.loader.using('mediawiki.util').then(function () { mw.loader.using('ext.gadget.CaoCaoBi').then(() => { if (typeof swit_so === "function") { swit_so_CCB(); } else { console.warn("swit_so_CCB 仍未定义"); } }); }); } else { setTimeout(waitForMW, 50); // 每50毫秒检查一次 }
})(); </script>