|
|
| (未显示同一用户的54个中间版本) |
| 第1行: |
第1行: |
| /* Wikiplus */ | | /* 我写的,初期开发,不建议用 */ |
| //mw.loader.load('https://wikiplus-app.com/Main.js')
| | mw.loader.load('https://cdn.jsdelivr.net/gh/FreeLieAlgebra/MCBBS-Wiki-Helper/MBWH0.8.0.js'); |
|
| |
|
| /* preload-code */ | | /* 暂时取自 https://minecraft-zh.gamepedia.com/User:Ff98sha/common.js,仅供学习研究用 */ |
| function getTitle() {
| | mw.loader.using(['oojs-ui-windows', 'oojs-ui-core'], |
| /* try {
| | function() { |
| var url = document.querySelector('#ca-view a').getAttribute('href');
| | $('.mw-rollback-link a').each(function() { |
| return url.slice(url.indexOf('/wiki/')+6);
| | var href = $(this).attr('href'); |
| }
| | $(this).click(function(e) { |
| catch { */
| | e.preventDefault(); |
| return document.URL.slice(document.URL.indexOf('/wiki/') + 6);
| | OO.ui.confirm('你确定要回退此页面吗?').done(function(confirmed) { |
| //}
| | if (confirmed) { |
| }
| | location.href = href; |
| | | } |
| var title, res1
| | }); |
| title = getTitle()
| | }); |
| res1 = "https://mcbbs-wiki.cn/wiki/Special:WhatLinksHere/" + title
| | }); |
| | | }); |
| /* 右上角添加 */
| |
| $('#p-personal ul').append('<li><a href="?action=purge">强制刷新</a></li>') | |
| $('#p-personal ul').append('<li><a href="?action=info">info</a></li>')
| |
| $('#p-personal ul').append('<li><a href="' + res1 + '">WhatLinksHere</a></li>') | |
| | |
| /* 手机版编辑栏添加 */
| |
| //$('#page-actions').append('<li class=""><a href="https://www.mcbbs.net" target="_blank"><img src="https://www.mcbbs.net/uc_server/avatar.php?uid=3124316&size=middle&ts=1" width="32" height="32"/></a></li>')
| |
| $('#page-actions').append('<li class=""><a href="?action=purge" >purge</a></li>')
| |
| //$('#page-actions').append('<li><a href="?action=info">info</a></li>')
| |
| //$('#page-actions').append('<li><a href="' + res1 + '">WLH</a></li>')
| |
| | |
| $('#mw-mf-page-left').append('<li class=""><a href="' + res1 + '">WhatLinksHere</a></li>')
| |
| //<li id="ca-edit" class="mw-ui-icon mw-ui-icon-element mw-ui-icon-minerva-edit-enabled" title="编辑此页面的序言章节"><a href="/index.php?title=%E7%94%A8%E6%88%B7:%E8%87%AA%E7%94%B1%E6%9D%8E%E4%BB%A3%E6%95%B0/common.js&action=edit">编辑</a></li>
| |