Created
March 25, 2026 20:27
-
-
Save arbaev/4ffbf5ab95dc4a7da29edd5d141f3c52 to your computer and use it in GitHub Desktop.
Tampermonkey скрипт для Яндекс.Почта убирает попап "может это рассылки и вы хотите их отключить"
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==UserScript== | |
| // @name Yandex Mail — удаление писем без попапа 'может это рассылки и вы хотите их отключить' | |
| // @namespace http://tampermonkey.net/ | |
| // @version 1.0 | |
| // @description Автоматически нажимает "Удалить только эти письма" в попапе Яндекс Почты | |
| // @match https://mail.yandex.ru/* | |
| // @match https://mail.yandex.com/* | |
| // @grant none | |
| // @run-at document-idle | |
| // ==/UserScript== | |
| (function () { | |
| 'use strict'; | |
| const observer = new MutationObserver(() => { | |
| // Ищем все кнопки на странице | |
| const buttons = document.querySelectorAll('button, [role="button"], a'); | |
| for (const btn of buttons) { | |
| const text = btn.textContent.trim(); | |
| // Кликаем на кнопку подтверждения простого удаления | |
| if (text.includes('удалить только эти') || text.includes('Нет, удалить')) { | |
| btn.click(); | |
| break; | |
| } | |
| } | |
| }); | |
| observer.observe(document.body, { | |
| childList: true, | |
| subtree: true, | |
| }); | |
| })(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment