Compare commits

...

12 commits

Author SHA1 Message Date
Voxel
cae3f70508
Add files via upload 2025-04-14 10:52:01 -04:00
Voxel
101e47a1e8
Update robots.txt 2025-04-14 10:51:41 -04:00
Voxel
7c7ba32314
Create robots.txt 2025-04-14 10:45:00 -04:00
Voxel
685b6ea8c5
Update script.js 2025-04-14 10:09:45 -04:00
Voxel
e693ae810e
Add files via upload 2025-04-14 10:05:25 -04:00
Voxel
1d37ff53d3
Update script.js 2025-04-14 09:58:31 -04:00
Voxel
afeb043b42
Update index.html 2025-04-14 09:58:01 -04:00
Voxel
76cccbab15
Add files via upload 2025-04-14 09:35:58 -04:00
Voxel
da060416ad
Create index.html 2025-04-14 09:24:25 -04:00
Voxel
58ffe21b09
Create style.css 2025-04-14 09:22:58 -04:00
Voxel
082137d76c
Create script.js 2025-04-14 09:22:33 -04:00
Voxel
54a19151a4
Update index.html 2025-04-14 09:10:12 -04:00
12 changed files with 763 additions and 2 deletions

View file

@ -11,8 +11,8 @@
<h1 class="center-text">MilkNet</h1>
<div class="center-text">
<p class="center-text">Apps | More soon...</p>
<a href="/browse">Proxy</a><a href="/chat">Chat (Matrix by whatware.net)</a><a href="/irc">Chat (IRC by telepath.im)</a><a href="/gamja">Gamja (Alt IRC)</a><a href="/calculator">Calculator</a><a href="/calculator/graph">Graphing calculator</a><a href="/library">Library (WIP)</a><a href="/webamp.txt">Music player (Webamp)</a><a href="/teletext">Teletext by zxnet.co.uk</a>
<p class="center-text">Apps & webtools | More soon...</p>
<a href="/browse">Proxy</a><a href="/chat">Chat (Matrix by whatware.net)</a><a href="/irc">Chat (IRC by telepath.im)</a><a href="/gamja">Gamja (Alt IRC)</a><a href="/calculator">Calculator</a><a href="/calculator/graph">Graphing calculator</a><a href="/library">Library (WIP)</a><a href="/webamp.txt">Music player (Webamp)</a><a href="/teletext">Teletext by zxnet.co.uk</a><a href="/type">Typing test</a><a href="/timer">Timer</a>
</div>
<footer>

64
robots.txt Normal file
View file

@ -0,0 +1,64 @@
Sitemap: https://milk.servemp3.com/sitemap.xml
User-agent: SemrushBot
Disallow: /
User-agent: DataForSeoBot
Disallow: /
User-agent: AdsBot-Google
Disallow: /
User-agent: MJ12bot
Disallow: /
User-agent: BLEXBot
Disallow: /
User-agent: DotBot
Disallow: /
User-agent: YandexBot
Disallow: /
User-agent: Sogou
Disallow: /
User-agent: HTTrack
Disallow: /
User-agent: wget
Disallow: /
User-agent: Python-urllib
Disallow: /
User-agent: EmailSiphon
Disallow: /
User-agent: EmailCollector
Disallow: /
User-agent: ExtractorPro
Disallow: /
User-agent: WebEMailExtractor
Disallow: /
User-agent: EmailHarvester
Disallow: /
User-agent: EmailWolf
Disallow: /
User-agent: Zeus
Disallow: /
User-agent: CherryPicker
Disallow: /
User-agent: EmailSucker
Disallow: /
User-agent: EmailCrawler
Disallow: /

502
sitemap.xml Normal file
View file

