您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
自动选择你学校的域名免除烦恼,默认为 xiaoyou.hust.edu.cn,请按需修改脚本
// ==UserScript== // @name icoremail.net 校园邮箱自动选择域名 // @namespace http://tampermonkey.net/ // @version 1.0 // @description 自动选择你学校的域名免除烦恼,默认为 xiaoyou.hust.edu.cn,请按需修改脚本 // @author Ryan // @match https://edu.icoremail.net/coremail/index.jsp* // @icon https://www.google.com/s2/favicons?sz=64&domain=icoremail.net // @grant none // @license MIT // ==/UserScript== (function() { 'use strict'; const domain = 'xiaoyou.hust.edu.cn'; function setDomain() { const m = document.querySelector(`[data-id="${domain}"]`); if (m) { m.click(); return true; } return false; // Element not found } // Initial attempt to set domain if (!setDomain()) { // If element is not found, use MutationObserver to monitor changes const observer = new MutationObserver((mutationsList, observer) => { if (setDomain()) { observer.disconnect(); // Stop observing once the element is found and updated } }); // Start observing the document for added nodes observer.observe(document.body, { childList: true, subtree: true }); } })();