LLWiki正在建设中,欢迎加入我们!
MediaWiki:Mobile.js
跳转到导航
跳转到搜索
注意:在保存之后,您可能需要清除浏览器缓存才能看到所作出的变更的影响。
- Firefox或Safari:按住Shift的同时单击刷新,或按Ctrl-F5或Ctrl-R(Mac为⌘-R)
- Google Chrome:按Ctrl-Shift-R(Mac为⌘-Shift-R)
- Internet Explorer:按住Ctrl的同时单击刷新,或按Ctrl-F5
- Opera:前往菜单 → 设置(Mac为Opera → Preferences),然后隐私和安全 → 清除浏览数据 → 缓存的图片和文件。
/* 这里的任何JavaScript将为使用移动版网站的用户加载 */ //<nowiki> (function($, mw) { $(function () { /* 特殊页面 */ $('.page-Special_用户列表 h1').html('LLWiki上的LLer'); mw.loader.using('ext.gadget.site-lib').then(function() { /* 沙盒顶部 */ $('.page-LLWiki_沙盒 #mf-section-0').prepend('<table class="infobox" style="background-color:#F3F5F7;border:1px solid #D4DBE2;border-radius:5px;width:70%;border-left:10px solid #C5C5C5" cellpadding="4px" align="center"><tbody><tr><td width="15%"><div class="center"><div class="floatnone"><img src="/mediawiki/img_auth.php/thumb/0/04/Bandeau-avertisement-3.png/50px-Bandeau-avertisement-3.png" decoding="async" data-file-width="72" data-file-height="72" width="50" height="50"></div></div></td><td style="padding-left:5px"><span>' + wgUCS("欢迎来到沙盒!您可以在此进行编辑测试。", "歡迎來到沙盒!您可以在此進行編輯測試。") + '</span></td></tr></tbody></table>'); mw.loader.using('mediawiki.api').then(function() { /* Mobile Navmenu by GFwiki */ var api = new mw.Api(); api.get( { 'action':'parse', 'page':'MediaWiki:MFSidebar' + wgULS("", "/zh-hant"), 'dataType':'json' } ).then(function(data) { var navlist = data.parse.text["*"]; var timer = setInterval(function() { if($('.menu ul').length) { console.log("mobile menu exists"); clearInterval(timer); $(navlist).insertAfter(".menu > ul:first"); } }, 100); }); }); }); /* 引自zh.moegirl.org.cn/mediawiki:mobile.js */ /* jquery.collapsible */ if ($('.mw-collapsible').length) { mw.loader.using('jquery.makeCollapsible').then(function() { $('.mw-collapsible').makeCollapsible(); }); } /* jquery.tablesorter */ if ($('table.sortable').length) { mw.loader.using('jquery.tablesorter').then(function() { $('table.sortable').tablesorter(); }); } }); })(jQuery, mediaWiki); //</nowiki>