MediaWiki:Gadget-DotsSyntaxHighlighter.js:修订间差异
跳到导航
跳到搜索
imported>=海豚= 无编辑摘要 |
imported>=海豚= 无编辑摘要 |
||
| 第1行: | 第1行: | ||
if([' | if(['view', 'edit'].indexOf(mw.config.get('wgAction')) !== -1 && mw.config.get("wgPageContentModel") === 'wikitext') { | ||
mw.loader.load('/index.php?title=User:=海豚=/tools/codemirror.js&action=raw&ctype=text/javascript'); | mw.loader.load('/index.php?title=User:=海豚=/tools/codemirror.js&action=raw&ctype=text/javascript'); | ||
mw.loader.load('/index.php?title=User:=海豚=/tools/codemirror.css&action=raw&ctype=text/css', 'text/css'); | mw.loader.load('/index.php?title=User:=海豚=/tools/codemirror.css&action=raw&ctype=text/css', 'text/css'); | ||
2021年3月28日 (日) 20:34的版本
if(['view', 'edit'].indexOf(mw.config.get('wgAction')) !== -1 && mw.config.get("wgPageContentModel") === 'wikitext') {
mw.loader.load('/index.php?title=User:=海豚=/tools/codemirror.js&action=raw&ctype=text/javascript');
mw.loader.load('/index.php?title=User:=海豚=/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('/index.php?title=User:=海豚=/tools/wikihighlight.js&action=raw&ctype=text/javascript');
mw.loader.load('/index.php?title=User:=海豚=/tools/wikihighlight.css&action=raw&ctype=text/css', 'text/css');
}