Last active
          November 2, 2023 20:39 
        
      - 
      
 - 
        
Save vstyler96/c9e3643f415c1dd9ba47e04f4ce79e06 to your computer and use it in GitHub Desktop.  
    Play your guilty pleasures on YouTube and once finished, return to the home page.
  
        
  
    
      This file contains hidden or 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
    
  
  
    
  | let destroyAfterPlay = () => { | |
| const video = document.querySelector(".html5-main-video"); | |
| video.currentTime = 0; | |
| video.play(); | |
| setTimeout(() => { | |
| window.location.href = "https://youtube.com"; | |
| }, video.duration * 1000); | |
| }; | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment