Greasy Fork is available in English.

YouTube Min Views Filter

10.000 izlenmenin altındaki videoları gizler

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey, το Greasemonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

You will need to install an extension such as Tampermonkey to install this script.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Userscripts για να εγκαταστήσετε αυτόν τον κώδικα.

You will need to install an extension such as Tampermonkey to install this script.

Θα χρειαστεί να εγκαταστήσετε μια επέκταση διαχείρισης κώδικα χρήστη για να εγκαταστήσετε αυτόν τον κώδικα.

(Έχω ήδη έναν διαχειριστή κώδικα χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Έχω ήδη έναν διαχειριστή στυλ χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

// ==UserScript==
// @name         YouTube Min Views Filter
// @namespace    http://tampermonkey.net/
// @version      1.1
// @description  10.000 izlenmenin altındaki videoları gizler
// @author       Sefa AVAN
// @license      MIT
// @match        http://*.youtube.com/*
// @match        http://youtube.com/*
// @match        https://*.youtube.com/*
// @match        https://youtube.com/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    const MIN_VIEWS = 10000; // Bu değeri değiştirebilirsiniz

    function parseViews(text) {
        text = text.replace(/\s/g,'');
        if (text.includes('B')) return parseFloat(text.replace('B','').replace(',','.')) * 1000;
        if (text.includes('Mn')) return parseFloat(text.replace('Mn','').replace(',','.')) * 1000000;
        return parseInt(text.replace(/[^0-9]/g,'')) || 0;
    }

    function filterVideos() {
        const videos = Array.from(document.querySelectorAll('ytd-rich-item-renderer, ytd-video-renderer, ytd-grid-video-renderer'));
        videos.forEach(v => {
            const viewSpan = Array.from(v.querySelectorAll('span')).find(span => span.innerText.includes('görüntüleme'));
            if (!viewSpan) return;
            const views = parseViews(viewSpan.innerText);
            v.style.display = (views >= MIN_VIEWS) ? '' : 'none';
        });
    }

    // İlk filtreleme
    filterVideos();

    // Yeni videolar yüklendikçe filtre uygula
    const observer = new MutationObserver(() => {
        filterVideos();
    });
    observer.observe(document.body, { childList: true, subtree: true });

})();