Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save CezaryDanielNowak/6024bdd26feb310cb78475513afa7778 to your computer and use it in GitHub Desktop.
Save CezaryDanielNowak/6024bdd26feb310cb78475513afa7778 to your computer and use it in GitHub Desktop.
// ==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