I need to add a bookmarklet or something in Chrome browser to replace the protocol of a site to a local file.
Example URL:
https://st-test.com/folder/file.html
Becomes after clicking on the Javascript bookmarklet and it auto-reloads the page to:
file:///E:/st-test.com/folder/file.html
So it replaces "https://" with "file:///E:/" in the url and reload the page automatically.
I have found some suggestions here and there, using history.pushState
or tampermonkey, but it seems they just can change the text of the url after the '/' but not the protocol.