LLWiki正在建设中,欢迎加入我们

“MediaWiki:Gadget-inspect.js”的版本间差异

跳转到导航 跳转到搜索
删除34字节 、​ 2021年1月9日 (六) 12:09
无编辑摘要
$dropdown = $('<div>', {class: "inspector-menu", html: options}),
$hints = $('<div>', {class: "inspector-menu"}).on('click', '.inspector-hint', function() {
consoleconst cursor = editor.infogetCursor([prefix, ns]);
const cursor = editor.getCursorreplaceRange(this.textContent + (ns > 0 ? '}}' : ']]'),
start{line: =cursor.line, ch: cursor.ch - prefix.length}, cursor);
start.ch -= prefix.length;
editor.replaceRange(this.textContent + (ns ? '}}' : ']]'), start, cursor);
// 随后再次执行updateHints时会自行stop
}),
prefix = before.match( regexps[ns] )[1];
if (prefix === "") { return; }
mw.timedQuery(api, $.extend({list: 'prefixsearch', pssearch: prefix}, ns > 0 ? {psnamespace: ns} : {}),
wgULS('前缀相符的页面', '前綴相符的頁面')).then(function(r) {
$hints.html( r.query.prefixsearch.map(function(ele) {
16,874

个编辑

导航菜单