olx-remove-promoted

Removes promoted posts.

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği yüklemek için Tampermonkey gibi bir uzantı yüklemeniz gerekir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği indirebilmeniz için ayrıca Tampermonkey gibi bir eklenti kurmanız gerekmektedir.

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

Bu stili yüklemek için Stylus gibi bir uzantı yüklemeniz gerekir.

Bu stili yüklemek için Stylus gibi bir uzantı kurmanız gerekir.

Bu stili yükleyebilmek için Stylus gibi bir uzantı yüklemeniz gerekir.

Bu stili yüklemek için bir kullanıcı stili yöneticisi uzantısı yüklemeniz gerekir.

Bu stili yüklemek için bir kullanıcı stili yöneticisi uzantısı kurmanız gerekir.

Bu stili yükleyebilmek için bir kullanıcı stili yöneticisi uzantısı yüklemeniz gerekir.

(Zateb bir user-style yöneticim var, yükleyeyim!)

// ==UserScript==
// @name         olx-remove-promoted
// @version      1.0
// @description  Removes promoted posts.
// @author       NameUserAnEnter
// @match        *://www.olx.pl/*
// @match        *://www.olx.ro/*
// @match        *://www.olx.ua/*
// @match        *://www.olx.bg/*
// @match        *://www.olx.pt/*
// @match        *://www.olx.com.pk/*
// @grant        none
// @namespace https://greatest.deepsurf.us/users/1556283
// ==/UserScript==

function removePromotedByClass() {
    const sections = document.getElementsByClassName("css-_70a3faba");
    while (sections.length) {
        sections[0].remove();
    }
}

function removePromotedByText() {
    document.querySelectorAll("section").forEach(section => {
        if (section.textContent.toLowerCase().includes("promoted")) {
            section.remove();
        }
    });
}

function cleanup() {
    removePromotedByClass();
    removePromotedByText();
}

setInterval(cleanup, 300);