MediaWiki:Gadget-searchFocus.js

H萌娘,万物皆可H的百科全书!
imported>Irukaza2022年1月31日 (一) 00:31的版本 (导入1个版本)
跳到导航 跳到搜索

注意:这类代码页面在保存之后,您可能需要清除浏览器缓存才能看到所作出的变更的影响。

// <pre><nowiki>
//  _________________________________________________________________________________________
// |                                                                                         |
// |                    === WARNING: GLOBAL GADGET FILE ===                                  |
// |                  Changes to this page affect many users.                                |
// | Please discuss changes on the talk page or on [[Wikipedia_talk:Gadget]] before editing. |
// |_________________________________________________________________________________________|
//
// Imported from [[Wikipedia:FAQ/Main Page]] as of April 1, 2008

if ( mw.config.get( 'wgIsMainPage' ) ) {
  $( function () {
    document.getElementById("searchInput").focus();
  } );
}