Skip to content

Commit 756de68

Browse files
authored
Update Easy-Online-Counter.html
- Add localStorage to preserve count across sessions. - Add a reset button. - Add 10 FAQ - about various practical uses for the tool.
1 parent d6f1049 commit 756de68

1 file changed

Lines changed: 70 additions & 16 deletions

File tree

Easy-Online-Counter.html

Lines changed: 70 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,16 @@
8282
background: rgba(255, 0, 64, 0.15);
8383
}
8484

85+
.btn.reset {
86+
background: rgba(255, 255, 255, 0.08);
87+
font-size: 1.2rem;
88+
height: 3rem;
89+
margin: 0.5rem auto;
90+
padding: 0 2rem;
91+
border-radius: 999px;
92+
width: fit-content;
93+
}
94+
8595
.ripple {
8696
position: absolute;
8797
border-radius: 50%;
@@ -134,16 +144,15 @@
134144
</style>
135145
</head>
136146
<body>
137-
<!-- Full-screen counter app -->
138147
<div class="app">
139148
<div class="counter-display" id="counter">0</div>
140149
<div class="controls">
141150
<button class="btn minus" id="minus">-</button>
142151
<button class="btn plus" id="plus">+</button>
143152
</div>
153+
<button class="btn reset" id="reset">Reset</button>
144154
</div>
145155

146-
<!-- Scrollable SEO content below the fold -->
147156
<footer>
148157
<h2>Easy Online Counter - Free, Instant Tally Counter</h2>
149158
<p>
@@ -155,37 +164,71 @@ <h2>Easy Online Counter - Free, Instant Tally Counter</h2>
155164

156165
<h2>Frequently Asked Questions (FAQ)</h2>
157166

158-
<h3>How do I use the Easy Online Counter?</h3>
159-
<ul>
160-
<li>Press the <strong>+</strong> button to increase the count.</li>
161-
<li>Press the <strong>-</strong> button to decrease the count.</li>
162-
<li>Use your keyboard's <strong>arrow keys</strong> or <strong>+ / -</strong> keys as shortcuts.</li>
163-
<li>Enjoy smooth animations and visual feedback for every tap.</li>
164-
</ul>
167+
<h3>1. How do I use the Easy Online Counter?</h3>
168+
<p>Simply tap the <strong>+</strong> or <strong></strong> buttons to increment or decrement the counter. You can also use keyboard keys (+, −, arrow keys) or reset with the reset button.</p>
169+
170+
<h3>2. Will the counter remember my value?</h3>
171+
<p>Yes! Your current count is saved automatically in your browser using localStorage and restored on your next visit.</p>
165172

166-
<h3>Why use this online counter?</h3>
173+
<h3>3. Can I use this counter on my phone?</h3>
174+
<p>Absolutely. The app is fully optimized for mobile devices with large touch targets and smooth animations.</p>
175+
176+
<h3>4. What are some uses for this tool?</h3>
167177
<ul>
168-
<li><strong>Mobile-friendly:</strong> Optimized for all screen sizes with a modern, app-like interface.</li>
169-
<li><strong>Fast and lightweight:</strong> Loads instantly without distractions.</li>
170-
<li><strong>Free and private:</strong> No tracking, no account needed, and no saved data.</li>
171-
<li><strong>Useful anywhere:</strong> Great for workouts, inventory counts, classroom activities, and more.</li>
178+
<li><strong>Workout tracking:</strong> Count sets, reps, or rounds in a workout.</li>
179+
<li><strong>Inventory management:</strong> Tally stock items quickly.</li>
180+
<li><strong>Event headcounts:</strong> Track people entering a venue.</li>
181+
<li><strong>Classroom participation:</strong> Teachers can count student responses.</li>
182+
<li><strong>Game scoring:</strong> Keep score for simple games or team competitions.</li>
183+
<li><strong>Habit building:</strong> Count streaks or progress in a challenge.</li>
184+
<li><strong>Prayer/chant counting:</strong> A quiet tool for meditation or repetition.</li>
185+
<li><strong>Queue management:</strong> Tally customers or clients served.</li>
186+
<li><strong>Research studies:</strong> Track behavior counts or occurrences.</li>
187+
<li><strong>Presentation timing:</strong> Count down activities or sections.</li>
172188
</ul>
173189

174-
<h3>Can I use this counter offline?</h3>
175-
<p>Currently, this tool works best with an internet connection. For offline support, consider bookmarking the page or installing it as a PWA in a future update.</p>
190+
<h3>5. Is it free to use?</h3>
191+
<p>Yes, 100% free. No ads, no account, no data collection.</p>
192+
193+
<h3>6. Can I use it offline?</h3>
194+
<p>Currently, the app requires internet for initial load. Future updates may support offline use.</p>
195+
196+
<h3>7. Does this counter work on tablets?</h3>
197+
<p>Yes! It's designed to scale beautifully on phones, tablets, and desktops.</p>
198+
199+
<h3>8. Can I reset the counter?</h3>
200+
<p>Yes. Use the Reset button to clear the count back to zero instantly.</p>
201+
202+
<h3>9. Will it count negative numbers?</h3>
203+
<p>Yes, you can decrement below zero with the minus button or arrow keys.</p>
204+
205+
<h3>10. Is my data secure?</h3>
206+
<p>Your count is stored locally in your browser and never shared or uploaded.</p>
176207
</footer>
177208

178209
<script>
179210
const counterEl = document.getElementById('counter');
180211
const plusBtn = document.getElementById('plus');
181212
const minusBtn = document.getElementById('minus');
213+
const resetBtn = document.getElementById('reset');
182214

183215
let count = 0;
184216

217+
function loadCounter() {
218+
const saved = localStorage.getItem('easyCounterValue');
219+
count = saved ? parseInt(saved, 10) : 0;
220+
counterEl.textContent = count;
221+
}
222+
223+
function saveCounter() {
224+
localStorage.setItem('easyCounterValue', count);
225+
}
226+
185227
function updateCounter(value) {
186228
count += value;
187229
counterEl.textContent = count;
188230
counterEl.classList.add('animate');
231+
saveCounter();
189232
setTimeout(() => counterEl.classList.remove('animate'), 200);
190233
}
191234

@@ -211,6 +254,14 @@ <h3>Can I use this counter offline?</h3>
211254
createRipple(e, minusBtn);
212255
});
213256

257+
resetBtn.addEventListener('click', () => {
258+
count = 0;
259+
counterEl.textContent = count;
260+
saveCounter();
261+
counterEl.classList.add('animate');
262+
setTimeout(() => counterEl.classList.remove('animate'), 200);
263+
});
264+
214265
document.addEventListener('keydown', (e) => {
215266
if (e.key === '+' || e.key === '=' || e.key === 'ArrowUp') {
216267
updateCounter(1);
@@ -227,6 +278,9 @@ <h3>Can I use this counter offline?</h3>
227278
}
228279
lastTouch = now;
229280
}, { passive: false });
281+
282+
// Initialize
283+
loadCounter();
230284
</script>
231285
</body>
232286
</html>

0 commit comments

Comments
 (0)