今天是2025年12月15日 第51周 星期一
代人,时大变了。
我们生活在大地上,但我们的梦想超越天空。
“MediaWiki:Mobile.js”的版本间的差异
跳到导航
跳到搜索
标签:移动网页编辑 移动版编辑 |
|||
| 第11行: | 第11行: | ||
importScriptRL('MediaWiki:Mobile.js\/edit.js'); | importScriptRL('MediaWiki:Mobile.js\/edit.js'); | ||
} | } | ||
| + | }); | ||
| + | $(function() { | ||
| + | console.log("toggle_view_mobile"); | ||
| + | temp = document.getElementsByClassName('navbox'); | ||
| + | for (var i = 0; i < temp.length; i++) { | ||
| + | temp[i].parentNode.removeChild(temp[i]); | ||
| + | } | ||
}); | }); | ||
2020年8月2日 (日) 17:03的最新版本
/* 这里的任何JavaScript将为使用移动版网站的用户加载 */
mw.loader.using(['mediawiki.util', 'ext.gadget.site-lib'], function () {
/* 當需要時載入對應的 scripts */
var importScriptRL=function(page){
mw.loader.load(mw.config.get('wgScript')+'?title='+mw.util.wikiUrlencode(page)+'&action=raw&ctype=text/javascript&_='+Math.floor((new Date())/1000/60/60/24/7));
};
if (mw.config.get('wgAction') == "edit" || mw.config.get('wgAction') == "submit" || mw.config.get('wgCanonicalSpecialPageName') == 'Search') { // scripts specific to editing pages
importScriptRL('MediaWiki:Mobile.js\/edit.js');
}
});
$(function() {
console.log("toggle_view_mobile");
temp = document.getElementsByClassName('navbox');
for (var i = 0; i < temp.length; i++) {
temp[i].parentNode.removeChild(temp[i]);
}
});