Advertisement
Guest User

Untitled

a guest
Aug 20th, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. // Remove sidebar repeatedly
  2. setInterval(function() {
  3. const sidebar = document.querySelector('#watch7-sidebar')
  4. if (sidebar && sidebar.remove) sidebar.remove()
  5. const sidebarModules = document.querySelector('#watch7-sidebar-modules')
  6. if (sidebarModules && sidebarModules.remove) sidebarModules.remove()
  7. console.log('test')
  8. }, 500)
  9.  
  10. // Remove player after it has been stopped
  11. const id = setInterval(function() {
  12. const hasStopped = !!document.querySelector('.ytp-play-button').title
  13. if (hasStopped) {
  14. clearInterval(id)
  15. location.replace('about:blank')
  16. }
  17. }, 200)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement