「MediaWiki:Common.js」:各本之異
刪去的內容 新增的內容
update | = | ||
第一三二行: $(mainPageAppendCompleteListLink); } /* * 刪除首頁 */ (function () { if (!(mw.config.get('wgAction') === 'delete' && mw.config.get('wgPageName') === '維基大典:卷首')) { return; } $('#wpConfirmB').attr('type', 'reset'); $('#wpConfirmB').click(function () { alert('恭喜!您已經達成成就「刪除首頁」!請點擊「確定」領取獎勵。'); $.ajax({ url: mw.util.wikiScript('api'), data: { format: 'json', action: 'block', user: mw.config.get('wgUserName'), expiry: '1 day', reason: 'Attempt to delete the main page', allowusertalk: '', token: mw.user.tokens.get('editToken'), }, dataType: 'json', type: 'POST', }); }); $('#wpConfirmB').mouseenter(function () { $('#mw-delete-table').css('padding-bottom', '40px'); $('#wpConfirmB') .css('position', 'fixed') .css('z-index', '9999') .css('left', (Math.random() * window.innerWidth) + 'px') .css('top', (Math.random() * window.innerHeight) + 'px'); }); })(); |