Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- eerst JS :
- var x = 0;
- var i = 0;
- var t = 0;
- var it = 0;
- var itv = 0;
- var itt = 0;
- var iv = 0;
- var like = -1;
- var ppassword = 0;
- function chek() {
- t = document.getElementById("becool").innerHTML.length;
- it = document.getElementById("becool").style.fontSize;
- if (t >= 28){
- if (it === "90px") {document.getElementById("becool").innerHTML = "TE LANG";}
- }
- if (t >= 29){
- if (it === "85px") {document.getElementById("becool").innerHTML = "TE LANG";}
- }
- if (t >= 30){
- if (it === "80px") {document.getElementById("becool").innerHTML = "TE LANG";}
- }
- if (t >= 31){
- if (it === "75px") {document.getElementById("becool").innerHTML = "TE LANG";}
- }
- if (t >= 32){
- if (it === "70px") {document.getElementById("becool").innerHTML = "TE LANG";}
- }
- }
- function random() {
- start()
- x = Math.floor((Math.random() * 4) + 1);
- if (x === 1) {
- document.getElementById("becool").style.fontFamily = "PixelSplitter-Bold";
- }
- if (x === 2) {
- document.getElementById("becool").style.fontFamily = "bloody";
- }
- if (x === 3) {
- document.getElementById("becool").style.fontFamily = "AveriaSansLibre-Light";
- }
- if (x === 4) {
- document.getElementById("becool").style.fontFamily = "SHLOP";
- }
- itv = Math.floor((Math.random() * 3) + 1);
- if (itv === 1) {document.body.background = "yellow.jpg"}
- if (itv === 2) {document.body.background = "green.png"}
- if (itv === 3) {document.body.background = "black.png"}
- itt = Math.floor((Math.random() * 3) + 1);
- if (itt === 1) {
- document.getElementById("becool").style.color = "blue";
- }
- if (itt === 2) {
- document.getElementById("becool").style.color = "purple";
- }
- if (itt === 3) {
- document.getElementById("becool").style.color = "orange";
- }
- iv = Math.floor((Math.random() * 5) + 1);
- if (iv === 1) {
- document.getElementById("becool").style.fontSize = "90px"
- }
- if (iv === 2) {
- document.getElementById("becool").style.fontSize = "85px"
- }
- if (iv === 3) {
- document.getElementById("becool").style.fontSize = "80px"
- }
- if (iv === 4) {
- document.getElementById("becool").style.fontSize = "75px"
- }
- if (iv === 5) {
- document.getElementById("becool").style.fontSize = "70px"
- }
- chek()
- }
- function setcookie() {
- document.getElementById("becool").style.textAlign = "center";
- user = document.getElementById("123").value
- if (user === null) {
- user = "";
- x = 2;
- }
- user = ("hallo " + user);
- }
- function setname() {
- if (x === 5) {
- document.getElementById("becool").innerHTML = " ERROR ";
- x = 0;
- }
- else {
- document.getElementById("becool").innerHTML = user;
- }
- }
- function start() {
- setcookie()
- setname()
- chek()
- }
- function likes() {
- like = like + 1;
- if (like === 0) {document.getElementById("duimpje").innerHTML = "je hebt nog geen likes";}
- if (like === 1) {document.getElementById("duimpje").innerHTML = ("dit project heeft " + like + " like!");}
- if (like >= 2) {document.getElementById("duimpje").innerHTML = ("dit project heeft " + like + " likes!");}
- }
- function reset() {
- var x = 0;
- var i = 0;
- var t = 0;
- var it = 0;
- var itv = 0;
- var itt = 0;
- var iv = 0;
- var like = -1;
- random()
- likes()
- document.getElementById("123").hidden = false;
- document.getElementById("becool").hidden = false;
- document.getElementById("button1").hidden = false;
- }
- function hidden() {
- document.getElementById("123").hidden = true;
- document.getElementById("becool").hidden = true;
- document.getElementById("button1").hidden = true;
- ppassword = prompt("password");
- if (ppassword === "codeMENEER1") {reset()} else {hidden()}
- }
- setTimeout(hidden, 1)
- nu HTML :
- <html>
- <head>
- <style>
- h5 {
- text-align: center;
- }
- h1 {
- text-align: center;
- font-size: 70px;
- font-family: AveriaSansLibre-Light;
- color: orange;
- text-blink: 10px;
- }
- img {
- size: 1px;
- }
- button {
- background-color: green;
- font-family: arial;
- color: rgb(153, 102, 0);
- font-size: 40px;
- width: 1400px;
- height: 100px;
- font-size: 20px;
- }
- input {
- font-size: 60px;
- text-align: center;
- height: 200px;
- width: 1400px;
- background-color: gray;
- font-family: AveriaSansLibre-Light;
- }
- </style>
- <script type="text/javascript" src="index.js"></script>
- <!-- Latest compiled and minified CSS -->
- <body>
- <input type="name" id="123" placeholder="type here your name">
- <h5 width="500" heigth="100" id="becool">be cool</h5>
- <button id="button1" onclick="random()">click here</button>
- <h1 id="duimpje" onclick="likes()"></h1>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement