Greasy Fork

Greasy Fork is available in English.

原神观测枢日历放大

原神观测枢素材活动日历放大到整屏(1920*1080)

当前为 2022-08-26 提交的版本,查看 最新版本

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name              原神观测枢日历放大
// @version           0.1.1
// @description       原神观测枢素材活动日历放大到整屏(1920*1080)
// @author            asadahimeka
// @namespace         https://www.nanoka.top
// @license           MIT
// @match             https://bbs.mihoyo.com/ys/obc/?bbs_presentation_style=no_header&cal=1
// @source            https://github.com/asadahimeka/userscripts
// @supportURL        https://github.com/asadahimeka/userscripts/issues
// @run-at            document-end
// @grant             GM_addStyle
// ==/UserScript==

(function() {
    "use strict";
    GM_addStyle(`
.home__map--calendar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 999;
  width: 1920px !important;
  height: 100%;
}
.cal-pc__head-item--active {
  background-color: #f4f4f4 !important;
}
  `);

    function run() {
        setTimeout(() => {
            const cols = document.querySelectorAll(".cal-pc__row--event .cal-pc__col .cal-pc__col:not(.cal-pc__col--event)");
            for (const el of cols) {
                const w = parseFloat(el.style.width);
                if (w)
                    el.style.width = `${w * 2.6041666666666665}px`;
            }
            const right = document.querySelector('.home-channel--calendar .home-channel__title .home-channel__right')
            if (!right) return
            right.innerHTML = '<a href="https://bbs.mihoyo.com/ys/obc/" class="channel-more">更多<span>内容</span></a>'
        }, 500)
    }
    addEventListener("load", run);
})();