Introduction

Upgrades

  • Multiple Support For A Single Phone Number
  • Support For Multiple Different Emails
  • Support for Multiple Different Phone Numbers

Usage

Download this version from this link and link it at the end of the body of your html.
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Hidden From Bots</title>
</head>
<body>

    <script src="hidden-from-bots.js"></script>
</body>
</html>

Create a javascript file with the name you want, in this case I name it hide.js, and now link it above the hidden-from-bots.js script.

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Hidden From Bots</title>
</head>
<body>

    <script src="hide.js"></script>
    <script src="hidden-from-bots.js"></script>
</body>
</html>

To the javascript file that you just created add a constant called email with the email to hidden from the bots or phone with the phone number to hidden from the bots depending, in this case I am going to use both.

const email = 'contact@hidden-from-bots.com';
const phone = '44333637662687';

And in your html add the emailHidde or phoneHidde class to your element to hidden from bots, I recommend doing it with the p tag, button, div or whatever you like, I accept the a tag.

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Hidden From Bots</title>
</head>
<body>
    <p class="emailHidde">Email</p>
    <p class="phoneHidde">Phone</p>

    <button class="emailHidde">Email</button>
    <button class="phoneHidde">Phone</button>

    <script src="hide.js"></script>
    <script src="hidden-from-bots.js"></script>
</body>
</html>

Ready, now you can add the styles you like.