Skip to content

Instantly share code, notes, and snippets.

@arturmkrtchyan
Created November 21, 2021 22:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arturmkrtchyan/a08fad31bbcb2ea1eb35f50d6ee17198 to your computer and use it in GitHub Desktop.
Save arturmkrtchyan/a08fad31bbcb2ea1eb35f50d6ee17198 to your computer and use it in GitHub Desktop.
Email label and Phone number fix
<script>
document.addEventListener("DOMContentLoaded", function() {
setInterval(function() {
const telNumebers = $('.js-list-item a:contains("Url label")');
telNumebers.each(function(){
const number = $(this).attr('href');
if(number == 'tel:') {
$(this).css('display', 'none');
} else {
$(this).html(number.replace('tel:', ''));
}
});
const emails = $('.js-list-item a:contains("Email to")');
emails.each(function(){
const email = $(this).attr('href');
if(email == 'mailto:') {
$(this).css('display', 'none');
} else {
$(this).html(email.replace('mailto:', ''));
}
});
}, 300);
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment