Advertisement
LimePaste888

The Typing Area

Mar 21st, 2021 (edited)
235
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5 3.38 KB | None | 0 0
  1. <!-- saved from url=(0065)noLookingForYou -->
  2. <html><head><meta http-equiv="Content-Type" content="text/html; charset=windows-1252"><title>The Typing Area</title>
  3. </head>
  4.  
  5. <body style="font-family: Consolas; background: linear-gradient(90deg, rgba(0,190,0,1) 0%, rgba(7,128,128,1) 70%);color: white;">
  6.  
  7. <textarea style="resize: none;background: linear-gradient(180deg, rgba(0,0,0,1) 0%, rgba(0,0,0,0.76) 100%);width: 100%;outline: none;border: none;padding: 50;height: 75%;border-radius: 16px 16px 0px 0px;" id="0">Your notes here:</textarea>
  8.  
  9. <table style="background: linear-gradient(rgba(0, 0, 0, 0.66) 0%, rgba(0, 0, 0, 0.43) 100%); width: 100%; height: 12.5%; border-collapse: collapse; color: white;" id="1">
  10.   <thead style="
  11. ">
  12.     <tr style="background: rgba(0, 0, 0, 0.2)">
  13.       <th>Seconds since midnight</th>
  14.       <th>Hours since midnight</th>
  15.       <th>Button presses</th>
  16.       <th>Characters</th>
  17.     </tr>
  18.   </thead>
  19.   <tbody>
  20.     <tr style="
  21.    background: rgba(0, 0, 0, 0.1);
  22. ">
  23.       <td>Loading...</td>
  24.       <td>Loading...</td>
  25.       <td>excuse me what</td>
  26.       <td>does your browser support textarea</td>
  27.     </tr>
  28.   </tbody>
  29. </table>
  30.  
  31. <button style="height: 12.5%;width: 100%;margin:0 0.386% 0 0;border-radius: 0px 0px 16px 16px;background:linear-gradient(180deg, rgba(0,0,0,0.33) 0%, rgba(0,0,0,0) 80%, rgba(0,0,0,1) 100%);" onclick="a()">Reset</button>
  32. <script>
  33. var el0 = document.getElementById("0")
  34.     function a() {
  35.         time = new Date().getHours() + (new Date().getMinutes() / 60) + (new Date().getSeconds() / 3600)
  36.         var t
  37.         if (time < 4) {
  38.            t = "night owlΒ²"
  39.        }
  40.        else if (time < 7) {
  41.            t = "You've just slept a bit early, haven't you?"
  42.        }
  43.        else if (time < 12) {
  44.            t = "What am I?"
  45.        }
  46.        else if (time < 18) {
  47.            t = "Cup of tea perhaps."
  48.        }
  49.        else if (time < 23) {
  50.            t = "You are a user, not big surprise!"
  51.        }
  52.        else {
  53.            t = "night owl"
  54.        }
  55.        el0.value = t
  56.    }
  57.    function b() {
  58.        bList = document.getElementById('1').rows[1].cells
  59.         bVar = new Date()
  60.         bList[0].innerText = bVar.getSeconds() + bVar.getMinutes() * 60 + bVar.getHours() * 3600
  61.         bList[1].innerText = Math.floor(1000 * (bVar.getSeconds() / 3600 + bVar.getMinutes() / 60 + bVar.getHours())) / 1000
  62.         bList[2].innerText = cVar2
  63.         bList[3].innerText = document.getElementById("0").value.length
  64.        s = (Math.log10(bList[3].innerText) > 0 ? Math.log10(bList[3].innerText) : -1) * 127
  65.         document.getElementById("1").rows[0].cells[3].style.color = "rgb("+(s < 1020 ? (Math.floor(s)) : (Math.floor(1020 + s))).toString()+", "+Math.floor(510-(s)).toString()+", "+Math.floor((s)-510).toString()+")"}
  66. setInterval(function() {b()}, 32)
  67. var cVar2 = 0
  68. var cVar
  69. function c2() {
  70.    
  71.    if (cVar <= 255) {
  72.    setTimeout(function () {document.getElementById("1").style.color = "rgb("+cVar+", 255, "+cVar+")";cVar = cVar + 5;c2()}, 1)
  73.    }
  74.    else {document.getElementById("1").style.color = "white";cVar=255}
  75.    }
  76. function c1() {
  77.    cVar = 0
  78.    cVar2 += 1
  79.    c2()
  80.    }
  81. document.onkeydown = function() {c1()}
  82. </script>
  83.  
  84. <style>
  85. button,textarea{border: none;outline: none;font-family: Consolas;border-radius: 16px;font-size: 24;color: white;}
  86. td{text-align:center; font-size: 36; width: 25%}
  87. </style>
  88.  
  89. </body></html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement