Skip to content

Instantly share code, notes, and snippets.

@konclave
Last active May 17, 2021 15:27
Show Gist options
  • Save konclave/6fbc264dac9e427c0d5e53a9d2f057ec to your computer and use it in GitHub Desktop.
Save konclave/6fbc264dac9e427c0d5e53a9d2f057ec to your computer and use it in GitHub Desktop.
Userscript that removes "Foreign Agent" banner from Meduza news articles
// ==UserScript==
// @name Meduza.io foreign agent banner remove
// @name:ru Meduza.io удаление баннера об иностранном агенте
// @namespace https://meduza.io/
// @version 0.3
// @description Removes foreign agent banner from Meduza news site
// @description:ru Удаляет баннер об иностранном агенте из новостей Meduza
// @author konclave
// @match https://meduza.io/*
// @grant none
// @run-at document-body
// ==/UserScript==
(function() {
'use strict';
var resizeObserver = new ResizeObserver(function() {
var banner = document.querySelector('#div-gpt-ad');
if (banner) {
banner.parentNode.removeChild(banner);
}
});
resizeObserver.observe(document.querySelector('body'));
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment