-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy pathGet Clean Youtube, ocus mode.user.js
More file actions
31 lines (29 loc) · 1.28 KB
/
Copy pathGet Clean Youtube, ocus mode.user.js
File metadata and controls
31 lines (29 loc) · 1.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// ==UserScript==
// @name Get Clean Youtube, Focus mode
// @namespace http://tampermonkey.net/
// @version 0.3
// @description Get Clean Youtube, Focus mode
// @author rix4uni
// @match https://www.youtube.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=youtube.com
// @grant none
// ==/UserScript==
(function() {
'use strict';
const interval = setInterval(() => {
// Check if URL is a specific page on YouTube (not just the homepage)
if (window.location.href !== 'https://www.youtube.com/') {
// Show elements
document.querySelector('#page-manager').style.display = '';
document.querySelector("#start").style.visibility = "visible";
document.querySelector("#end").style.visibility = "visible";
document.querySelector("#guide").style.visibility = "visible";
} else {
// Hide elements
document.querySelector('#page-manager').style.display = 'none';
document.querySelector("#start").style.visibility = "hidden";
document.querySelector("#end").style.visibility = "hidden";
document.querySelector("#guide").style.visibility = "hidden";
}
}, 100); // Check every 100 milliseconds
})();