LLWiki正在建設中,歡迎加入我們!
「Widget:游戏主界面」修訂間的差異
跳至導覽
跳至搜尋
小 |
小 |
||
第5行: | 第5行: | ||
parent = document.querySelector('#mw-content-text > .mw-parser-output'); |
parent = document.querySelector('#mw-content-text > .mw-parser-output'); |
||
ele.querySelectorAll('a').forEach(function(e) { |
ele.querySelectorAll('a').forEach(function(e) { |
||
var href = decodeURIComponent(e.href), |
|||
section = /#/.test(href), |
|||
pagename = section ? href.match('/zh/(.*)#')[1] : href.substring(4); |
|||
if(!section && pagename == mw.config.get('wgPageName')) { |
|||
e.href = 'javascript:void(0)'; |
|||
} |
|||
}); |
}); |
||
if(mw.config.get('skin') == 'minerva') { parent.appendChild(ele); } |
if(mw.config.get('skin') == 'minerva') { parent.appendChild(ele); } |
於 2020年10月7日 (三) 00:19 的修訂
JavaScript腳本:
window.addEventListener('load', function () {
var ele = document.querySelector('.start-screen'),
parent = document.querySelector('#mw-content-text > .mw-parser-output');
ele.querySelectorAll('a').forEach(function(e) {
var href = decodeURIComponent(e.href),
section = /#/.test(href),
pagename = section ? href.match('/zh/(.*)#')[1] : href.substring(4);
if(!section && pagename == mw.config.get('wgPageName')) {
e.href = 'javascript:void(0)';
}
});
if(mw.config.get('skin') == 'minerva') { parent.appendChild(ele); }
});
//
CSS樣式表:
*/
.start-screen {
text-align: center;
position: sticky;
bottom: 3px;
}
.start-screen table {
display: inline-table;
}
/*