Skip to content

Instantly share code, notes, and snippets.

@kiriappeee
Created January 16, 2018 09:15
Show Gist options
  • Save kiriappeee/23b89d0195826fa2aad3aa3f8ccb67b9 to your computer and use it in GitHub Desktop.
Save kiriappeee/23b89d0195826fa2aad3aa3f8ccb67b9 to your computer and use it in GitHub Desktop.
Remove various sections from the YouTube interface
/*Remove videos from subscription that are older than a day*/
function removeOldSubbedVideos(){
subbedVideoList=document.querySelectorAll('ytd-item-section-renderer.style-scope.ytd-section-list-renderer');
for(var i=1;i<subbedVideoList.length;i++){
subbedVideoList[i].remove()
}
}
/*remove trending button*/
function removeTrendingButton(){
document.querySelector('a[href="/feed/trending"]').parentNode.remove();
}
/*Remove browse channels button*/
function removeBrowseChannelsButton(){
document.querySelector('a[href="/feed/guide_builder"]').parentNode.remove();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment