As the title says, I'm trying to automatically redirect any link that starts with https://chromewebstore.google.com/ to https://chrome.google.com/webstore/ based on these examples:

Initial URL: https://chromewebstore.google.com/detail/ublock-origin/cjpalhdlnbpafiamejdnhcphjbkeiagm

Final URL: https://chrome.google.com/webstore/detail/ublock-origin/cjpalhdlnbpafiamejdnhcphjbkeiagm/overview

As you can see, the final URL ends in "overview", otherwise the https://chrome.google.com/webstore URL of any chrome extension won't open up.

I was trying to use Tampermonkey with Chrome to do that, by using this code:

// ==UserScript==
// @name         Redirect new chrome web store to old chrome web store
// @match        https://chromewebstore.google.com/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    const newPath = window.location.href.replace('https://chromewebstore.google.com/', 'https://chrome.google.com/webstore/');
    window.location.href = newPath  + '/overview';
})();

, but I noticed it Tampermonkey is not allowed access to the chrome web store pages. I'm 100% the code above would work if Tampermonkey would have been allowed access, since I tested the code with reddit and old reddit as seen here:

// ==UserScript==
// @name         Redirect to old reddit
// @match        https://www.reddit.com/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    const newPath = window.location.href.replace('https://www.reddit.com/', 'https://old.reddit.com/');
    window.location.href = newPath;
})();

I also tried using this chrome extension Redirector, but it's not allowed access to the chrome web store as well.

What I ended up doing is using this bookmarklet:

javascript:(function(){if(window.location.href.startsWith('https://chromewebstore.google.com/')){const newPath=window.location.href.replace('https://chromewebstore.google.com/','https://chrome.google.com/webstore/');window.location.href=newPath+"/overview";}})();

, which is tedious to click on every time I want to see the old design of chrome web store.

I know this can be solved with programs like Fiddler, but I'm looking for alternatives that can be used within the browser.

Thanks!

0

There are 0 best solutions below