Created
May 16, 2011 08:50
-
-
Save patrickkettner/974110 to your computer and use it in GitHub Desktop.
youtube cleaner
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#watch-discussion { | |
display: none; | |
} | |
#watch-sidebar { | |
display: none; | |
} | |
#footer { | |
display: none; | |
} | |
#footer-container { | |
display: none; | |
} | |
#watch-player { | |
margin: auto; | |
} | |
#watch-main #watch-panel { | |
float: none; | |
margin: auto; | |
} | |
#watch-headline-title { | |
text-align: center; | |
} | |
#watch-headline-user-info { | |
text-align: center; | |
} | |
--------------------------------------------- | |
var togbutton = document.createElement('input'); | |
togbutton.setAttribute('type','button'); | |
togbutton.setAttribute('name','ToggleComments'); | |
togbutton.setAttribute('value','Comments'); | |
togbutton.setAttribute('class','yt-uix-button'); | |
var placement= document.getElementById("watch-actions"); | |
placement.appendChild(togbutton); | |
togbutton.onclick = toggle; | |
function toggle() { | |
var comments = document.getElementById("watch-discussion"); | |
var sidebar = document.getElementById("watch-sidebar"); | |
var video = document.getElementById("watch-player"); | |
var controls = document.getElementById("watch-panel"); | |
var title = document.getElementById("watch-headline-title"); | |
var subtitle = document.getElementById("watch-headline-user-info"); | |
if (comments.style.display == "inline") { | |
comments.style.display = "none"; | |
sidebar.style.display = "none"; | |
video.style.margin = "auto"; | |
controls.style.margin = "auto"; | |
controls.style.float = "none"; | |
title.style.textAlign="center"; | |
subtitle.style.textAlign="center"; | |
} | |
else { | |
comments.style.display = "inline"; | |
sidebar.style.display = "inline"; | |
video.style.margin = "0"; | |
controls.style.margin = "0"; | |
controls.style.float = "left"; | |
title.style.textAlign="left"; | |
subtitle.style.textAlign="left"; | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment