LLWiki正在建设中,欢迎加入我们!
“MediaWiki:Mobile.js”的版本间差异
跳转到导航
跳转到搜索
小 (// 使用Wikiplus小工具快速编辑) 标签:移动版网页编辑 移动版编辑 |
小 标签:移动版网页编辑 移动版编辑 |
||
第9行: | 第9行: | ||
success: function(data) { |
success: function(data) { |
||
var navlist = data.parse.text["*"]; |
var navlist = data.parse.text["*"]; |
||
$(navlist).insertAfter(".menu > ul:first") |
$(navlist).insertAfter(".menu > ul:first"); |
||
} |
}, |
||
error: function () { |
error: function () { |
||
console.error("can\'t load customized navmenu") |
console.error("can\'t load customized navmenu"); |
||
}, |
}, |
||
dataType: "json" |
dataType: "json" |
2020年8月17日 (一) 23:40的版本
/* 这里的任何JavaScript将为使用移动版网站的用户加载 */ //<nowiki> (function($, mw) { $(function () { mw.loader.using('ext.gadget.site-lib').then(function() { /* Mobile Navmenu by GFwiki */ $.ajax({ url: "/api.php?action=parse&page=MediaWiki:MFSidebar" + wgULS("","/zh-hant") + "&format=json", success: function(data) { var navlist = data.parse.text["*"]; $(navlist).insertAfter(".menu > ul:first"); }, error: function () { console.error("can\'t load customized navmenu"); }, dataType: "json" }); /* 沙盒顶部 */ $('.page-LLWiki_沙盒 #mf-section-0').prepend('<table style="background-color:#F3F5F7;border:1px solid #D4DBE2;border-radius:5px;width:70%;border-left:10px solid #C5C5C5;margin:auto" cellpadding="4px" align="center"><tbody><tr><td width="15%"><div class="center"><img src="/mediawiki/img_auth.php/thumb/0/04/Bandeau-avertisement-3.png/50px-Bandeau-avertisement-3.png" decoding="async" srcset="/mediawiki/img_auth.php/0/04/Bandeau-avertisement-3.png 1.5x" width="50" height="50"></div></td><td style="padding-left:5px">' + wgUCS("欢迎来到沙盒!您可以在此进行编辑测试。", "歡迎來到沙盒!您可以在此進行編輯測試。") + '</td></tr></tbody></table>'); }); /* 引自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(); }); } /* 特殊页面 */ $('.page-Special_用户列表 h1').html('LLWiki上的LLer'); }); })(jQuery, mediaWiki); //</nowiki>