Created
August 7, 2025 10:38
-
-
Save CezaryDanielNowak/6024bdd26feb310cb78475513afa7778 to your computer and use it in GitHub Desktop.
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 Allegro filtruj po ilosci opinii | |
// @namespace http://tampermonkey.net/ | |
// @version 2025-06-03 | |
// @description try to take over the world! | |
// @author You | |
// @match https://allegro.pl/* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=allegro.pl | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
const btn = Object.assign(document.createElement('button'), { | |
onclick: () => { | |
const ileOpinii = 1 * prompt('Ile opinii', 10); | |
[...document.querySelectorAll('span.mpof_uk')] | |
.forEach((el) => { | |
const val = 1*el.innerText.replace(/[()]/g, ''); | |
if (val < ileOpinii) { | |
el.closest('article').style.display = 'none'; | |
} | |
}); | |
}, | |
innerHTML: 'FILTER', | |
style: 'position: fixed; top: 10px; left: 10px', | |
}); | |
document.body.appendChild(btn); | |
btn.click(); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment