#18油猴脚本:GitHubContributionsSelectThisYear
脚本名称:GitHubContributionsSelectYear
脚本内容:
// ==UserScript==
// @name GitHub Contributions Select This Year
// @namespace http://tampermonkey.net/
// @version 1.0
// @description Automatically selects the first year (2024) in the contributions dropdown on GitHub.
// @author Your Name
// @match https://github.com/*
// @grant none
// ==/UserScript==
(function() {
'use strict';
// Your code here...
const selectElement = document.querySelector('.js-year-selector');
if (selectElement) {
selectElement.value = '2024'; // Set the value to 2024 (or any other desired year)
selectElement.dispatchEvent(new Event('change')); // Trigger the change event
}
})();
这个脚本会在访问GitHub页面时自动选择下拉框中的第一个年份(2024年)。请确保您已经安装了Tampermonkey浏览器扩展,并将此脚本添加到您的脚本列表中。
(白天再去打开电脑完善下)