Hey,
I am trying to modify an href attribute using javascript. Specifically, I want to replace “about:blank” with “tel:+19055764442”. Here is the code I am attempting to implement unsuccessfully. I have placed this before the body tag.
<script>
var a = document.querySelector('a[href="about:blank"]');
if (a) {
a.setAttribute('href', 'tel:+19055764442')
}
</script>
I am using this method because I used Snazzy Maps to create a custom map, and the Snazzy Maps editor replaces “tel:+19055764442” with “about:blank”. So I am unable to add a telephone link to the custom map.
Any help is appreciated.
Here is my site Read-Only: LINK
(how to share your site Read-Only link)