Youtube not loading comments Fix.

Fixes the issue where comments wouldn't load after blocking the cookies from "consent.youtube.com".

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

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

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

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.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

// ==UserScript==
// @name         Youtube not loading comments Fix.
// @version      1.1
// @description  Fixes the issue where comments wouldn't load after blocking the cookies from "consent.youtube.com".
// @author       Nick
// @match        *://www.youtube.com/*
// @run-at       document-start
// @namespace https://greasyfork.org/users/755612
// ==/UserScript==

javascript:void(document.cookie="CONSENT=YES+");

window.onload = function() {
    if(!window.location.hash) {
        window.location = window.location + '#comments';
        window.location.reload();
    }
}
// Do not delete because sometimes the first line gets skipped for whatever reason.
javascript:void(document.cookie="CONSENT=YES+");