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 |
Wikipedia Viewer | 2,333 Kb |
RPG Style Text Dialogue | 2,635 Kb |
Tic Tac Toe Game | 2,701 Kb |
TwitchTV JSON API 2 | 2,691 Kb |
Firefly tribute | 2,476 Kb |
Pomodoro Clock | 2,384 Kb |
Mark Down Previewer | 3,062 Kb |
Twitch JSON API | 2,556 Kb |
Random Quote Generator | 2,674 Kb |
Simon Game | 3,485 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 |
Angular Route | Arun_v606 | 1,837 Kb |
Elephants Full screen site | Orrinward | 3,981 Kb |
Use the Twitchtv JSON API | Roksanaop | 3,561 Kb |
Glitchy Text Effect | Kescoe | 2,208 Kb |
Client-side Email Validation | Collizo4sky | 1,538 Kb |
Flex layout example | Mofny | 1,663 Kb |
Typefaces with descriptions | Megandoty | 2,944 Kb |
Beautiful canvas stars | Matths | 2,399 Kb |
Vue Transition | Chenming142 | 4,561 Kb |
A Pen by aleen42 | Aleen42 | 11,473 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!