@ -0,0 +1,502 @@
<?xml version="1.0" encoding="UTF-8"?>
<urlset
xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
<!-- created with Free Online Sitemap Generator www.xml-sitemaps.com -->
<url>
<loc>https://milk.servemp3.com/</loc>
<lastmod>2025-04-14T14:45:47+00:00</lastmod>
<priority>1.00</priority>
</url>
<url>
<loc>https://milk.servemp3.com/games/</loc>
<lastmod>2025-04-14T14:45:47+00:00</lastmod>
<priority>0.80</priority>
</url>
<url>
<loc>https://milk.servemp3.com/apps/</loc>
<lastmod>2025-04-14T14:45:47+00:00</lastmod>
<priority>0.80</priority>
</url>
<url>
<loc>https://milk.servemp3.com/links.txt</loc>
<lastmod>2025-04-14T14:45:48+00:00</lastmod>
<priority>0.80</priority>
</url>
<url>
<loc>https://milk.servemp3.com/form/</loc>
<lastmod>2025-04-14T14:45:47+00:00</lastmod>
<priority>0.80</priority>
</url>
<url>
<loc>https://milk.servemp3.com/gba/</loc>
<lastmod>2025-04-02T19:06:46+00:00</lastmod>
<priority>0.80</priority>
</url>
<url>
<loc>https://milk.servemp3.com/tools/</loc>
<lastmod>2025-04-14T14:45:48+00:00</lastmod>
<priority>0.80</priority>
</url>
<url>
<loc>https://milk.servemp3.com/assets/games/smashkarts/</loc>
<lastmod>2025-04-14T14:45:47+00:00</lastmod>
<priority>0.64</priority>
</url>
<url>
<loc>https://milk.servemp3.com/assets/games/stickmanhook/</loc>
<lastmod>2025-04-14T14:45:48+00:00</lastmod>
<priority>0.64</priority>
</url>
<url>
<loc>https://milk.servemp3.com/assets/games/slope/</loc>
<lastmod>2025-04-14T14:45:47+00:00</lastmod>
<priority>0.64</priority>
</url>
<url>
<loc>https://milk.servemp3.com/assets/games/slope2/</loc>
<lastmod>2025-04-14T14:45:47+00:00</lastmod>
<priority>0.64</priority>
</url>
<url>
<loc>https://milk.servemp3.com/assets/games/adofai/</loc>
<lastmod>2025-04-14T14:45:48+00:00</lastmod>
<priority>0.64</priority>
</url>
<url>
<loc>https://milk.servemp3.com/assets/games/retrobowl/</loc>
<lastmod>2025-04-14T14:45:47+00:00</lastmod>
<priority>0.64</priority>
</url>
<url>
<loc>https://milk.servemp3.com/assets/games/totm/</loc>
<lastmod>2025-04-14T14:45:47+00:00</lastmod>
<priority>0.64</priority>
</url>
<url>
<loc>https://milk.servemp3.com/assets/games/whg/</loc>
<lastmod>2025-04-14T14:45:47+00:00</lastmod>
<priority>0.64</priority>
</url>
<url>
<loc>https://milk.servemp3.com/assets/games/whg2/</loc>
<lastmod>2025-04-14T14:45:47+00:00</lastmod>
<priority>0.64</priority>
</url>
<url>
<loc>https://milk.servemp3.com/assets/games/ovo/</loc>
<lastmod>2025-04-14T14:45:48+00:00</lastmod>
<priority>0.64</priority>
</url>
<url>
<loc>https://milk.servemp3.com/assets/games/2048/</loc>
<lastmod>2025-04-14T14:45:47+00:00</lastmod>
<priority>0.64</priority>
</url>
<url>
<loc>https://milk.servemp3.com/assets/games/tunnelrush/</loc>
<lastmod>2025-04-14T14:45:47+00:00</lastmod>
<priority>0.64</priority>
</url>
<url>
<loc>https://milk.servemp3.com/assets/games/basketrandom/</loc>
<lastmod>2025-04-14T14:45:47+00:00</lastmod>
<priority>0.64</priority>
</url>
<url>
<loc>https://milk.servemp3.com/assets/games/clusterrush/</loc>
<lastmod>2025-04-14T14:45:48+00:00</lastmod>
<priority>0.64</priority>
</url>
<url>
<loc>https://milk.servemp3.com/assets/games/bitlife/</loc>
<lastmod>2025-04-14T14:45:47+00:00</lastmod>
<priority>0.64</priority>
</url>
<url>
<loc>https://milk.servemp3.com/assets/games/cookieclicker/</loc>
<lastmod>2025-04-14T14:45:47+00:00</lastmod>
<priority>0.64</priority>
</url>
<url>
<loc>https://milk.servemp3.com/assets/games/dr3d/</loc>
<lastmod>2025-04-14T14:45:47+00:00</lastmod>
<priority>0.64</priority>
</url>
<url>
<loc>https://milk.servemp3.com/assets/games/flappybird/</loc>
<lastmod>2025-04-14T14:45:47+00:00</lastmod>
<priority>0.64</priority>
</url>
<url>
<loc>https://milk.servemp3.com/resent/javascript/</loc>
<lastmod>2025-04-11T12:26:36+00:00</lastmod>
<priority>0.64</priority>
</url>
<url>
<loc>https://milk.servemp3.com/precision/eagler-files/1.5.2/precisionbeta2/</loc>
<lastmod>2025-04-11T12:30:01+00:00</lastmod>
<priority>0.64</priority>
</url>
<url>
<loc>https://milk.servemp3.com/assets/games/fruitninja/</loc>
<lastmod>2025-04-14T14:45:47+00:00</lastmod>
<priority>0.64</priority>
</url>
<url>
<loc>https://milk.servemp3.com/assets/games/drivemad/</loc>
<lastmod>2025-04-14T14:45:47+00:00</lastmod>
<priority>0.64</priority>
</url>
<url>
<loc>https://milk.servemp3.com/assets/games/jetpackjoyride/</loc>
<lastmod>2025-04-14T14:45:48+00:00</lastmod>
<priority>0.64</priority>
</url>
<url>
<loc>https://milk.servemp3.com/assets/games/subwaysurfers/</loc>
<lastmod>2025-04-14T14:45:48+00:00</lastmod>
<priority>0.64</priority>
</url>
<url>
<loc>https://milk.servemp3.com/assets/games/prison/</loc>
<lastmod>2025-04-14T14:45:48+00:00</lastmod>
<priority>0.64</priority>
</url>
<url>
<loc>https://milk.servemp3.com/assets/games/bank/</loc>
<lastmod>2025-04-14T14:45:47+00:00</lastmod>
<priority>0.64</priority>
</url>
<url>
<loc>https://milk.servemp3.com/assets/games/airship/</loc>
<lastmod>2025-04-14T14:45:48+00:00</lastmod>
<priority>0.64</priority>
</url>
<url>
<loc>https://milk.servemp3.com/assets/games/complex/</loc>
<lastmod>2025-04-14T14:45:48+00:00</lastmod>
<priority>0.64</priority>
</url>
<url>
<loc>https://milk.servemp3.com/assets/games/diamond/</loc>
<lastmod>2025-04-14T14:45:47+00:00</lastmod>
<priority>0.64</priority>
</url>
<url>
<loc>https://milk.servemp3.com/assets/games/paperio2/</loc>
<lastmod>2025-04-14T14:45:47+00:00</lastmod>
<priority>0.64</priority>
</url>
<url>
<loc>https://milk.servemp3.com/assets/games/fnf/</loc>
<lastmod>2025-04-14T14:45:47+00:00</lastmod>
<priority>0.64</priority>
</url>
<url>
<loc>https://milk.servemp3.com/assets/games/baldisbasics/</loc>
<lastmod>2025-04-14T14:45:47+00:00</lastmod>
<priority>0.64</priority>
</url>
<url>
<loc>https://milk.servemp3.com/assets/games/monkeymart/</loc>
<lastmod>2025-04-14T14:45:48+00:00</lastmod>
<priority>0.64</priority>
</url>
<url>
<loc>https://milk.servemp3.com/assets/games/fnaf/</loc>
<lastmod>2025-04-14T14:45:48+00:00</lastmod>
<priority>0.64</priority>
</url>
<url>
<loc>https://milk.servemp3.com/assets/games/fnaf/2/</loc>
<lastmod>2025-04-14T14:45:48+00:00</lastmod>
<priority>0.64</priority>
</url>
<url>
<loc>https://milk.servemp3.com/assets/games/fnaf/3/</loc>
<lastmod>2025-04-14T14:45:48+00:00</lastmod>
<priority>0.64</priority>
</url>
<url>
<loc>https://milk.servemp3.com/assets/games/fnaf/4/</loc>
<lastmod>2025-04-14T14:45:47+00:00</lastmod>
<priority>0.64</priority>
</url>
<url>
<loc>https://milk.servemp3.com/assets/games/motox3m/</loc>
<lastmod>2025-04-14T14:45:47+00:00</lastmod>
<priority>0.64</priority>
</url>
<url>
<loc>https://milk.servemp3.com/assets/games/motox3m/2/</loc>
<lastmod>2025-04-14T14:45:47+00:00</lastmod>
<priority>0.64</priority>
</url>
<url>
<loc>https://milk.servemp3.com/assets/games/motox3m/3/</loc>
<lastmod>2025-04-14T14:45:47+00:00</lastmod>
<priority>0.64</priority>
</url>
<url>
<loc>https://milk.servemp3.com/assets/games/motox3m/4/</loc>
<lastmod>2025-04-14T14:45:48+00:00</lastmod>
<priority>0.64</priority>
</url>
<url>
<loc>https://milk.servemp3.com/assets/games/motox3m/5/</loc>
<lastmod>2025-04-14T14:45:47+00:00</lastmod>
<priority>0.64</priority>
</url>
<url>
<loc>https://milk.servemp3.com/assets/games/papas/</loc>
<lastmod>2025-04-14T14:45:47+00:00</lastmod>
<priority>0.64</priority>
</url>
<url>
<loc>https://milk.servemp3.com/assets/games/papas/burgeria/</loc>
<lastmod>2025-04-14T14:45:47+00:00</lastmod>
<priority>0.64</priority>
</url>
<url>
<loc>https://milk.servemp3.com/assets/games/papas/pancakeria/</loc>
<lastmod>2025-04-14T14:45:47+00:00</lastmod>
<priority>0.64</priority>
</url>
<url>
<loc>https://milk.servemp3.com/assets/games/papas/freezeria/</loc>
<lastmod>2025-04-14T14:45:47+00:00</lastmod>
<priority>0.64</priority>
</url>
<url>
<loc>https://milk.servemp3.com/assets/games/papas/pastaria/</loc>
<lastmod>2025-04-14T14:45:47+00:00</lastmod>
<priority>0.64</priority>
</url>
<url>
<loc>https://milk.servemp3.com/assets/games/5b/</loc>
<lastmod>2025-04-14T14:45:47+00:00</lastmod>
<priority>0.64</priority>
</url>
<url>
<loc>https://milk.servemp3.com/browse/</loc>
<lastmod>2025-03-27T17:54:52+00:00</lastmod>
<priority>0.64</priority>
</url>
<url>
<loc>https://milk.servemp3.com/chat/</loc>
<lastmod>2025-03-28T20:33:50+00:00</lastmod>
<priority>0.64</priority>
</url>
<url>
<loc>https://milk.servemp3.com/irc/</loc>
<lastmod>2025-03-30T01:28:25+00:00</lastmod>
<priority>0.64</priority>
</url>
<url>
<loc>https://milk.servemp3.com/gamja/</loc>
<lastmod>2025-03-30T01:28:46+00:00</lastmod>
<priority>0.64</priority>
</url>
<url>
<loc>https://milk.servemp3.com/calculator/</loc>
<lastmod>2025-04-14T14:45:48+00:00</lastmod>
<priority>0.64</priority>
</url>
<url>
<loc>https://milk.servemp3.com/calculator/graph/</loc>
<lastmod>2025-04-14T14:45:48+00:00</lastmod>
<priority>0.64</priority>
</url>
<url>
<loc>https://milk.servemp3.com/library/</loc>
<lastmod>2025-04-14T14:45:47+00:00</lastmod>
<priority>0.64</priority>
</url>
<url>
<loc>https://milk.servemp3.com/webamp.txt</loc>
<lastmod>2025-04-14T14:45:48+00:00</lastmod>
<priority>0.64</priority>
</url>
<url>
<loc>https://milk.servemp3.com/teletext/</loc>
<lastmod>2025-04-14T14:45:47+00:00</lastmod>
<priority>0.64</priority>
</url>
<url>
<loc>https://milk.servemp3.com/type/</loc>
<lastmod>2025-04-14T14:45:48+00:00</lastmod>
<priority>0.64</priority>
</url>
<url>
<loc>https://milk.servemp3.com/timer/</loc>
<lastmod>2025-04-14T14:45:47+00:00</lastmod>
<priority>0.64</priority>
</url>
<url>
<loc>https://milk.servemp3.com/gba/launcher.html</loc>
<lastmod>2025-04-02T19:06:46+00:00</lastmod>
<priority>0.64</priority>
</url>
<url>
<loc>https://milk.servemp3.com/smash-karts/</loc>
<lastmod>2025-03-13T17:33:47+00:00</lastmod>
<priority>0.51</priority>
</url>
<url>
<loc>https://milk.servemp3.com/stickman/</loc>
<lastmod>2025-03-13T17:45:05+00:00</lastmod>
<priority>0.51</priority>
</url>
<url>
<loc>https://milk.servemp3.com/slope/</loc>
<lastmod>2025-03-29T16:22:16+00:00</lastmod>
<priority>0.51</priority>
</url>
<url>
<loc>https://milk.servemp3.com/reider/storage/gxmes/slope-2/index.html</loc>
<lastmod>2025-03-27T13:50:04+00:00</lastmod>
<priority>0.51</priority>
</url>
<url>
<loc>https://milk.servemp3.com/tylerpalko/adanceoffireandice/</loc>
<lastmod>2025-03-13T19:35:39+00:00</lastmod>
<priority>0.51</priority>
</url>
<url>
<loc>https://milk.servemp3.com/tylerpalko/retrobowl/</loc>
<lastmod>2025-03-13T19:35:39+00:00</lastmod>
<priority>0.51</priority>
</url>
<url>
<loc>https://milk.servemp3.com/tylerpalko/worldshardestgame2/</loc>
<lastmod>2025-03-13T19:35:39+00:00</lastmod>
<priority>0.51</priority>
</url>
<url>
<loc>https://milk.servemp3.com/tylerpalko/ovo/</loc>
<lastmod>2025-03-13T19:35:38+00:00</lastmod>
<priority>0.51</priority>
</url>
<url>
<loc>https://milk.servemp3.com/tylerpalko/2048/</loc>
<lastmod>2025-03-13T19:35:38+00:00</lastmod>
<priority>0.51</priority>
</url>
<url>
<loc>https://milk.servemp3.com/tunnel-rush/</loc>
<lastmod>2025-03-17T13:08:55+00:00</lastmod>
<priority>0.51</priority>
</url>
<url>
<loc>https://milk.servemp3.com/cookie-clicker/</loc>
<lastmod>2025-03-13T20:09:42+00:00</lastmod>
<priority>0.51</priority>
</url>
<url>
<loc>https://milk.servemp3.com/tylerpalko/bitlife/</loc>
<lastmod>2025-03-13T19:35:38+00:00</lastmod>
<priority>0.51</priority>
</url>
<url>
<loc>https://milk.servemp3.com/tylerpalko/flappybird/</loc>
<lastmod>2025-03-13T19:35:38+00:00</lastmod>
<priority>0.51</priority>
</url>
<url>
<loc>https://milk.servemp3.com/reider/storage/gxmes/fruitninja/index.html</loc>
<lastmod>2025-03-27T13:50:04+00:00</lastmod>
<priority>0.51</priority>
</url>
<url>
<loc>https://milk.servemp3.com/reider/storage/gxmes/drive-mad/index.html</loc>
<lastmod>2025-03-27T13:50:04+00:00</lastmod>
<priority>0.51</priority>
</url>
<url>
<loc>https://milk.servemp3.com/reider/storage/gxmes/jetpackjoyride/index.html</loc>
<lastmod>2025-03-27T13:50:05+00:00</lastmod>
<priority>0.51</priority>
</url>
<url>
<loc>https://milk.servemp3.com/reider/storage/gxmes/subway-surfers-normal/index.html</loc>
<lastmod>2025-03-27T13:50:03+00:00</lastmod>
<priority>0.51</priority>
</url>
<url>
<loc>https://milk.servemp3.com/reider/storage/gxmes/paperio2/index.html</loc>
<lastmod>2025-03-27T13:50:07+00:00</lastmod>
<priority>0.51</priority>
</url>
<url>
<loc>https://milk.servemp3.com/reider/storage/gxmes/fridaynightfunkin/index.html</loc>
<lastmod>2025-03-27T13:50:05+00:00</lastmod>
<priority>0.51</priority>
</url>
<url>
<loc>https://milk.servemp3.com/reider/storage/gxmes/baldis-basics/index.html</loc>
<lastmod>2025-03-27T13:50:03+00:00</lastmod>
<priority>0.51</priority>
</url>
<url>
<loc>https://milk.servemp3.com/reider/storage/gxmes/monkey-mart/index.html</loc>
<lastmod>2025-03-27T13:50:07+00:00</lastmod>
<priority>0.51</priority>
</url>
<url>
<loc>https://milk.servemp3.com/reider/storage/gxmes/fnaf/fnaf1/index.html</loc>
<lastmod>2025-03-27T13:50:05+00:00</lastmod>
<priority>0.51</priority>
</url>
<url>
<loc>https://milk.servemp3.com/reider/storage/gxmes/fnaf/fnaf2/index.html</loc>
<lastmod>2025-03-27T13:50:04+00:00</lastmod>
<priority>0.51</priority>
</url>
<url>
<loc>https://milk.servemp3.com/reider/storage/gxmes/fnaf/fnaf3/index.html</loc>
<lastmod>2025-03-27T13:50:04+00:00</lastmod>
<priority>0.51</priority>
</url>
<url>
<loc>https://milk.servemp3.com/reider/storage/gxmes/fnaf/fnaf4/index.html</loc>
<lastmod>2025-03-27T13:50:04+00:00</lastmod>
<priority>0.51</priority>
</url>
<url>
<loc>https://milk.servemp3.com/reider/storage/gxmes/motox3m/index.html</loc>
<lastmod>2025-03-27T13:50:07+00:00</lastmod>
<priority>0.51</priority>
</url>
<url>
<loc>https://milk.servemp3.com/reider/storage/gxmes/motox3m2/index.html</loc>
<lastmod>2025-03-27T13:50:06+00:00</lastmod>
<priority>0.51</priority>
</url>
<url>
<loc>https://milk.servemp3.com/reider/storage/gxmes/motox3m-pool/index.html</loc>
<lastmod>2025-03-27T13:50:03+00:00</lastmod>
<priority>0.51</priority>
</url>
<url>
<loc>https://milk.servemp3.com/reider/storage/gxmes/motox3m-winter/index.html</loc>
<lastmod>2025-03-27T13:50:05+00:00</lastmod>
<priority>0.51</priority>
</url>
<url>
<loc>https://milk.servemp3.com/reider/storage/gxmes/motox3m-spooky/index.html</loc>
<lastmod>2025-03-27T13:50:05+00:00</lastmod>
<priority>0.51</priority>
</url>
<url>
<loc>https://milk.servemp3.com/5b/</loc>
<lastmod>2025-04-02T13:50:22+00:00</lastmod>
<priority>0.51</priority>
</url>
</urlset>

