跳到导航
跳到搜索
注意:在发布之后,您可能需要清除浏览器缓存才能看到所作出的变更的影响。
- Firefox或Safari:按住Shift的同时单击刷新,或按Ctrl-F5或Ctrl-R(Mac为⌘-R)
- Google Chrome:按Ctrl-Shift-R(Mac为⌘-Shift-R)
- Internet Explorer或Edge:按住Ctrl的同时单击刷新,或按Ctrl-F5
- Opera:按 Ctrl-F5。
var $homeCalendar = function () { $.getJSON("https://wf-calendar.miaowm5.com/data/info.json", { format: "json", type: "get" }).done(function (data) { let ics = data.list[0].flag === "cn" ? data.list[0].list : data.list[1].list; let activities = ""; ics.filter((l) => { return l.timeEnd && l.title && l.tag && l.tag !== "千里眼"; }) .map((l) => { if (!l.timeStart) { // 30 days l.timeStart = l.timeEnd - 2592000000; } return l; }) .sort((a, b) => { if (a.timeStart === b.timeStart) return a.timeEnd < b.timeEnd ? -1 : 1; else return a.timeStart < b.timeStart ? -1 : 1; }) .forEach((l) => { activities += "{{活动日历/行|" + l.timeStart + "|" + l.timeEnd + "|「" + l.tag + "」" + l.title + "}}"; }); $.getJSON(mw.util.wikiScript("api"), { format: "json", action: "parse", text: activities, contentmodel: "wikitext", disablelimitreport: true }).done(function (data) { let text = data.parse.text["*"]; document.getElementById("home-calendar").innerHTML = text; }); }); }; (function () { var t = function () { window.jQuery && window.mw && mw.util ? $homeCalendar() : window.setTimeout(t, 100); }; t(); })();