NeeilTimer
How do I make an neeiltimer?
What is a neeiltimer? How do you make a neeiltimer? This script and codes were developed by Neeilan Selvalingam on 13 September 2022, Tuesday.
NeeilTimer - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>neeilTimer</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <link href='https://fonts.googleapis.com/css?family=Pacifico' rel='stylesheet' type='text/css'>
<p id="top"> <span style="color:white">Pomodoro Timer</span><br> <span style="font-size:0.5em;">by Neeilan</span>
</p>
<div class="timer"> <button id="counter" onclick="controller()"></button><br> <button id="minus" onclick="minus()">-</button> <button id="plus" onclick="plus()">+</button> <button id="sound" onclick="toggleSound()">🔇 </button>
</div> <script src="js/index.js"></script>
</body>
</html>
NeeilTimer - Script Codes CSS Codes
#top { text-align: center; color: rgb(255,201,14); font-family: Pacifico; font-size: 3em; line-height: 0.8em;
}
body { background: rgb(1, 15, 22);
}
h4 { font-family: Arial; font-size: 1.4em; color: lightgray; margin-top: 10px;
}
.timer { text-align: center; position: relative; width: 100%; margin-left: auto; margin-right: auto;
}
button { padding:5px; position: relative; color: white; background: #319470; margin: 10px; border-style: none; height: 50px; width: 50px; border-radius: 80%;
}
button:focus { outline: none;
}
button:disabled { background: rgb(4, 62, 89);
}
button:active { height: 49px;
}
#counter { display: inline; padding-top: 35px; height: 200px; width: 200px; border-radius: 80%; font-size: 1.8em; background: rgb(0, 147, 147); overflow: hidden;
}
h6 { margin-top: 0px; padding-top: 5px; font-size: 0.5em; color: rgb(0, 106, 106);
}
NeeilTimer - Script Codes JS Codes
var minutes = 25, active = false, sound = true, countdown, seconds;
var audio = new Audio('http://soundbible.com/grab.php?id=1787&type=mp3');
var tick = new Audio('http://soundbible.com/grab.php?id=2044&type=mp3');
document.getElementById("counter").innerHTML = minutes + "<br><h6 id='inner'>Start</h6>";
function controller() { if (active === false && minutes > 0) { turnRed(); active = true; disableButtons(); seconds = minutes * 60; countdown = setInterval(function() { startCountdown(); }, 1000); } //Active is true, minutes=0 else if (active === true) { audio.pause(); audio.load(); //reload audio clearInterval(countdown); active = false; turnBlue(); enableButtons(); minutes = 25; document.getElementById("counter").innerHTML = minutes + "<br><h6 id='inner'>Start</h6>"; }
}
function startCountdown() { if (seconds > 0) { if (sound) { tick.play(); } seconds--; var minsLeft = Math.floor(seconds / 60); var secsLeft = Math.floor(seconds - minsLeft * 60); document.getElementById("counter").innerHTML = pad(minsLeft) + ":" + pad(secsLeft) + "<br><h6 style='color:rgb(233,152,152)'>Reset</h6>"; } else { clearInterval(countdown); audio.play(); }
}
// .................
function pad(num) { if (num < 10) { return "" + 0 + num; } else { return num; }
}
function turnRed() { document.getElementById("counter").style.backgroundColor = "#de6868"; document.getElementById("inner").style.color = "rgb(233,152,152)";
}
function turnBlue() { document.getElementById("counter").style.backgroundColor = "rgb(0,147,147)";
}
function disableButtons() { document.getElementById("plus").disabled = true; document.getElementById("minus").disabled = true;
}
function enableButtons() { document.getElementById("plus").disabled = false; document.getElementById("minus").disabled = false;
}
function toggleSound() { if (sound === true) { sound = false; document.getElementById("sound").innerHTML = "🔊"; document.getElementById("sound").style.backgroundColor = "rgb(127,127,127)"; } else { sound = true; document.getElementById("sound").innerHTML = "🔇"; document.getElementById("sound").style.backgroundColor = "#319470"; }
}
function plus() { minutes++; document.getElementById("counter").innerHTML = pad(minutes) + "<br><h6 id='inner'>Start</h6>";
}
function minus() { if (minutes > 1) { minutes--; } document.getElementById("counter").innerHTML = pad(minutes) + "<br><h6 id='inner'>Start</h6>";
}
Developer | Neeilan Selvalingam |
Username | neeilan |
Uploaded | September 13, 2022 |
Rating | 3 |
Size | 2,836 Kb |
Views | 26,312 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
GameOfLife | 6,445 Kb |
Milestones | 6,285 Kb |
Simon Game | 3,313 Kb |
Fctest | 14,173 Kb |
NeeilCalc | 3,209 Kb |
MarkdownPreviewer | 3,147 Kb |
UTSCMap | 3,292 Kb |
RecipeBox | 6,082 Kb |
TTTnoAI | 2,784 Kb |
Scribe | 3,525 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
React Vote Component | Souporserious | 5,465 Kb |
A Pen by Final Boss tommyb9 | FBtommyb9 | 55,354 Kb |
Awesome | Samarthpd | 2,901 Kb |
Beautiful canvas stars | Matths | 2,399 Kb |
A Pen by Dalton Liu | Liudalton | 12,437 Kb |
Vertically rotating text with CSS | Nopr | 2,141 Kb |
Under construction | GhostRider | 1,642 Kb |
Fluid Responsive Typography | Jonmilner | 4,205 Kb |
Comment Jquery | SquishyAndroid | 2,421 Kb |
Donut Chart example - MorrisJS | Capelo | 2,385 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!