ljredux

Antiquity, code, and obscure french stuff.

Make Your Own God Damn Skip Button

2024-10-13 Internet ljredux

When Google burst onto the scene in the late 90s, its search portal stood out for its simplicity: Just a clean, white page with a logo, a search box, and two buttons. In an ecosystem overwhelmed by ad-heavy portals like Yahoo, Lycos, and Excite, this straightforward and no-nonsense approach was a breath of fresh air, playing a significant role in the company’s early success.

It is striking how much the tables have turned. How a forward-thinking company with such a focus on minimalism and innovation, has transformed one of its key acquisitions—a once cool and disruptive video platform that was devoid of ads—into the most hostile ads vs ad-blockers arm race the internet has ever seen.

I’m talking about YouTube of course, and the latest rumour (denied by Google) suggests the button for skipping ads is sometimes being hidden. The heated reaction put me in mind of something that has puzzled me for a while: Why don’t more users create an in-browser skip button themselves?

All mainstream desktop browsers allow us to create bookmarklets (a bookmark which runs javascript on the loaded page), and all HTML5 <video> elements can be manipulated with javascript. This means we can skip to the end of any HTML5 video we like (for now at least) whether YouTube provides a skip button or not.

javascript:(function() { 
    const video = document.querySelector('video'); 
    if (video) { video.currentTime = video.duration; }
})();

The logic is straightforward enough: Locate the first <video> selector on the webpage and set its playback position to the total duration of the loaded clip, effectively skipping to the end.

Creating a bookmarklet in most browsers is trivial. In Chrome for example, you must enable the Bookmarks bar, right click it, select Add page..., and paste the provided javascript into the URL field.

Make a Skip Video Bookmarklet

Et voila! You can now skip any video you like.

Users of Vivaldi—a Chromium-based web browser for power users—can instead utilise its command chain feature to add a button to the status bar. This method negates the need for the bookmarks bar to be visible, preserving precious screen real estate.

To be clear, I am not against ads. Creators deserve to be paid for any content they choose to monetise. But this arms race is fierce, and with the Monolith of Mountain View now targeting users who have chosen to forgo ad blockers with such underhand tactics, it’s hardly surprising that many are searching for a more reasonable middle-ground themselves.