BIN
timer/alarm.wav Normal file

Binary file not shown.

BIN
timer/alarm2.wav Normal file

Binary file not shown.

BIN
timer/alarm3.wav Normal file

Binary file not shown.

BIN
timer/alarm4.wav Normal file

Binary file not shown.

BIN
timer/alarm5.wav Normal file

Binary file not shown.

BIN
timer/alarm6.wav Normal file

Binary file not shown.

30
timer/index.html Normal file
View file

@ -0,0 +1,30 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>MilkNet | Timer</title>
<link id="favicon" rel="icon" href="/assets/img/milk.png" type="image/x-icon">
<link rel="stylesheet" href="style.css">
</head>
<body>
<h1>⏰ Timer</h1>
<input id="timeInput" type="text" placeholder="mm:ss (e.g. 69:42)" />
<br>
<input id="messageInput" type="text" placeholder="Your timer message" />
<br>
<button onclick="setAlarm()">Start</button>
<p id="status"></p>
<audio id="alarmSound" src="alarm.wav" preload="auto"></audio>
<div id="customSoundContainer">
<label for="soundFileInput">🎵 Upload Custom Sound</label>
<input type="file" id="soundFileInput" accept=".mp3,.flac,.ogg,.m4a,.wav" />
<small>Supports: MP3, FLAC, OGG, M4A, WAV</small>
</div>
<script src="script.js"></script>
</body>
</html>

