MediaWiki:Gadget-search-fix.js:修订间差异
跳到导航
跳到搜索
imported>=海豚= 无编辑摘要 |
imported>=海豚= 无编辑摘要 |
||
第8行: | 第8行: | ||
var ns = searchTerm.substring(0, colonIdx); | var ns = searchTerm.substring(0, colonIdx); | ||
var page = searchTerm.substring(colonIdx + 1); | var page = searchTerm.substring(colonIdx + 1); | ||
} | } | ||
} | } | ||
})(jQuery, mediaWiki); | })(jQuery, mediaWiki); |
2021年6月15日 (二) 11:59的版本
(function($, mw) {
// don't be too aggresive. just fix some obvious typos
var searchTerm = mw.util.getParamValue('search');
if (searchTerm !== null && mw.util.getParamValue('fulltext') === null) {
// namespace names
var colonIdx = searchTerm.indexOf(':');
if (colonIdx != -1) {
var ns = searchTerm.substring(0, colonIdx);
var page = searchTerm.substring(colonIdx + 1);
}
}
})(jQuery, mediaWiki);