Jump to content

Make any YouTube embed click-to-load using uBlock Origin


mood

Recommended Posts

Make any YouTube embed click-to-load using uBlock Origin

 

Part of YouTube's success comes from the fact that it is easy to embed YouTube videos on third-party sites. Many website owners publish YouTube videos on the site itself but also on their own sites, and others may embed YouTube videos by other creators on their sites.

 

It is convenient to supplement an article that you are writing with a video, either self-created or created by someone else. On the other hand, users who don't want to watch the video may still have it played outright on the site or at least loaded to a degree. Connections to YouTube may not be wanted because of privacy. Some web browsers come with options to control media playback, others offer limited functionality in this regard only.

 

If you are using the content blocker uBlock Origin, you may use it to turn any YouTube embeds on third-party sites into click-to-play widgets. The main benefit of doing so is that there won't be any connections to YouTube and that nothing will load from the site unless you interact with that widget.

 

Here is an example screenshot captured here on this site after making the change in uBlock Origin. Note that we use the nocookie version of YouTube embeds on this site only.

 

ublock-origin-click-toload.png

 

A click on the widget loads the content; in this case just the YouTube video with options to start playback. On other sites, videos may play right away depending on factors such as the web browser that is used, the video in question, and the site.

 

The only downside to the approach is that you don't see the thumbnail or title of the video anymore on the page.

How to make YouTube embeds click-to-play in uBlock Origin

 

ublock-origin-youtube-block-embeds.png

 

It is actually very easy and can be done in just a minute. Here are the steps:

  1. Activate the uBlock Origin icon in the browser's toolbar and select the "open the dashboard" option to open the management dashboard.
  2. Switch to the "My filters" section when the page opens.
  3. Add the following two lines to the list of filters:
    • ||youtube.com^$3p,frame,redirect=click2load.html
    • ||youtube-nocookie.com^$3p,frame,redirect=click2load.html
  4. Click on "apply changes" to save the new filters.

 

Once done, visit any site with YouTube embeds to test the filters. You can try our Vivaldi 2.10 review for example, as it includes a video embed.

Closing Words

Turning third-party embeds into click-to-play widgets is an excellent way of speeding up the loading of websites and improving privacy at the same time. Raymond Hill, the creator of uBlock Origin, published the tip on Twitter recently.

It should be easy enough to use the two filters as a blueprint for other third-party embeds that you encounter. All you have to do, usually, is replace the domain name of the site in question while leaving the instructions untouched.

 

 

Source: Make any YouTube embed click-to-load using uBlock Origin

Link to comment
Share on other sites


  • Views 640
  • Created
  • Last Reply

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...