102
timer/script.js Normal file
View file

@ -0,0 +1,102 @@
let countdownInterval;
function formatTime(ms) {
const totalSeconds = Math.ceil(ms / 1000);
const m = Math.floor(totalSeconds / 60).toString().padStart(2, '0');
const s = (totalSeconds % 60).toString().padStart(2, '0');
return `${m}:${s}`;
}
function getRandomAlarmSound() {
const sounds = [
'alarm.wav',
'alarm2.wav',
'alarm3.wav',
'alarm4.wav',
'alarm5.wav',
'alarm6.wav'
];
const randomIndex = Math.floor(Math.random() * sounds.length);
return sounds[randomIndex];
}
function setAlarm() {
const timeStr = document.getElementById('timeInput').value;
const message = document.getElementById('messageInput').value;
const status = document.getElementById('status');
const alarmSound = document.getElementById('alarmSound');
const parts = timeStr.split(':');
if (parts.length !== 2 || isNaN(parts[0]) || isNaN(parts[1])) {
alert("Please enter time in MM:SS format.");
return;
}
const minutes = parseInt(parts[0], 10);
const seconds = parseInt(parts[1], 10);
const totalMs = (minutes * 60 + seconds) * 1000;
if (totalMs <= 0) {
alert("Please enter a time greater than 0.");
return;
}
clearInterval(countdownInterval);
const endTime = Date.now() + totalMs;
const soundFileInput = document.getElementById('soundFileInput');
if (soundFileInput.files.length === 0) {
alarmSound.src = getRandomAlarmSound();
}
if (Notification.permission !== "granted") {
Notification.requestPermission();
}
countdownInterval = setInterval(() => {
const remaining = endTime - Date.now();
if (remaining <= 0) {
clearInterval(countdownInterval);
document.title = "⏰ Time to do whatever you need to do";
status.textContent = "⏰ Time to do whatever you need to do";
return;
}
const formatted = formatTime(remaining);
document.title = `${formatted}`;
status.textContent = `Time remaining: ${formatted}`;
}, 1000);
setTimeout(() => {
const remaining = endTime - Date.now();
const formatted = formatTime(remaining);
document.title = `${formatted}`;
status.textContent = `Time remaining: ${formatted}`;
}, 0);
setTimeout(() => {
clearInterval(countdownInterval);
alarmSound.play();
if (Notification.permission === "granted") {
new Notification("⏰ Time to do whatever you need to do", { body: message });
} else {
alert("Timer: " + message);
}
status.textContent = "⏰ Time to do whatever you need to do";
document.title = "my work here is done (unless you create another timer)";
}, totalMs);
}
const soundFileInput = document.getElementById('soundFileInput');
soundFileInput.addEventListener('change', function () {
const file = this.files[0];
if (file) {
const audioURL = URL.createObjectURL(file);
const alarmSound = document.getElementById('alarmSound');
alarmSound.src = audioURL;
alarmSound.load();
document.getElementById('status').textContent = `✅ This will play once time is up: ${file.name}`;
}
});

63
timer/style.css Normal file
View file

@ -0,0 +1,63 @@
body {
font-family: Arial, sans-serif;
text-align: center;
padding: 50px;
background-color: #000;
color: #fff;
}
input, button {
padding: 10px;
margin: 10px;
font-size: 1rem;
border-radius: 5px;
border: none;
}
input[type="text"] {
background-color: #222;
color: #fff;
}
button {
background-color: #444;
color: #fff;
cursor: pointer;
transition: background-color 0.3s;
}
button:hover {
background-color: #666;
}
#status {
margin-top: 20px;
font-weight: bold;
}
#customSoundContainer {
margin-top: 30px;
}
#soundFileInput {
display: none;
}
label {
cursor: pointer;
display: inline-block;
padding: 10px 20px;
background-color: #444;
color: #fff;
border-radius: 5px;
}
label:hover {
background-color: #666;
}
small {
display: block;
margin-top: 5px;
color: #aaa;
}