Skip to content

Instantly share code, notes, and snippets.

@rishta
Last active August 6, 2024 18:45
Show Gist options
  • Save rishta/c822049df908856239dd25dbf3aa05c4 to your computer and use it in GitHub Desktop.
Save rishta/c822049df908856239dd25dbf3aa05c4 to your computer and use it in GitHub Desktop.
Skrypt do usuwania pop-upa z troską o naszą prywatność z wp.pl. Michał B., Krzysztof S. i Jacek Ś. nie będą zarabiać na naszych danych.
// ==UserScript==
// @name Jebać Wirtualnych Analfabetów
// @namespace http://tampermonkey.net/
// @version 0.666-42
// @description "Cenimy Twoją prywatność", tak, kurwa, bardzo.
// @author Jacek Krysztofik
// @match *://*.wp.pl/*
// @match *://*.money.pl/*
// @match *://*.pudelek.pl/*
// @match *://*.parenting.pl/*
// @grant none
// ==/UserScript==
const observer = new MutationObserver(function(mutations) {
mutations.forEach(function(mutation) {
if (mutation.type === "childList") {
let fuck = Array.from(document.querySelectorAll('h3'))
.find(el => el.textContent.includes("Cenimy Twoją prywatność"))
if (!fuck) return;
while (fuck.parentElement.tagName == 'DIV') {
fuck = fuck.parentElement
}
fuck.parentElement.removeChild(fuck)
Array.from(document.styleSheets).forEach(s => {
try {
s.deleteRule(Array.from(s.cssRules).findIndex(r => r.cssText.match(/blur/)))
} catch (e) {}
});
}
});
});
const attach = () => {
observer.observe(document.body, { attributes: true, childList: true, subtree: true });
}
(function() {
'use strict';
if (document.readyState == "complete" || document.readyState == "loaded" || document.readyState == "interactive") {
attach()
} else {
document.addEventListener('DOMContentLoaded', attach)
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment