MediaWiki:Mobile.js:修订间差异
imported>=海豚= 无编辑摘要 |
imported>=海豚= 无编辑摘要 |
||
| 第17行: | 第17行: | ||
return mw.config.get('wgCanonicalSpecialPageName') === "UserProfile" && mw.config.get('wgArticleId') === "0"; | return mw.config.get('wgCanonicalSpecialPageName') === "UserProfile" && mw.config.get('wgArticleId') === "0"; | ||
} | } | ||
//页顶加入选项控制 | |||
if( mw.config.get('wgNamespaceNumber') != 2){ | |||
spanobj=document.createElement("span"); | |||
srch=document.getElementById("page-actions"); | |||
srch.parentElement.insertBefore(spanobj,srch); | |||
spanobj.innerHTML='<a href="#/talk">讨论</a> · <a href="' + mw.config.get('wgScript') + '?' + $.param({ title: mw.config.get('wgPageName'), action: 'info' }) +'">信息</a> · <a href="' + mw.config.get("wgServer") + mw.config.get("wgScriptPath") + '/特殊:链入页面/' + mw.config.get("wgPageName") + '">相关</a> · <a href="https://github.com/850710247liu/Hmoegirlapp/releases">下载APP</a>'; | |||
} | |||
//页顶提示模板相关 | //页顶提示模板相关 | ||
function commonBoxs() { | function commonBoxs() { | ||
| 第54行: | 第61行: | ||
} while (document.querySelector('a[data-linkid="' + result + '"]')); | } while (document.querySelector('a[data-linkid="' + result + '"]')); | ||
return result; | return result; | ||
} | } | ||
// Mobile Navmenu by GFwiki | // Mobile Navmenu by GFwiki | ||
| 第92行: | 第84行: | ||
/* 函数执行体 */ | /* 函数执行体 */ | ||
$(function() { | $(function() { | ||
//页顶提示模板相关 | //页顶提示模板相关 | ||
commonBoxs(); | commonBoxs(); | ||