One of the annoying distractions while watching YouTube videos is the constant interruption by advertisements—it breaks the flow and ruins the viewing experience. A simple trick I found is to watch videos in "Embed Mode". Most videos play seamlessly this way—even if you don’t have an ad blocker installed. It works on mobile too!
- Click the
Sharebutton below the YouTube video. - From the sharing options, click
Embed.- This will open the video in embed mode.
-
Create a Bookmark
- Open your browser's bookmarks bar.
- Right-click on the bookmarks bar and select Add This Page to Favorites.
-
Add the JavaScript Code
-
In the Name field, enter a descriptive name like
YouTube Embed Mode. -
In the URL field, paste the following JavaScript code:
javascript:(function(){if(location.href.includes("youtube.com/watch?v=")){let id=location.href.split("v=")[1].split("&")[0];window.open(`https://www.youtube.com/embed/${id}`,"_blank");}})();
- This will replace
watch?v=withembed/1 in the address bar, and let YouTube load the video in full-screen embed mode in a new tab.
- This will replace
-
-
Save the Bookmark
- Save the bookmark. It should now appear on your bookmarks bar.
-
Use the Bookmarklet
- Navigate to a YouTube video page (e.g.,
https://www.youtube.com/watch?v=exampleID). - Click on the
YouTube Embedbookmark you've just created. - The script will extract the video ID and open the corresponding embeddable URL (e.g.,
https://www.youtube.com/embed/exampleID) in a new tab.
- Navigate to a YouTube video page (e.g.,