Quora: hide promoted posts in the feed
Detects "Promoted" and "Sponsored" labels in the feed and hides whole cards with advertising answers and questions.
Code to copy
// Hide promoted/sponsored answers and questions in the feed
function hidePromoted() {
const labels = ['Promoted', 'Sponsored', 'Promowane', 'Gesponsert', 'Sponsorisé', 'Sponsorizzato', 'Patrocinado', 'Реклама'];
document.querySelectorAll('[class*="q-box"]').forEach(function (box) {
const t = (box.textContent || '').trim();
if (t.length > 60) { return; }
if (labels.some(function (l) { return t === l || t.startsWith(l + ' '); })) {
let card = box.closest('[class*="q-box"][id]') || box.parentElement;
for (let i = 0; i < 6 && card; i++) {
if (card.getAttribute('id') && card.getAttribute('id').length > 8) { break; }
card = card.parentElement;
}
if (card) { card.style.setProperty('display', 'none', 'important'); }
}
});
}
hidePromoted();
const obs = new MutationObserver(hidePromoted);
obs.observe(document.documentElement, { childList: true, subtree: true });
How to use this example
- Copy the code with the button above.
- Install JustZix (2 minutes) and open the extension on the target page.
- Add a new rule matching that page.
- Paste the code into the rule's JavaScript panel and save — it runs on every page visit.
Rate this example
No ratings yet — be the first.