Skip to content

Instantly share code, notes, and snippets.

@santaklouse
Created January 27, 2026 12:28
Show Gist options
  • Select an option

  • Save santaklouse/49680e4dcab7c9ec176dc1cd5f76e15f to your computer and use it in GitHub Desktop.

Select an option

Save santaklouse/49680e4dcab7c9ec176dc1cd5f76e15f to your computer and use it in GitHub Desktop.
Tampermonkey script for removing toast dialog window using jQuery
// ==UserScript==
// @name Remove toast dialog window using jQuery
// @namespace http://tampermonkey.net/
// @version 2026-01-27
// @description try to take over the world!
// @author You
// @match https://godsofmarketing-reserv.top/*
// @require https://code.jquery.com/jquery-4.0.0.slim.min.js
// @icon https://www.google.com/s2/favicons?sz=64&domain=tampermonkey.net
// @grant none
// ==/UserScript==
(function () {
'use strict';
let count = 0;
let my$ = jQuery.noConflict(true);
let mainFn = () => {
try {
const parent = my$('.toast*')[0];
if (!parent) {
throw 'unable to find parent element for remove';
}
const my$el = my$('.exceeded-title__ERj1I', parent).closest('.toast*');
if (!my$el || !my$el.length) {
throw 'unable to find element for remove';
}
my$el.remove()
} catch (e) {
console.warn(e)
throw e;
}
console.info(`Element removed sucessfully`)
};
my$(document).ready(() => {
const intervalID = setInterval(() => {
console.debug(`trying to remove dialog #my${++count}`);
try {
mainFn();
clearInterval(intervalID);
} catch (e) {
console.debug('dialog not found')
}
if (count > 20) { //clean interval after 10 secs of unsucessfull tryings
clearInterval(intervalID);
mainFn = my$ = count = undefined;
}
}, 500);
});
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment