Useless Hack a Week.

The Downgrade Detour

Cover Image for The Downgrade Detour
Nick
Nick

Walmar redirects are here baby!

Conversions

With this week's useless hack, we have made a chrome extension which will redirect you to off-brand versions of sites you commonly use.

There are plenty of funny redirects built into this extension. We got Google to Bing, Youtube to Vimeo, Amazon to Ebay, and many other hidden ones for you to discover.

My personal favorite is the netflix redirect, so try that one yourself!

The 'better' websites

Branding is a powerful tool. It's why some companies like apple can get away with selling the same phone with +1 to the version number every other year!

The competition to companies like this often have just as good features at lower prices, and sometimes even more features, with Samsung being one of them.

On the other hand, branding can cause companies to become better than their competition. For example, let's take a look at Google vs Bing. Google has x5 to x6 the market share of Bing. What does this mean for the search engine? Well, search engines depend on data, and since Google has x5 to x6 the market share, they have about that much more data as well!

So yes, there is a practical benefit to using Google over Bing. Same goes for Amazon over Ebay! More sellers and products exist on Amazon, so you are more likely to find what you want on that website.

This is what makes a knockoff website a knockoff. Why would you use Bing if Google does the same thing but better? Why would you try to watch videos on Vimeo if there is no content to really watch?

Turn on our extension, and see how long you can last with all the walmar versions of the web apps you usually use. This gets extremely frustrating with social apps! Imagine trying to go to Twitter/X to interact with people and you get redirected to Tumblr.

In the end, branding is powerful in the beginning, and it can have massive consequences on what website dominates the market, especially when that website depends directly on the amount of data it can collect, or number of users it has.

The Hack

Unlike our other blog posts, we are going to begin talking less about the specific details of the code, but rather talk about the implementation. You can always access the github repo here, or at the bottom of the page.

Our implementation is very simple. We capture keywords typed into the search bar of any given browser, and if we see a certain keyword like 'youtube' or 'amazon', we will redirect the user to a similar website which is not as popular.

Now you may ask, why not match on the exact URL or domain name to achieve this affect? We'll, because complicated websites like amazon and youtube don't always match on their exact URLs and typical domain names, making it tricky to trigger a redirect when visiting some sites.

This is why we use the keyword approach, to easily guarantee a redirect will happen when visiting a given site.

We also choose to substitute the search text before any search is done. The reason for this is that if you do it after you click 'Enter' and the search begins, you have the possibility of loading scripts from the original site into the redirected site. For example, scripts from Youtube could be trying to load onto Vimeo. This can cause the browser to never properly load sites, so we avoid this by subbing search text before any processes are run.

Drawbacks

There are a few drawbacks to this approach.

One of the drawbacks is that you can match on browser searches that are not necessarily trying to access the website. For example, you can type Youtube Logo in your browser search, and it will redirect you to Vimeo.

A second drawback is the possibility of Double Redirects. This happens when you try to access a site such as Amazon.

First, it will redirect you to Ebay, but there is a keyword (Youtube) somewhere on the ebay website which triggers another redirect to Vimeo. This causes a chain where going to Amazon redirects you to Vimeo, which doesn't make that much sense.

To combat this, we tie a timer delay to the redirects, so if you were redirected in the last 5 seconds, we bypass any new redirect attempts:

const REDIRECT_GRACE_PERIOD = 5000;  // 5 seconds; adjust as needed

chrome.webNavigation.onCommitted.addListener((details) => {
    const currentDomain = new URL(details.url).hostname;

    chrome.storage.local.get([`lastRedirect_${details.tabId}`], function (result) {
        const lastRedirect = result[`lastRedirect_${details.tabId}`];

        if (Date.now() - lastRedirect < REDIRECT_GRACE_PERIOD) {
            return;  // Too soon after the last redirect; do nothing
        }

The end result is a redirect plugin, which will send you to website alternatives you never wanted to touch in the first place: Demonstration

Download and try it out! Let us know on X what website redirects you discovered and found the funniest.

white space

Code for this project can be found here!

Do you like unhinged content? Follow me on X! Or Buy me a coffee!