Youtube - unstick search bar and categories buttons row

Unsticks youtube search bar from the top, so it goes away by scrolling

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

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

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

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

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

You will need to install a user script manager extension 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.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name            Youtube - unstick search bar and categories buttons row 
// @description     Unsticks youtube search bar from the top, so it goes away by scrolling
// @namespace       https://greasyfork.org/en/users/758587-barn852
// @author          barn852
// @match           *://www.youtube.com/*
// @grant           none
// @version         1.0
// @grant           GM_addStyle
// @run-at          document-end 
// ==/UserScript==

function addGlobalStyle(css) {
    var head, style;
    head = document.getElementsByTagName('head')[0];
    if (!head) { return; }
    style = document.createElement('style');
    style.type = 'text/css';
    style.innerHTML = css;
    head.appendChild(style);
}

// search bar, remove, put // in the front if you want to stick it to the top.
addGlobalStyle( `div#masthead-container.ytd-app,ytd-mini-guide-renderer.ytd-app,app-drawer#guide{position:absolute!important}`); // search bar - 

// button row
addGlobalStyle( `#chips-wrapper {position:absolute!important;top:0!important} `); 
// addGlobalStyle( `ytd-feed-filter-chip-bar-renderer {position:relative!important} `);