// Do this before we load the modules to get the default value up quickly
window.default_hrn = 'send.some@satsto.me';
window.url_set_hrn = 'send.some@satsto.me';
- if (document.getElementById("address").value === '') {
- if (window.location.search.length > 1 && window.location.search[0] === "?") {
- for (const pair of window.location.search.substring(1).split("&")) {
- const key_value = pair.split("=");
- if (key_value.length === 2 && key_value[0] === "name") {
- window.url_set_hrn = key_value[1];
- }
+ if (window.location.pathname.length > 1 && window.location.pathname.indexOf("@") != -1) {
+ window.url_set_hrn = window.location.pathname.substring(1);
+ } else if (window.location.search.length > 1 && window.location.search[0] === "?") {
+ for (const pair of window.location.search.substring(1).split("&")) {
+ const key_value = pair.split("=");
+ if (key_value.length === 2 && key_value[0] === "name") {
+ window.url_set_hrn = key_value[1];
}
}
+ }
+ if (document.getElementById("address").value === '') {
document.getElementById("address").value = window.url_set_hrn;
}
</script>