Advertisement
jamescolin

Show Location in Cheetah

Jun 8th, 2022 (edited)
274
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <!-- SITE TO GET A FREE KEY TO PUT IN THE LAST LINE : https://extreme-ip-lookup.com -->
  2.  
  3. <div id="mycity"></div>
  4.  
  5. <style>
  6.     #mycity {
  7. font-family: Verdana, Geneva, sans-serif;
  8. font-size: 30px;
  9. letter-spacing: 2px;
  10. word-spacing: 2px;
  11. color: #000000;
  12. font-weight: 400;
  13. text-decoration: none;
  14. font-style: normal;
  15. font-variant: normal;
  16. text-transform: none;
  17. }
  18. </style>
  19.  
  20. <script>
  21.   function getIP(json) {
  22.     let mytxt = '';
  23.     if ((json.city != 'undefined') && (json.city != '')) {
  24.         mytxt = 'Made in '+json.city+', with love.';
  25.     } else {
  26.         mytxt = 'Made in Orlando, with love.';
  27.     }
  28.     typeWriter(0,mytxt,100);
  29.   }
  30.  
  31.   function typeWriter(i,txt,speed) {
  32.     if (i < txt.length) {
  33.         document.getElementById('mycity').innerHTML += txt.charAt(i);
  34.         i++;
  35.         setTimeout(function() {
  36.             typeWriter(i,txt,speed);
  37.         }, speed);
  38.     }
  39.   }
  40. </script>
  41.  
  42. <script src="https://extreme-ip-lookup.com/json/?callback=getIP&key=REPLACE_WITH_YOUR_KEY" async defer></script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement