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