Skip to content

Instantly share code, notes, and snippets.

@fakhrullah
Created August 18, 2016 20:56
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fakhrullah/297eef1941489f843e175c6e1c741e1a to your computer and use it in GitHub Desktop.
Save fakhrullah/297eef1941489f843e175c6e1c741e1a to your computer and use it in GitHub Desktop.
Distraction Free Youtube - stylish css
@namespace url(http://www.w3.org/1999/xhtml);
@-moz-document domain("www.youtube.com") {
/** =============================================================================================
* I love Youtube. I watch lot of videos there.
*
* Once upon a time, I want to search for latest song in Youtube.
* I enter Youtube, then I lost.
* There are too many exciting videos. I watch the recommended videos, just one video.
* Then another one. Then another one. Oh NO! I wasted my time too much in Youtube.
* Click all [X] on tabs that has red with white triangle.
* Then I remember, I want to search song in Youtube. Enter Youtube again. I lost again.
* I am trapped in the loop.
*
* So, I hacked my life. Install stylish on Firefox insert this css rule for remove distraction.
*
* I am LifeHacker =D
* =============================================================================================
*/
/* Hide recommendation on homepage */
#feed{
display: none;
}
/* Hide sidebar recommendations
*
* When you playing any video, there will be some
* videos right side bar.
* At top of right side bar is next autoplay video,
* then there are lot of recommends videos below it.
*
* Hide those recommend videos because that just distraction.
*
*/
#watch7-sidebar-modules > div:nth-child(2){
display: none;
}
}
@gauravgrover95
Copy link

gauravgrover95 commented Dec 5, 2017

Hi, I was tinkering with your code and found that it does not work anymore.

Following is the code that works now:

#feed, ytd-browse[page-subtype=home] {
 	display: none; 
}

#related {
	display: none
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment