用户:翱翔/common.js

来自PRTS
跳转到导航 跳转到搜索

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

  • Firefox或Safari:按住Shift的同时单击刷新,或按Ctrl-F5Ctrl-R(Mac为⌘-R
  • Google Chrome:Ctrl-Shift-R(Mac为⌘-Shift-R
  • Internet Explorer或Edge:按住Ctrl的同时单击刷新,或按Ctrl-F5
  • Opera:Ctrl-F5
/** InPageEdit Preferences **/
"use strict";
mw.loader.load("https://cdn.jsdelivr.net/npm/mediawiki-inpageedit@latest/dist/InPageEdit.min.js");
mw.hook("InPageEdit").add(function (ctx) {
 
    const now = new Date();
    now.setTime(now.getTime() - now.getTimezoneOffset() * 60000);
    if (now.toISOString().startsWith("2021-04-01T")) {
mw.loader.load('https://ipe-plugins.js.org/plugins/april-fool-2021.js')
}
 
    var InPageEdit = ctx.InPageEdit,
        _msg = ctx._msg,
        wgPageName = mw.config.get("wgPageName"),
        wgRevisionId = mw.config.get("wgRevisionId");
    $("#ca-edit").after(
        $("<li>", {
            id: "ca-quick-edit",
            "class": "collapsible"
        }).append(
            $("<span>").append(
                $("<a>", {
                    href: "javascript:void(0)",
                    text: typeof Wikiplus !== "undefined" ? _msg("quick-edit") + "(IPE)" : _msg("quick-edit")
                }).on("click", function () {
                    InPageEdit.quickEdit({
                        page: wgPageName,
                        revision: wgRevisionId
                    });
                })
            )
        )
    );
});

window.InPageEdit = window.InPageEdit || {}; // Keep this line
InPageEdit.myPreference = {
  "editMinor": false,
  "editSummary": "$section //Edit via InPageEdit",
  "redLinkQuickEdit": false,
  "outSideClose": false,
  "watchList": true,
  "plugins": [
    "toolbox.js",
    "code-mirror/script.js",
    "color-preview.js",
    "demo.js",
    "language-pack_demo.js"
  ]
}

/** navbox **/
$( document ).ready( function(){
	mw.util.addPortletLink('p-personal','/w/特殊:文件列表','文件','','','','#pt-userpage');
	mw.util.addPortletLink('p-personal','/w/模板:剧情导航','剧情','','','','#pt-userpage');
	mw.util.addPortletLink('p-personal','/w/干员剧情一览','干员剧情','','','','#pt-userpage');
	mw.util.addPortletLink('p-personal','/w/时装回廊','皮肤','','','','#pt-userpage');
	mw.util.addPortletLink('p-personal','/w/特殊地形','地形','','','','#pt-userpage');
	mw.util.addPortletLink('p-personal','/w/用户:翱翔/地形参数对照表','对照表','','','','#pt-userpage');
	mw.util.addPortletLink('p-personal','/w/用户:GuBot/newtiles','新地形','','','','#pt-userpage');
	mw.util.addPortletLink('p-personal','/w/模板:关卡导航','关卡','','','','#pt-userpage');
	mw.util.addPortletLink('p-personal','/w/装置一览','装置1','','','','#pt-userpage');
	mw.util.addPortletLink('p-personal','/w/分类:装置','装置2','','','','#pt-userpage');
	mw.util.addPortletLink('p-personal','/w/家具一览','家具','','','','#pt-userpage');
	mw.util.addPortletLink('p-personal','/w/模板:道具导航','道具','','','','#pt-userpage');
} );

/** trapper **/
mw.loader.load('/index.php?title=User:GuBot/trapper.js&action=raw&ctype=text/javascript');

/** w++ **/
mw.loader.load('//unpkg.com/wikiplus-highlight/dist/main.min.js');
mw.loader.load('//mzh.moegirl.org.cn/index.php?title=User:東東君/js/Wikiplus-replace.js&action=raw&ctype=text/javascript');