i cant use url Query https://example.com/?l=http://example2.com on my CloudFlare Worker server.
So, My question is, how to convert this JS script to work with https://example.com/#http://example2.com
function getUrlVars() {
var vars = {};
var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi,
function(m,key,value) {
vars[key] = value;
});
return vars;
}
var l = getUrlVars()["l"];