Add Hidebar Sider script

This commit is contained in:
The Magician 2024-03-27 13:13:00 +00:00
commit 3db0a533ae
1 changed files with 20 additions and 0 deletions

20
hidebar_sider.js Normal file
View File

@ -0,0 +1,20 @@
// ==UserScript==
// @name Hidebar Sider
// @description Hides the "Recommended videos" sidebar on Invidious instances.
// @version 1
// @grant none
// @include http*
// ==/UserScript==
let recommendedSidebarXpath = "/html/body/div/div/div[5]/div[3]";
let recommendedSidebar = document.evaluate(
recommendedSidebarXpath,
document,
null,
XPathResult.FIRST_ORDERED_NODE_TYPE,
null,
).singleNodeValue;
if (recommendedSidebar != null) {
recommendedSidebar.setAttribute("hidden", true);
}