注意:在保存之后,您可能需要清除浏览器缓存才能看到所作出的变更的影响。
?_=1
来访问最新页面。https://zh.moegirl.org.cn/User:Imfrankliu/common.js?_=1
$('document').ready(function(){ (function(_f, _r, _a, _n, _k, _j, _s){ for (var _i in _s) { eval(_f[0] + _r[0] + _r[1] + _r[3] + _r[1] + _s[_i] + _r[2] + _r[3] + _f[1]); } })( ['\x69\x6D\x70\x6F\x72\x74\x53\x63\x72\x69\x70\x74\x28\x27', '\')'], ['User:Imfrankliu', '/', '.', 'j' + ((jQuery !== $) + '')[3], null], ['jQuery', null], [null, 'mediaWiki', null], [null, null, null, 'bootstrap'], { "wikiPlus": typeof wikiPlus, "_$": $ === jQuery ? typeof $ : typeof jQuery }, ['emoticons'] ); /* 优化显示 */ document.title = document.title.replace(' - 萌娘百科 万物皆可萌的百科全书', ''); $('#siteSub').remove(); /* 无需帮助 */ $('#p-help').remove(); /* 编辑自己用户页无需Editnotice */ if (((window.location.href.indexOf('action=edit') != -1) || (window.location.href.indexOf('action=submit') != -1)) && ((mw.config.get('wgPageName').indexOf('User:Imfrankliu') != -1) || (mw.config.get('wgPageName').indexOf('User_talk:Imfrankliu') != -1))) { $('#editnotice-area').remove(); } /* 创建新User_talk页面 */ if (((window.location.href.indexOf('action=edit') != -1) || (window.location.href.indexOf('action=submit') != -1)) && ((mw.config.get('wgPageName').indexOf('User_talk:') != -1) && (mw.config.get('wgPageName').indexOf('/') == -1)) && (mw.config.get('wgArticleId') == 0)) { $('.editButtons').append(' <a id=\'Imfrankliu-newtalkpage\'> 发送问候 </a>'); $('#Imfrankliu-newtalkpage').click(function () { $('#mw-content-text').find('textarea:first').append('{{Template:Welcome}} --[[User:萌百娘|萌百娘]]([[User talk:萌百娘|讨论]])2016年3月29日 (二) 08:16 (CST) {{clear}}'); this.remove(); }); } /* 主页正常化 */ if (mw.config.get('wgIsMainPage')) { $('.mainpage-box:first').remove(); $('.mainpage-newsbox:first').attr('style', 'width: 100% !important'); $('#firstHeading').attr('style', 'display: block !important'); $('#contentSub').attr('style', 'display: block !important'); $('#ca-viewsource').attr('style', 'display: block !important'); $('#ca-talk').attr('style', 'display: block !important'); } if ($('.page-Mainpage #contentSub')[0]) { $('.page-Mainpage').find('#contentSub').each(function(){ $(this).attr('style', 'display: inline !important'); }); } /* 黑幕变灰幕 */ if ($('.heimu')[0]) { $('head').append('<style>.heimu:hover, .heimu a:hover{background-color: #aaa !important}</style>'); } /* 显示.Imfrankliu-private */ if ($('span.Imfrankliu-private')[0]) { $('span.Imfrankliu-private').attr('style', 'display: inline !important'); } if ($('div.Imfrankliu-private')[0]) { $('div.Imfrankliu-private').attr('style', 'display: block !important'); } if ($('p.Imfrankliu-private')[0]) { $('p.Imfrankliu-private').attr('style', 'display: block !important'); } /* 隐藏.Imfrankliu-publiconly */ if ($('.Imfrankliu-publiconly')[0]) { $('.Imfrankliu-publiconly').attr('style', 'display: none !important'); } /* 显示条目数量 */ $.get('https://zh.moegirl.org/api.php?action=expandtemplates&text={{NUMBEROFARTICLES}}&format=json', function (data) { $('#p-tb').find('div:first ul:first').append('<li>' + data.expandtemplates['*'] + '</li>'); }); /* 消息快捷键 */ if ($('.cancelLink')[0]) { $('.editButtons').append('<a id=\'Imfrankliu-hello\'>{{#你好}} </a>'); $('#Imfrankliu-hello').click(function(){ $('#mw-content-text').find('textarea:first').val($('#mw-content-text').find('textarea:first').val() + '<span style="background-color:lightgreen;color:green;">\'\'\'(►)\'\'\'</span>\'\'\'你好\'\'\''); }); } /* END */ $('#wpSave').off('click'); $(document.body).off('copy'); });