Custom YouTube Interface

Customize YouTube interface by hiding certain elements and making modifications.

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

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

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.

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

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!)

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.

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

// ==UserScript==
// @name         Custom YouTube Interface
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  Customize YouTube interface by hiding certain elements and making modifications.
// @author       You
// @match        *://www.youtube.com/*
// @grant        GM_addStyle
// ==/UserScript==

(function() {
    'use strict';

    // CSS to hide certain elements and apply custom styles
    GM_addStyle(`
        /* Hide Like and Dislike buttons */
        ytd-toggle-button-renderer.style-scope.ytd-video-primary-info-renderer {
            display: none !important;
        }

        /* Hide Download and Save buttons */
        ytd-menu-renderer.style-scope.ytd-video-primary-info-renderer ytd-menu-popup-renderer {
            display: none !important;
        }

        /* Hide Description */
        #description {
            display: none !important;
        }

        /* Hide Comments */
        #comments {
            display: none !important;
        }

        /* Hide Shorts */
        ytd-rich-grid-media[is-shorts] {
            display: none !important;
        }

        /* Make video list on watch page bigger */
        ytd-playlist-video-list-renderer {
            width: 100% !important;
        }

        /* Replace logo with back button */
        #logo {
            display: none !important;
        }

        #back-button {
            position: absolute;
            top: 10px;
            left: 10px;
            background: #fff;
            border: 1px solid #ccc;
            padding: 5px;
            cursor: pointer;
        }

        #back-button:hover {
            background: #f0f0f0;
        }

        /* Adjust Search bar to be an icon */
        #search {
            display: none !important;
        }

        #search-icon {
            position: absolute;
            top: 10px;
            right: 10px;
            background: url('path_to_icon_image') no-repeat center;
            width: 24px;
            height: 24px;
            cursor: pointer;
        }
    `);

    // JavaScript to create a back button
    const backButton = document.createElement('div');
    backButton.id = 'back-button';
    backButton.textContent = 'Back'; // You can change this text or use an icon
    document.body.appendChild(backButton);
    backButton.addEventListener('click', () => window.history.back());

    // JavaScript to create a search icon
    const searchIcon = document.createElement('div');
    searchIcon.id = 'search-icon';
    document.body.appendChild(searchIcon);
    searchIcon.addEventListener('click', () => {
        const searchField = document.querySelector('input#search');
        if (searchField) {
            searchField.focus();
        }
    });

})();