I tried to insert a link at the beginning of a URL in Chrome using a bookmark. I want the URL to change from:
https://raw.githubusercontent.com/kguidonimartins/csv_example/master/1946_proposicoes.csv
To:
chrome-extension://ibfcfelnbfhlbpelldnngdcklnndhael/viewer.html?url=https://raw.githubusercontent.com/kguidonimartins/csv_example/master/1946_proposicoes.csv
I put this in the URL field of a bookmark:
javascript:location=location.href.replace(location,"chrome-extension://ibfcfelnbfhlbpelldnngdcklnndhael/viewer.html?url=" + location)
But that failed. Then, I tried this:
javascript:(function(){window.open('chrome-extension://ibfcfelnbfhlbpelldnngdcklnndhael/viewer.html?url='+encodeURIComponent(location.href));})();
And that also failed.
Any idea how to solve this?