您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Unsticks youtube search bar from the top, so it goes away by scrolling
当前为
- // ==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} `);