Replace BHM

Replaces Youtube BHM logo with regular logo

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

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

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

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

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

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.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==UserScript==
// @name         Replace BHM
// @version      1.1
// @description  Replaces Youtube BHM logo with regular logo
// @require      http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js
// @include      https://www.youtube.com/*
// @include      http://www.youtube.com/*
// @grant        none
// @namespace https://greasyfork.org/users/733392
// ==/UserScript==

/*globals $*/

var old_url = "https://www.youtube.com/img/branding/desktop/bhm/yt_logo_v2_dark.png";
var new_url = "https://www.youtube.com/about/static/svgs/icons/brand-resources/YouTube-logo-full_color_dark.svg";
$(document).ready(
    function(){
        $("img[src='"+old_url+"']").attr("src", new_url);
        //document.getElementsByClassName('style-scope ytd-yoodle-renderer')[0].setAttribute("src", "https://www.youtube.com/about/static/svgs/icons/brand-resources/YouTube-logo-full_color_dark.svg");
        document.getElementsByClassName('style-scope ytd-yoodle-renderer')[0].setAttribute("width", "90");
        document.getElementsByClassName('style-scope ytd-yoodle-renderer')[0].setAttribute("height", "56");
    }
);