七日内新公告:全站维护公告
  • 你好~!欢迎来到萌娘百科镜像站!如需查看或编辑,请联系本站管理员注册账号。
  • 本镜像站和其他萌娘百科的镜像站无关,请注意分别。

User:屠麟傲血/vector.js

猛汉♂百科,万男皆可猛的百科全书!转载请标注来源页面的网页链接,并声明引自猛汉百科。内容不可商用。
跳到导航 跳到搜索

注意:在保存之后,您可能需要清除浏览器缓存才能看到所作出的变更的影响。

  • Firefox/Safari:按住“Shift”的同时单击“刷新”,或按“Ctrl-F5”或“Ctrl-R”(Mac为“⌘-R”)
  • Google Chrome:按“Ctrl-Shift-R”(Mac为“⌘-Shift-R”)
  • Internet Explorer:按住“Ctrl”的同时单击“刷新”,或按“Ctrl-F5”
  • Opera:在“工具→首选项”中清除缓存
如果您已登录但该页面出现未登录状态,请尝试在地址栏的地址最后添加代码?_=1来访问最新页面。
添加代码后的本页地址如下:-{R|https://moegirl.uk/User:%E5%B1%A0%E9%BA%9F%E5%82%B2%E8%A1%80/vector.js?_=1}-
"use strict";
(function($, mw){
    /*函数定义体*/
    mw.loader.load("https://testingcf.jsdelivr.net/gh/lovelyCARDINAL/wikitool/massRollback.js");
    var api;
    //侧边栏添加工具箱
    function iatool(){
    	mw.util.addPortletLink("p-tb", "javascript:void(1);", "界管工具箱", "t-iatool", "界管工具箱", null, "#t-specialpages");
        var $iatool = null;
        var otherpage = '<a href="/Special:小工具">小工具首页</a>\
	    | <a href="/MediaWiki:Gadgets-definition">小工具配置</a>\
	    | <a href="/MediaWiki:WikiLove.js">喂鸡友爱</a>';
        var GHIA ='<a href="https://github.com/MoegirlPediaInterfaceAdmins/MoegirlPediaInterfaceCodes" target="_blank">访问GayHub上的萌娘百科界面代码库</a>';
        $("#t-iatool a").on("click", function() {
            if ($iatool === null) {
                //定义工具箱
                $iatool = $( '<div class="iatool" />' );
                api.get( {
                    action: "parse",
                    title:"Template:公共代码页",
                    text: "{{公共代码页}}",
                    variant: mw.config.get("wgUserVariant")
                }).done(function (result) {
                    $iatool.html(result.parse.text['*'] + otherpage.concat(" | ", GHIA));
                });
                $iatool.dialog({title:"界管工具箱"} );
                $iatool.dialog( 'option', 'width', Math.round( $( window ).width() * 0.8 ) );
                $iatool.css( 'max-height', Math.round( $( window ).height() * 0.8 ) + 'px' );
                $iatool.dialog( 'option', 'position', 'center' );
            }
            $iatool.dialog('open');
        });
    }
    /*函数执行体*/
    $(function(){
        mw.loader.using(["mediawiki.api"],function(){
            api = new mw.Api();
            iatool();
        });
    });
})(jQuery,mediaWiki);