I'm using a 3rd party system that allows us to add custom javascript and I need a way to look for a custom URL and then have the system pop up the user login which is called by clicking on href="javascript:;"
< a class="nav-link" href="javascript:;"> < b>sign in</b></ a>
Note the class="nav-link" is NOT unique
I have no issue looking for custom URL and doing various actions, but I don't know how to perform a simulated click event on that javascript href so that it pops up the user login.
For instance landing on: "https://our.site.com/webstoreNew/services/guestprofile" The custom URL portion is "guestprofile" and it doesn't get redirected by main system and stays
I've tried the following:
<script>
const guest_url = "https://our.site.com/webstoreNew/services/guestprofile";
let current_url = window.location.href;
if(current_url === guest_url) {
$('href="javascript:;"')[0].click();
}
</script>
other things tried:
$(javascript:;)[0].click();
$(href="javascript:;")[0].click();
I feel like this is probably a syntax issue, but need someone's help