Advertisement
Guest User

Untitled

a guest
Jun 10th, 2017
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.30 KB | None | 0 0
  1. eerst JS :
  2. var x = 0;
  3. var i = 0;
  4. var t = 0;
  5. var it = 0;
  6. var itv = 0;
  7. var itt = 0;
  8. var iv = 0;
  9. var like = -1;
  10. var ppassword = 0;
  11. function chek() {
  12. t = document.getElementById("becool").innerHTML.length;
  13. it = document.getElementById("becool").style.fontSize;
  14. if (t >= 28){
  15. if (it === "90px") {document.getElementById("becool").innerHTML = "TE LANG";}
  16. }
  17. if (t >= 29){
  18. if (it === "85px") {document.getElementById("becool").innerHTML = "TE LANG";}
  19. }
  20. if (t >= 30){
  21. if (it === "80px") {document.getElementById("becool").innerHTML = "TE LANG";}
  22. }
  23. if (t >= 31){
  24. if (it === "75px") {document.getElementById("becool").innerHTML = "TE LANG";}
  25. }
  26. if (t >= 32){
  27. if (it === "70px") {document.getElementById("becool").innerHTML = "TE LANG";}
  28. }
  29. }
  30. function random() {
  31. start()
  32. x = Math.floor((Math.random() * 4) + 1);
  33. if (x === 1) {
  34. document.getElementById("becool").style.fontFamily = "PixelSplitter-Bold";
  35. }
  36. if (x === 2) {
  37. document.getElementById("becool").style.fontFamily = "bloody";
  38. }
  39. if (x === 3) {
  40. document.getElementById("becool").style.fontFamily = "AveriaSansLibre-Light";
  41. }
  42. if (x === 4) {
  43. document.getElementById("becool").style.fontFamily = "SHLOP";
  44. }
  45. itv = Math.floor((Math.random() * 3) + 1);
  46. if (itv === 1) {document.body.background = "yellow.jpg"}
  47. if (itv === 2) {document.body.background = "green.png"}
  48. if (itv === 3) {document.body.background = "black.png"}
  49. itt = Math.floor((Math.random() * 3) + 1);
  50. if (itt === 1) {
  51. document.getElementById("becool").style.color = "blue";
  52. }
  53. if (itt === 2) {
  54. document.getElementById("becool").style.color = "purple";
  55. }
  56. if (itt === 3) {
  57. document.getElementById("becool").style.color = "orange";
  58. }
  59. iv = Math.floor((Math.random() * 5) + 1);
  60. if (iv === 1) {
  61. document.getElementById("becool").style.fontSize = "90px"
  62. }
  63. if (iv === 2) {
  64. document.getElementById("becool").style.fontSize = "85px"
  65. }
  66. if (iv === 3) {
  67. document.getElementById("becool").style.fontSize = "80px"
  68. }
  69. if (iv === 4) {
  70. document.getElementById("becool").style.fontSize = "75px"
  71. }
  72. if (iv === 5) {
  73. document.getElementById("becool").style.fontSize = "70px"
  74. }
  75. chek()
  76. }
  77. function setcookie() {
  78. document.getElementById("becool").style.textAlign = "center";
  79. user = document.getElementById("123").value
  80. if (user === null) {
  81. user = "";
  82. x = 2;
  83. }
  84. user = ("hallo " + user);
  85. }
  86. function setname() {
  87. if (x === 5) {
  88. document.getElementById("becool").innerHTML = " ERROR ";
  89. x = 0;
  90. }
  91. else {
  92. document.getElementById("becool").innerHTML = user;
  93. }
  94. }
  95. function start() {
  96. setcookie()
  97. setname()
  98. chek()
  99. }
  100. function likes() {
  101. like = like + 1;
  102. if (like === 0) {document.getElementById("duimpje").innerHTML = "je hebt nog geen likes";}
  103. if (like === 1) {document.getElementById("duimpje").innerHTML = ("dit project heeft " + like + " like!");}
  104. if (like >= 2) {document.getElementById("duimpje").innerHTML = ("dit project heeft " + like + " likes!");}
  105. }
  106. function reset() {
  107. var x = 0;
  108. var i = 0;
  109. var t = 0;
  110. var it = 0;
  111. var itv = 0;
  112. var itt = 0;
  113. var iv = 0;
  114. var like = -1;
  115. random()
  116. likes()
  117. document.getElementById("123").hidden = false;
  118. document.getElementById("becool").hidden = false;
  119. document.getElementById("button1").hidden = false;
  120. }
  121. function hidden() {
  122. document.getElementById("123").hidden = true;
  123. document.getElementById("becool").hidden = true;
  124. document.getElementById("button1").hidden = true;
  125. ppassword = prompt("password");
  126. if (ppassword === "codeMENEER1") {reset()} else {hidden()}
  127. }
  128. setTimeout(hidden, 1)
  129.  
  130. nu HTML :
  131.  
  132. <html>
  133. <head>
  134. <style>
  135. h5 {
  136. text-align: center;
  137. }
  138. h1 {
  139. text-align: center;
  140. font-size: 70px;
  141. font-family: AveriaSansLibre-Light;
  142. color: orange;
  143. text-blink: 10px;
  144. }
  145. img {
  146. size: 1px;
  147. }
  148. button {
  149. background-color: green;
  150. font-family: arial;
  151. color: rgb(153, 102, 0);
  152. font-size: 40px;
  153. width: 1400px;
  154. height: 100px;
  155. font-size: 20px;
  156. }
  157. input {
  158. font-size: 60px;
  159. text-align: center;
  160. height: 200px;
  161. width: 1400px;
  162. background-color: gray;
  163. font-family: AveriaSansLibre-Light;
  164. }
  165. </style>
  166. <script type="text/javascript" src="index.js"></script>
  167. <!-- Latest compiled and minified CSS -->
  168. <body>
  169. <input type="name" id="123" placeholder="type here your name">
  170. <h5 width="500" heigth="100" id="becool">be cool</h5>
  171. <button id="button1" onclick="random()">click here</button>
  172. <h1 id="duimpje" onclick="likes()"></h1>
  173. </body>
  174. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement