您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Dereferences mail.ru links in emails when clicked. Skips advertisement block displayed when some links are clicked.
当前为
// ==UserScript== // @name mail.ru: clean links // @namespace lainscripts_mailru_clean_links // @description Dereferences mail.ru links in emails when clicked. Skips advertisement block displayed when some links are clicked. // @author lainverse // @license CC BY-SA // @version 5.0 // @include https://e.mail.ru/* // @grant none // ==/UserScript== var clb = /^https?:\/\/r\.mail\.ru\/cl[a-z][0-9]+\/(.*)/i, cgi = /&(amp;)?url=([^&]*)/i, letter = document.getElementById('b-letter'); function locate_confirmer(i) { if (!i) return; var confirmForm = document.querySelector('#MailRuConfirm'); if (!confirmForm) setTimeout(locate_confirmer, 100, i-1); } letter.addEventListener('click',function(e){ if (e.target.tagName.toUpperCase() !== 'A') return; var link = e.target; for (var x in link) if (x.indexOf('__originUrl') > -1) { // stop propagation of this click event e.preventDefault(); // start searching for a confirmer locate_confirmer(10); var res = null; do { res = cgi.exec(this[x]); if (res) this[x] = decodeURIComponent(res[2]); res = clb.exec(this[x]); if (res) this[x] = 'http://' + res[1]; } while (res); this.href = this[x]; console.log("Dereferenced link:", this[x]); window.open(this[x], '_blank').focus(); delete this[x]; break; } });
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址