-
Notifications
You must be signed in to change notification settings - Fork 0
/
youtubeplain.user.js
29 lines (22 loc) · 1.17 KB
/
youtubeplain.user.js
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
// ==UserScript==
// @name Youtube Plain
// @namespace http://github.com/shajith
// @description Remove everything but title and video from youtube pages.
// @include http://www.youtube.com/watch/*
// @include http://youtube.com/watch/*
// @include http://www.youtube.com/watch?*
// @include http://youtube.com/watch?*
// ==/UserScript==
var _toggleCrap = function (hide) {
arr = document.querySelectorAll('#ticker, #pagetop, #pagebottom, #watch-main-container, #watch-headline-user-info')
for(i=0;i<arr.length;i++){
if(hide)
arr[i].style.display = "none";
else
arr[i].style.display = "";
}
}
d=document.createElement("div");
_toggleCrap(true);
d.innerHTML = '<button type="button" class="yt-uix-button" onclick="arr=document.querySelectorAll(\'#pagetop, #pagebottom, #watch-main-container, #watch-headline-user-info\');for(i=0;i<arr.length;i++){arr[i].style.display = \'\';};document.getElementById(\'showUIButton\').style.display=\'none\';return false;" id="showUIButton" style=""><span class="yt-uix-button-content">Show UI</span></button>';
document.getElementById("watch-headline-user-info").parentNode.appendChild(d);