您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
原理:根据邮件标题是否加粗找到未读邮件,然后模拟点击,并停留5秒(时间过短无法触发已读)
// ==UserScript== // @name 阿里邮箱自动阅读邮件 // @namespace http://tampermonkey.net/ // @version 0.1 // @description 原理:根据邮件标题是否加粗找到未读邮件,然后模拟点击,并停留5秒(时间过短无法触发已读) // @author auroraeffect // @match http://mail.hichina.com/alimail/ // ==/UserScript== function clickUnreadEmail() { const htmlElements = document.getElementsByClassName('maillist_item_wrap e_list_item mail_tag_hover mail_from_hover maillist_item_hassummary') const elemets = Array.from(htmlElements) for(let i=0 ;i<elemets.length;i++ ){ const mail = elemets[i].querySelector("div") const boldElements = mail.querySelector('span.e_ellipsis.e_fs12.maillist_item_subject.mail_from_subject.e_bold') if(boldElements){ boldElements.scrollIntoView({behavior: "smooth", block: "center", inline: "nearest"}) boldElements.click() console.log(new Date()) console.log(boldElements.innerText) return } } } setInterval(()=>{clickUnreadEmail()},5000)