16,874
个编辑
LLWiki正在建设中,欢迎加入我们!
小 |
小 |
||
window.addEventListener('load', function () {
var ele = document.querySelector('.start-screen'),
parent = document.querySelector('#mw-content-text
ele.querySelectorAll('a[href]').forEach(function(e) {
var href = decodeURIComponent(e.href),
section = /#/.test(href),
pagename = section ? href.match('^(?:https:)?(?:\/\/llwiki\.org)?/zh/(.*)#')[1] : href.match('^(?:https:)?(?:\/\/llwiki\.org)?/zh/(.*)$')[1];
if (pagename == mw.config.get('wgPageName')) {
e.href = section ? href.match(/#.*$/)[0] : 'javascript:void(0)';
}
});
if (mw.config.get('skin') == 'minerva') {
ele.querySelectorAll( '.lazy-image-placeholder' ).forEach(function(e) {
let img = document.createElement('img');
|