Skip to content

Commit

Permalink
deploy: d637d6b
Browse files Browse the repository at this point in the history
  • Loading branch information
lazygyu committed Feb 14, 2024
1 parent 4636dae commit 35188b1
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions index.fc339326.js → index.5d980f84.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions index.5d980f84.js.map

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion index.fc339326.js.map

This file was deleted.

2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!DOCTYPE html><html lang="en"><head><script async src="https://www.googletagmanager.com/gtag/js?id=G-5899C1DJM0"></script><script>function gtag(){dataLayer.push(arguments)}window.dataLayer=window.dataLayer||[],gtag("js",new Date),gtag("config","G-5899C1DJM0");</script><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta http-equiv="X-UA-Compatible" content="ie=edge"><link rel="apple-touch-icon" sizes="57x57" href="/roulette/apple-icon-57x57.d2489b05.png"><link rel="apple-touch-icon" sizes="60x60" href="/roulette/apple-icon-60x60.c256c4c3.png"><link rel="apple-touch-icon" sizes="72x72" href="/roulette/apple-icon-72x72.3c7457a3.png"><link rel="apple-touch-icon" sizes="76x76" href="/roulette/apple-icon-76x76.c458ac0e.png"><link rel="apple-touch-icon" sizes="114x114" href="/roulette/apple-icon-114x114.2a406841.png"><link rel="apple-touch-icon" sizes="120x120" href="/roulette/apple-icon-120x120.baa4374c.png"><link rel="apple-touch-icon" sizes="144x144" href="/roulette/apple-icon-144x144.b352f2ad.png"><link rel="apple-touch-icon" sizes="152x152" href="/roulette/apple-icon-152x152.3ed1a2e0.png"><link rel="apple-touch-icon" sizes="180x180" href="/roulette/apple-icon-180x180.1794adb6.png"><link rel="icon" type="image/png" sizes="192x192" href="/roulette/android-icon-192x192.1cb445bf.png"><link rel="icon" type="image/png" sizes="32x32" href="/roulette/favicon-32x32.ca213894.png"><link rel="icon" type="image/png" sizes="96x96" href="/roulette/favicon-96x96.0b3c763e.png"><link rel="icon" type="image/png" sizes="16x16" href="/roulette/favicon-16x16.e4bfc49f.png"><link rel="manifest" href="/roulette/assets/manifest.webmanifest"><meta name="msapplication-TileColor" content="#ffffff"><meta name="msapplication-TileImage" content="/roulette/assets/ms-icon-144x144.png"><meta name="theme-color" content="#ffffff"><title>Marble Roulette</title><style>*{box-sizing:border-box}canvas{width:100%;height:100%;position:fixed;inset:0}.settings{-webkit-backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);color:#fff;z-index:10;background:#0006;border:2px solid #90ee90;border-radius:.75em;padding:1rem;font-family:Segoe UI,Tahoma,Geneva,Verdana,sans-serif;font-size:1rem;font-weight:700;position:absolute;inset:1rem 1rem auto;box-shadow:inset 0 0 6rem 4px green}.hide{display:none!important}.settings:focus-within{box-shadow:inset 0 0 2rem 4px green}.settings textarea{width:100%;min-height:4rem;font:inherit;color:inherit;background-color:#0000;border:none;outline:none}.settings .actions{text-align:right;font-size:.8rem}.settings .actions label{margin-bottom:.5rem;display:block}.settings .text{color:#90ee90;margin-top:0;font-size:.8rem;font-weight:400}input[type=number]{width:3rem;text-align:center;font:inherit;color:inherit;background-color:#0000;border:none;outline:none}@media screen and (min-width:768px){.settings{max-width:50%;top:auto;bottom:24px}#inGame{width:-moz-fit-content;width:-moz-fit-content;width:fit-content}.settings .actions label{margin:0 .5rem;display:inline-block}}div.copyright{color:#fff;z-index:999;font-size:12px;position:fixed;bottom:0;left:50%;transform:translate(-50%)}div.copyright a{color:#fff}#btnShake{font-size:2em}div#notice{z-index:999;max-width:100%;width:40em;background:#fffc;flex-direction:column;padding:1em;display:flex;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}div#notice button{width:50%;align-self:flex-end;padding:1em}div#notice dt{font-weight:700}div#notice dd{padding-bottom:.5em;list-style:disc}</style></head><body> <script type="module" src="/roulette/index.fc339326.js"></script> <script type="text/javascript">function getNames(){return document.querySelector("#in_names").value.trim().split(/[,\r\n]/g).map((e=>e.trim())).filter((e=>!!e))}function parseName(e){const t=/(\/\d+)/,n=/(\*\d+)/,o=t.test(e),r=n.test(e);return{name:/^\s*([^\/*]+)?/.exec(e)[1],weight:o?parseInt(t.exec(e)[1].replace("/","")):1,count:r?parseInt(n.exec(e)[1].replace("*","")):1}}function getReady(){const e=getNames();window.roullete.setMarbles(e),ready=e.length>0,localStorage.setItem("mbr_names",e.join(","))}function setWinnerRank(e){document.querySelector("#in_winningRank").value=e,window.options.winningRank=e-1,window.roullete.setWinningRank(window.options.winningRank)}let ready=!1;document.addEventListener("DOMContentLoaded",(()=>{const e=localStorage.getItem("mbr_names");e&&(document.querySelector("#in_names").value=e),document.querySelector("#in_names").addEventListener("input",(()=>{getReady()})),document.querySelector("#in_names").addEventListener("blur",(()=>{const e=getNames(),t=new Set,n={};e.forEach((e=>{const o=parseName(e),r=o.weight>1?`${o.name}/${o.weight}`:o.name;t.has(r)||(t.add(r),n[r]=0),n[r]+=o.count}));const o=[];Object.keys(n).forEach((e=>{n[e]>1?o.push(`${e}*${n[e]}`):o.push(e)}));const r=document.querySelector("#in_names").value,a=o.join(",");r!==a&&(document.querySelector("#in_names").value=a,getReady())})),document.querySelector("#btnShuffle").addEventListener("click",(()=>{getReady()})),document.querySelector("#btnStop").addEventListener("click",(()=>{window.roullete.reset(),ready=!1})),document.querySelector("#btnStart").addEventListener("click",(()=>{ready&&(gtag("event","start",{event_category:"roulette",event_label:"start",value:window.roullete.getCount()}),window.roullete.start(),document.querySelector("#settings").classList.add("hide"))})),document.querySelector("#chkSkill").addEventListener("change",(e=>{window.options.useSkills=e.target.matches(":checked"),window.roullete.setWinningRank(window.options.winningRank)})),document.querySelector("#in_winningRank").addEventListener("change",(e=>{const t=parseInt(e.target.value,10);setWinnerRank(isNaN(t)?0:t)})),document.querySelector("#btnRandomWinner").addEventListener("click",(()=>{const e=window.roullete.getCount();setWinnerRank(Math.floor(Math.random()*e+1))})),document.querySelector("#btnLastWinner").addEventListener("click",(()=>{setWinnerRank(window.roullete.getCount())})),document.querySelector("#btnShake").addEventListener("click",(()=>{window.roullete.shake(),gtag("event","shake",{event_category:"roulette",event_label:"shake",value:1})})),window.roullete.addEventListener("goal",(()=>{ready=!1,document.querySelector("#settings").classList.remove("hide")})),window.roullete.addEventListener("shakeAvailableChanged",(e=>{document.querySelector("#inGame").classList.toggle("hide",!e.detail)})),document.querySelector("#btnShuffle").click();const t=20240118;parseInt(localStorage.getItem("noticeClose")||"0",10)<t&&document.querySelector("#notice").classList.remove("hide"),document.querySelector("#btnNoticeClose").addEventListener("click",(()=>{document.querySelector("#notice").classList.add("hide"),localStorage.setItem("noticeClose",String(t))}))}));</script> <div id="notice" class="hide"> <h3>Change logs</h3> <dl> <dt>2024-01-18</dt> <dd>A new map has added.</dd> <dt>2023-11-24</dt> <dd>Force move the marble randomly if it stays still over 1 second.</dd> <dt>2023-10-08</dt> <dd>Save names automatically.</dd> <dt>2023-09-23</dt> <dd>You can move the viewport by dragging your cursor on the minimap.</dd> <dt>2023-09-22</dt> <dd>Add a button that sets the last one to the winner.</dd> <dt>2023-08-02</dt> <dd>Now the names will not cover the whole screen if there are many. You can scroll the names with your mouse wheel.</dd> <dt>2023-07-29</dt> <dd>Adjusted the map to prevent a marble stays too long in a specific place.</dd> <dt>2023-07-21</dt> <dd>Show change logs when there is a new update.</dd> <dd>Improve the performance when there are too many marbles in the game.</dd> <dd>Fixed the issue that the slow motion is not smooth.</dd> <dd>Now end the game immediately if only one marble survives and the winning rank is the last.</dd> <dt>2023-05-29</dt> <dd>Now you can shake the game if the marbles are stuck for over 3 seconds.</dd> </dl> <button type="button" id="btnNoticeClose">Close</button> </div> <div id="settings" class="settings"> <p class="text"> You can set weight values for each member by putting a number after each name with a slash. (ex: Tom/2, Jane/5)<br> You can set the count of each member by putting a number after each name with a star. (ex: Tom*2, Jane*5) </p> <textarea id="in_names" placeholder="Input names separated by commas or line feed here">짱구*5, 짱아*10, 봉미선*3</textarea> <div class="actions"> <label> The winner is #<input type="number" id="in_winningRank" value="1" min="1"> </label> <button id="btnRandomWinner">Random</button> <button id="btnLastWinner">Last</button> <label> <input type="checkbox" id="chkSkill" checked> Using skills </label> <button id="btnStop">Stop</button> <button id="btnStart">Start</button> <button id="btnShuffle">Shuffle</button> </div> </div> <div id="inGame" class="hide settings"> <button id="btnShake">Shake!</button> </div> <div class="copyright">&copy; 2023.<a href="https://lazygyu.net" target="_blank">lazygyu</a></div> </body></html>
<!DOCTYPE html><html lang="en"><head><script async src="https://www.googletagmanager.com/gtag/js?id=G-5899C1DJM0"></script><script>function gtag(){dataLayer.push(arguments)}window.dataLayer=window.dataLayer||[],gtag("js",new Date),gtag("config","G-5899C1DJM0");</script><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta http-equiv="X-UA-Compatible" content="ie=edge"><link rel="apple-touch-icon" sizes="57x57" href="/roulette/apple-icon-57x57.d2489b05.png"><link rel="apple-touch-icon" sizes="60x60" href="/roulette/apple-icon-60x60.c256c4c3.png"><link rel="apple-touch-icon" sizes="72x72" href="/roulette/apple-icon-72x72.3c7457a3.png"><link rel="apple-touch-icon" sizes="76x76" href="/roulette/apple-icon-76x76.c458ac0e.png"><link rel="apple-touch-icon" sizes="114x114" href="/roulette/apple-icon-114x114.2a406841.png"><link rel="apple-touch-icon" sizes="120x120" href="/roulette/apple-icon-120x120.baa4374c.png"><link rel="apple-touch-icon" sizes="144x144" href="/roulette/apple-icon-144x144.b352f2ad.png"><link rel="apple-touch-icon" sizes="152x152" href="/roulette/apple-icon-152x152.3ed1a2e0.png"><link rel="apple-touch-icon" sizes="180x180" href="/roulette/apple-icon-180x180.1794adb6.png"><link rel="icon" type="image/png" sizes="192x192" href="/roulette/android-icon-192x192.1cb445bf.png"><link rel="icon" type="image/png" sizes="32x32" href="/roulette/favicon-32x32.ca213894.png"><link rel="icon" type="image/png" sizes="96x96" href="/roulette/favicon-96x96.0b3c763e.png"><link rel="icon" type="image/png" sizes="16x16" href="/roulette/favicon-16x16.e4bfc49f.png"><link rel="manifest" href="/roulette/assets/manifest.webmanifest"><meta name="msapplication-TileColor" content="#ffffff"><meta name="msapplication-TileImage" content="/roulette/assets/ms-icon-144x144.png"><meta name="theme-color" content="#ffffff"><title>Marble Roulette</title><style>*{box-sizing:border-box}canvas{width:100%;height:100%;position:fixed;inset:0}.settings{-webkit-backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);color:#fff;z-index:10;background:#0006;border:2px solid #90ee90;border-radius:.75em;padding:1rem;font-family:Segoe UI,Tahoma,Geneva,Verdana,sans-serif;font-size:1rem;font-weight:700;position:absolute;inset:1rem 1rem auto;box-shadow:inset 0 0 6rem 4px green}.hide{display:none!important}.settings:focus-within{box-shadow:inset 0 0 2rem 4px green}.settings textarea{width:100%;min-height:4rem;font:inherit;color:inherit;background-color:#0000;border:none;outline:none}.settings .actions{font-size:.8rem}.settings .actions .left{flex-grow:1}.settings .actions label{margin-bottom:.5rem;display:block}.settings .text{color:#90ee90;margin-top:0;font-size:.8rem;font-weight:400}input[type=number]{width:3rem;text-align:center;font:inherit;color:inherit;background-color:#0000;border:none;outline:none}@media screen and (min-width:768px){.settings{max-width:50%;top:auto;bottom:24px}#inGame{width:-moz-fit-content;width:-moz-fit-content;width:fit-content}.settings .actions label{margin:0 .5rem;display:inline-block}.settings .actions{flex-direction:row;display:flex}.settings .actions .right{text-align:right}}div.copyright{color:#fff;z-index:999;font-size:12px;position:fixed;bottom:0;left:50%;transform:translate(-50%)}div.copyright a{color:#fff}#btnShake{font-size:2em}div#notice{z-index:999;max-width:100%;width:40em;background:#fffc;flex-direction:column;padding:1em;display:flex;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}div#notice button{width:50%;align-self:flex-end;padding:1em}div#notice dt{font-weight:700}div#notice dd{padding-bottom:.5em;list-style:disc}</style></head><body> <script type="module" src="/roulette/index.5d980f84.js"></script> <script type="text/javascript">function getNames(){return document.querySelector("#in_names").value.trim().split(/[,\r\n]/g).map((e=>e.trim())).filter((e=>!!e))}function parseName(e){const t=/(\/\d+)/,n=/(\*\d+)/,o=t.test(e),a=n.test(e);return{name:/^\s*([^\/*]+)?/.exec(e)[1],weight:o?parseInt(t.exec(e)[1].replace("/","")):1,count:a?parseInt(n.exec(e)[1].replace("*","")):1}}function getReady(){const e=getNames();window.roullete.setMarbles(e),ready=e.length>0,localStorage.setItem("mbr_names",e.join(","))}function setWinnerRank(e){document.querySelector("#in_winningRank").value=e,window.options.winningRank=e-1,window.roullete.setWinningRank(window.options.winningRank)}let ready=!1;document.addEventListener("DOMContentLoaded",(()=>{const e=localStorage.getItem("mbr_names");e&&(document.querySelector("#in_names").value=e),document.querySelector("#in_names").addEventListener("input",(()=>{getReady()})),document.querySelector("#in_names").addEventListener("blur",(()=>{const e=getNames(),t=new Set,n={};e.forEach((e=>{const o=parseName(e),a=o.weight>1?`${o.name}/${o.weight}`:o.name;t.has(a)||(t.add(a),n[a]=0),n[a]+=o.count}));const o=[];Object.keys(n).forEach((e=>{n[e]>1?o.push(`${e}*${n[e]}`):o.push(e)}));const a=document.querySelector("#in_names").value,r=o.join(",");a!==r&&(document.querySelector("#in_names").value=r,getReady())})),document.querySelector("#btnShuffle").addEventListener("click",(()=>{getReady()})),document.querySelector("#btnStop").addEventListener("click",(()=>{window.roullete.reset(),ready=!1})),document.querySelector("#btnStart").addEventListener("click",(()=>{ready&&(gtag("event","start",{event_category:"roulette",event_label:"start",value:window.roullete.getCount()}),window.roullete.start(),document.querySelector("#settings").classList.add("hide"))})),document.querySelector("#chkSkill").addEventListener("change",(e=>{window.options.useSkills=e.target.matches(":checked"),window.roullete.setWinningRank(window.options.winningRank)})),document.querySelector("#in_winningRank").addEventListener("change",(e=>{const t=parseInt(e.target.value,10);setWinnerRank(isNaN(t)?0:t)})),document.querySelector("#btnRandomWinner").addEventListener("click",(()=>{const e=window.roullete.getCount();setWinnerRank(Math.floor(Math.random()*e+1))})),document.querySelector("#btnLastWinner").addEventListener("click",(()=>{setWinnerRank(window.roullete.getCount())})),document.querySelector("#btnShake").addEventListener("click",(()=>{window.roullete.shake(),gtag("event","shake",{event_category:"roulette",event_label:"shake",value:1})})),window.roullete.addEventListener("goal",(()=>{ready=!1,document.querySelector("#settings").classList.remove("hide")})),window.roullete.addEventListener("shakeAvailableChanged",(e=>{document.querySelector("#inGame").classList.toggle("hide",!e.detail)})),document.querySelector("#btnShuffle").click();const t=20240118;parseInt(localStorage.getItem("noticeClose")||"0",10)<t&&document.querySelector("#notice").classList.remove("hide"),document.querySelector("#btnNoticeClose").addEventListener("click",(()=>{document.querySelector("#notice").classList.add("hide"),localStorage.setItem("noticeClose",String(t))}));const n=window.roullete.getMaps(),o=document.querySelector("#sltMap");n.forEach((e=>{const t=document.createElement("option");t.value=e.index,t.innerHTML=e.title,o.append(t)})),o.addEventListener("change",(e=>{const t=e.target.value;window.roullete.setMap(t)}))}));</script> <div id="notice" class="hide"> <h3>Change logs</h3> <dl> <dt>2024-02-14</dt> <dd>Now the map can be changed separately</dd> <dt>2024-01-18</dt> <dd>A new map has added.</dd> <dt>2023-11-24</dt> <dd>Force move the marble randomly if it stays still over 1 second.</dd> <dt>2023-10-08</dt> <dd>Save names automatically.</dd> <dt>2023-09-23</dt> <dd>You can move the viewport by dragging your cursor on the minimap.</dd> <dt>2023-09-22</dt> <dd>Add a button that sets the last one to the winner.</dd> <dt>2023-08-02</dt> <dd>Now the names will not cover the whole screen if there are many. You can scroll the names with your mouse wheel.</dd> <dt>2023-07-29</dt> <dd>Adjusted the map to prevent a marble stays too long in a specific place.</dd> </dl> <button type="button" id="btnNoticeClose">Close</button> </div> <div id="settings" class="settings"> <p class="text"> You can set weight values for each member by putting a number after each name with a slash. (ex: Tom/2, Jane/5)<br> You can set the count of each member by putting a number after each name with a star. (ex: Tom*2, Jane*5) </p> <textarea id="in_names" placeholder="Input names separated by commas or line feed here">짱구*5, 짱아*10, 봉미선*3</textarea> <div class="actions"> <div class="left"> <label> Map <select id="sltMap"></select> </label> </div> <div class="right"> <label> The winner is #<input type="number" id="in_winningRank" value="1" min="1"> </label> <button id="btnRandomWinner">Random</button> <button id="btnLastWinner">Last</button> <label> <input type="checkbox" id="chkSkill" checked> Using skills </label> <button id="btnStop">Stop</button> <button id="btnStart">Start</button> <button id="btnShuffle">Shuffle</button> </div> </div> </div> <div id="inGame" class="hide settings"> <button id="btnShake">Shake!</button> </div> <div class="copyright">&copy; 2023.<a href="https://lazygyu.net" target="_blank">lazygyu</a></div> </body></html>

0 comments on commit 35188b1

Please sign in to comment.