Skip to content

Instantly share code, notes, and snippets.

@arturmkrtchyan
Created November 21, 2021 22:30
Show Gist options
  • Select an option

  • Save arturmkrtchyan/a08fad31bbcb2ea1eb35f50d6ee17198 to your computer and use it in GitHub Desktop.

Select an option

Save arturmkrtchyan/a08fad31bbcb2ea1eb35f50d6ee17198 to your computer and use it in GitHub Desktop.

Revisions

  1. arturmkrtchyan created this gist Nov 21, 2021.
    25 changes: 25 additions & 0 deletions email-label-tmp-fix.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,25 @@
    <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>