{"id":793,"date":"2024-01-11T21:51:45","date_gmt":"2024-01-12T04:51:45","guid":{"rendered":"https:\/\/ourcarnivorejourney.com\/?page_id=793"},"modified":"2024-01-11T23:12:28","modified_gmt":"2024-01-12T06:12:28","slug":"cheryls-water-timer-3","status":"publish","type":"page","link":"https:\/\/ourcarnivorejourney.com\/index.php\/cheryls-water-timer-3\/","title":{"rendered":"Cheryl&#8217;s Water Timer #3"},"content":{"rendered":"<p><!DOCTYPE html><br \/>\n<html><br \/>\n<head><br \/>\n<title>Cheryl&#8217;s Water Timer #2<\/title><\/p>\n<style>\n        body {<br \/>\n            text-align: center; \/* Ensuring overall center alignment *\/<br \/>\n        }<br \/>\n        .cheryls-timer-container {<br \/>\n            display: block; \/* Changed for better centering *\/<br \/>\n            text-align: center;<br \/>\n            margin: auto;<br \/>\n            padding: 0.00in 0.5in 0.5in 0.5in;<br \/>\n            border: 4px solid purple; \/* Adding the purple frame *\/<br \/>\n            background-color: white;<br \/>\n        }<br \/>\n        .cheryls-timer-container h2,<br \/>\n        .cheryls-timer-container #timer,<br \/>\n        .cheryls-timer-container label,<br \/>\n        .cheryls-timer-container button,<br \/>\n        .cheryls-timer-container input {<br \/>\n            color: purple;<br \/>\n        }<br \/>\n        .cheryls-timer-container #minutesInput,<br \/>\n        .cheryls-timer-container #glassesInput {<br \/>\n            width: 60%;<br \/>\n            padding: 10px;<br \/>\n            margin: 10px auto;<br \/>\n            display: block;<br \/>\n            font-size: 16px;<br \/>\n            text-align: center;<br \/>\n            font-weight: bold;<br \/>\n            border: 1px solid purple;<br \/>\n        }<br \/>\n        .cheryls-timer-container button {<br \/>\n            display: inline-block; \/* Buttons side by side *\/<br \/>\n            padding: 10px 20px;<br \/>\n            margin: 5px;<br \/>\n            cursor: pointer;<br \/>\n            background-color: white;<br \/>\n            border: 1px solid purple;<br \/>\n        }<br \/>\n        .cheryls-timer-container input[type=range] {<br \/>\n            cursor: pointer;<br \/>\n            width: 60%;<br \/>\n            margin: 10px auto;<br \/>\n        }<br \/>\n        .digital-display {<br \/>\n            font-family: 'Digital-7', monospace;<br \/>\n            font-size: 24px;<br \/>\n            color: #00ff00;<br \/>\n            background-color: #000000;<br \/>\n            border: none;<br \/>\n            text-align: center;<br \/>\n        }<br \/>\n    <\/style>\n<p><\/head><br \/>\n<body><\/p>\n<div class=\"cheryls-timer-container\">\n<h2>Cheryl&#8217;s Water Timer #2<\/h2>\n<div id=\"timer\">10:00<\/div>\n<p><input type=\"number\" id=\"minutesInput\" placeholder=\"Minutes\" value=\"10\" onchange=\"updateInitialTimerDisplay()\"><br \/>\n<button onclick=\"startTimer()\">Start Timer<\/button><br \/>\n<button onclick=\"resetTimer()\">Reset Timer<\/button><\/p>\n<p><input type=\"text\" id=\"glassesInput\" class=\"digital-display\" value=\"0 Gallons\" readonly><br \/>\n<button onclick=\"addQuart()\">Add a Quart<\/button><br \/>\n<button onclick=\"addCup()\">Add a Cup<\/button><br \/>\n<button onclick=\"resetGlasses()\">Reset Jars<\/button><\/p>\n<p><label for=\"volumeControl\">Volume:<\/label><br \/>\n<input type=\"range\" id=\"volumeControl\" min=\"0\" max=\"100\" value=\"50\"><\/div>\n<p><script><br \/>\n        var countdown, tickInterval;<br \/>\n        var audioContext = new (window.AudioContext || window.webkitAudioContext)();<br \/>\n        var currentVolume = 0.5;<\/p>\n<p>        document.getElementById('volumeControl').addEventListener('input', function() {<br \/>\n            currentVolume = this.value \/ 100;<br \/>\n        });<\/p>\n<p>        function beep(duration, frequency, volume) {<br \/>\n            var oscillator = audioContext.createOscillator();<br \/>\n            var gainNode = audioContext.createGain();<\/p>\n<p>            oscillator.connect(gainNode);<br \/>\n            gainNode.connect(audioContext.destination);<\/p>\n<p>            gainNode.gain.value = volume * 0.01;<br \/>\n            oscillator.frequency.value = frequency;<br \/>\n            oscillator.type = \"square\";<\/p>\n<p>            oscillator.start(audioContext.currentTime);<br \/>\n            oscillator.stop(audioContext.currentTime + (duration * 0.001));<br \/>\n        }<\/p>\n<p>        function startTick() {<br \/>\n            tickInterval = setInterval(function() {<br \/>\n                beep(100, 1000, currentVolume * 50);<br \/>\n            }, 4000);<br \/>\n        }<\/p>\n<p>        function beepAndTick() {<br \/>\n            beep(500, 520, currentVolume * 100);<br \/>\n            setTimeout(function() {<br \/>\n                beep(500, 520, currentVolume * 100);<br \/>\n                startTick();<br \/>\n            }, 500);<br \/>\n        }<\/p>\n<p>        function startTimer() {<br \/>\n            var minutes = parseInt(document.getElementById('minutesInput').value);<br \/>\n            var seconds = minutes * 60;<br \/>\n            clearInterval(countdown);<br \/>\n            clearInterval(tickInterval);<\/p>\n<p>            countdown = setInterval(function() {<br \/>\n                var minutes = Math.floor(seconds \/ 60);<br \/>\n                var secondsRemaining = seconds % 60;<\/p>\n<p>                document.getElementById('timer').textContent = minutes.toString().padStart(2, '0') + \":\" + secondsRemaining.toString().padStart(2, '0');<\/p>\n<p>                if (--seconds < 0) {\n                    clearInterval(countdown);\n                    beepAndTick();\n                }\n            }, 1000);\n        }\n\n        function resetTimer() {\n            clearInterval(countdown);\n            clearInterval(tickInterval);\n            var minutes = parseInt(document.getElementById('minutesInput').value);\n            document.getElementById('timer').textContent = minutes.toString().padStart(2, '0') + \":00\";\n        }\n\n        function addQuart() {\n            totalGallons += 0.25;\n            updateGlassesDisplay();\n        }\n\n        function addCup() {\n            totalGallons += 0.0625;\n            updateGlassesDisplay();\n        }\n\n        function updateGlassesDisplay() {\n            document.getElementById('glassesInput').value = totalGallons.toFixed(2) + \" Gallons\";\n        }\n\n        function resetGlasses() {\n            totalGallons = 0;\n            updateGlassesDisplay();\n        }\n\n        function updateInitialTimerDisplay() {\n            var minutes = document.getElementById('minutesInput').value.padStart(2, '0');\n            document.getElementById('timer').textContent = minutes + \":00\";\n        }\n\n        updateInitialTimerDisplay();\n    <\/script><br \/>\n<\/body><br \/>\n<\/html><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Cheryl&#8217;s Water Timer #2 Cheryl&#8217;s Water Timer #2 10:00 Start Timer Reset Timer Add a Quart Add a Cup Reset Jars Volume:<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"site-container-style":"default","site-container-layout":"default","site-sidebar-layout":"default","site-transparent-header":"default","disable-article-header":"default","disable-site-header":"default","disable-site-footer":"default","disable-content-area-spacing":"default","footnotes":""},"class_list":["post-793","page","type-page","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/ourcarnivorejourney.com\/index.php\/wp-json\/wp\/v2\/pages\/793","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ourcarnivorejourney.com\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/ourcarnivorejourney.com\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/ourcarnivorejourney.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ourcarnivorejourney.com\/index.php\/wp-json\/wp\/v2\/comments?post=793"}],"version-history":[{"count":8,"href":"https:\/\/ourcarnivorejourney.com\/index.php\/wp-json\/wp\/v2\/pages\/793\/revisions"}],"predecessor-version":[{"id":802,"href":"https:\/\/ourcarnivorejourney.com\/index.php\/wp-json\/wp\/v2\/pages\/793\/revisions\/802"}],"wp:attachment":[{"href":"https:\/\/ourcarnivorejourney.com\/index.php\/wp-json\/wp\/v2\/media?parent=793"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}