MediaWiki:Gadget-DotsSyntaxHighlighter.js:修订间差异
跳到导航
跳到搜索
imported>=海豚= 无编辑摘要 |
imported>=海豚= (使用新版语法高亮系统) |
||
| 第1行: | 第1行: | ||
if(['edit', 'submit'].indexOf(mw.config.get('wgAction')) !== -1 && mw.config.get("wgPageContentModel") === 'wikitext') { | |||
mw.loader.load('https://zh.moegirl.org.cn/index.php?title=User:Nbdd0121/tools/codemirror.js&action=raw&ctype=text/javascript'); | |||
/ | mw.loader.load('https://zh.moegirl.org.cn/index.php?title=User:Nbdd0121/tools/codemirror.css&action=raw&ctype=text/css', 'text/css'); | ||
setTimeout(checkVariable, 100); | |||
} | |||
function checkVariable() { | |||
if(typeof CodeMirror === 'undefined') { | |||
setTimeout(checkVariable, 100); | |||
return; | |||
} | |||
mw.loader.load('https://zh.moegirl.org.cn/index.php?title=User:Nbdd0121/tools/wikihighlight.js&action=raw&ctype=text/javascript'); | |||
mw.loader.load('https://zh.moegirl.org.cn/index.php?title=User:Nbdd0121/tools/wikihighlight.css&action=raw&ctype=text/css', 'text/css'); | |||
} | |||
} | |||
2021年3月28日 (日) 16:20的版本
if(['edit', 'submit'].indexOf(mw.config.get('wgAction')) !== -1 && mw.config.get("wgPageContentModel") === 'wikitext') {
mw.loader.load('https://zh.moegirl.org.cn/index.php?title=User:Nbdd0121/tools/codemirror.js&action=raw&ctype=text/javascript');
mw.loader.load('https://zh.moegirl.org.cn/index.php?title=User:Nbdd0121/tools/codemirror.css&action=raw&ctype=text/css', 'text/css');
setTimeout(checkVariable, 100);
}
function checkVariable() {
if(typeof CodeMirror === 'undefined') {
setTimeout(checkVariable, 100);
return;
}
mw.loader.load('https://zh.moegirl.org.cn/index.php?title=User:Nbdd0121/tools/wikihighlight.js&action=raw&ctype=text/javascript');
mw.loader.load('https://zh.moegirl.org.cn/index.php?title=User:Nbdd0121/tools/wikihighlight.css&action=raw&ctype=text/css', 'text/css');
}