Pomodoro Clock
How do I make an pomodoro clock?
What is a pomodoro clock? How do you make a pomodoro clock? This script and codes were developed by Jimmy Lin on 11 December 2022, Sunday.
Pomodoro Clock - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Pomodoro Clock</title> <link rel='stylesheet prefetch' href='https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css'> <link rel="stylesheet" href="css/style.css">
</head>
<body> <link href="https://fonts.googleapis.com/css?family=Lobster" rel="stylesheet">
<div class=text-center> <h1 class=text-center id="title">Pomodoro Clock</h1> <div class="timeDiv"> <h1 id="title1">Session Time</h1> <a href="#" class="btn btn-primary" id="minus5Clock">-</a> <h2 id="timeType"></h2> <h2 id="num">5</h2> <a href="#" class="btn btn-primary" id="add5Clock">+</a> <a href="#" class="btn btn-primary" id="reset">Reset</a> </div> <div id="breakDiv"> <h1 id="title2">Break Time</h1> <a href="#" class="btn btn-primary" id="minus5Break">-</a> <h2 id="breakNum">5</h2> <a href="#" class="btn btn-primary" id="add5Break">+</a>
</div> <a href="#" class="btn btn-primary" id="start">Start</a>
</div> <script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.0/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Pomodoro Clock - Script Codes CSS Codes
#title { font-family: lobster; font-size: 45px;
}
h2 { display:inline;
}
#start{ margin:10px;
}
Pomodoro Clock - Script Codes JS Codes
$(document).ready(function(){ var buzzer = $("#buzzer")[0]; var count = parseInt($("#num").html()); var breakTime = parseInt($("#breakNum").html()); $("#reset").hide(); $("#start").click(function(){ var counter = setInterval(timer,1000); count*=60; function timer(){ //hide variables $("#start, #minus5Clock, #add5Clock, #minus5Break, #add5Break, #breakNum, #title1, #title2").hide(); $("#timeType").html("Session Time: "); count -=1; if(count===0){ clearInterval(counter); var startBreak = setInterval(breakTimer, 1000); $("#num").hide(); } if(count%60>=10){ $("#num").html(Math.floor(count/60)+":"+count%60); } else { $("#num").html(Math.floor(count/60)+":"+"0"+count%60); } function breakTimer(){ $("#timeType").html("Break Time: "); $("#breakNum").show(); breakTime*=60; $("#timeType").show(); breakTime -=1; if(breakTime ===0){ clearInterval(startBreak); $("#reset").show(); $("#breakNum").hide(); $("#timeType").hide(); } if(breakTime%60>=10){ $("#breakNum").html(Math.floor(breakTime/60)+":"+breakTime%60); } else { $("#breakNum").html(Math.floor(breakTime/60)+":"+"0"+breakTime%60); } } } }); $("#reset").click(function(){ count = 25; breakTime= 25; $("#num").html(count); $("#breakNum").html(breakTime); $("#start, #minus5Clock, #add5Clock, #minus5Break, #add5Break, #breakNum, #num, #title1, #title2").show(); $("#reset").hide(); }); $("#minus5Clock").click(function(){ if(count>5){ count -=5; $("#num").html(count); } }); $("#add5Clock").click(function(){ count += 5; $("#num").html(count); }); $("#minus5Break").click(function(){ if(breakTime>5){ breakTime -=5; $("#breakNum").html(breakTime); } }); $("#add5Break").click(function(){ breakTime += 5; $("#breakNum").html(breakTime); });
});
Developer | Jimmy Lin |
Username | odylic |
Uploaded | December 11, 2022 |
Rating | 3 |
Size | 2,384 Kb |
Views | 12,144 |
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 |
Simon Game | 3,485 Kb |
Tic Tac Toe Game | 2,701 Kb |
Mark Down Previewer | 3,062 Kb |
Twitch JSON API | 2,556 Kb |
Portfolio Trial 1 | 3,730 Kb |
Calculator | 2,544 Kb |
TwitchTV JSON API 2 | 2,691 Kb |
RPG Style Text Dialogue | 2,635 Kb |
Wikipedia Viewer | 2,333 Kb |
Portfolio Template | 2,581 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 |
Hovers with popups | Zacharyolson | 2,380 Kb |
Z-index demo | Kblh | 1,534 Kb |
Addthis_button | Esambino | 1,691 Kb |
Basic HTML Slideshow | Tomhodgins | 3,386 Kb |
RAQuote | Naderk007 | 4,412 Kb |
Shop Talk logo made in CSS | Hugo | 19,368 Kb |
Twinner Spinner II | Katydecorah | 2,974 Kb |
Kut D3 | Jellevrswk | 3,687 Kb |
JQuery FullScreen Overlay | _codemics | 2,252 Kb |
A Pen by Paul Sullivan | Pwsm50 | 2,349 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!