Skip to content
Snippets Groups Projects
Unverified Commit 7cb34cd0 authored by Conrad Zelck's avatar Conrad Zelck
Browse files

feat: introduce minified js and css


Signed-off-by: default avatarConrad Zelck <git@simpel.cc>
parent ea98b3ea
No related branches found
No related tags found
No related merge requests found
......@@ -4,8 +4,8 @@
<?php include dirname($_SERVER['DOCUMENT_ROOT']) . "/simpel.cc/php/head.php"; ?>
<!-- <meta charset="utf-8"> -->
<!-- <title>FreqBuddy</title> -->
<script src="script.js" defer></script>
<link rel="stylesheet" href="style.css" defer>
<script src="script.min.js" defer></script>
<link rel="stylesheet" href="style.min.css" defer>
</head>
<body>
<header>
......
var direction,f1,f2,f3,f4,f5,f6,f7,f8,offset0=.1,offset1=.4,offset2=.7,offset3=1.425,offset4=.525,offset5=1.2,offset6=2.25,offset7=1.3;function calculateFreqs(){resetTable();var e=document.getElementById("channel").value;if(""!=e)setCookie("channel",e,7);else{var t=getCookie("channel");if(null==t||""==t)return;e=t,document.getElementById("channel").value=e}var f=document.getElementById("up").checked,o=document.getElementById("down").checked;if(1!=f&&1!=o){var n=getCookie("direction");null!=n&&""!=n?"up"==(direction=n)?document.getElementById("up").checked=!0:"down"==direction&&(document.getElementById("down").checked=!0):(direction="up",document.getElementById("up").checked=!0,setCookie("direction",direction,7))}else 1==f?setCookie("direction",direction="up",7):1==o&&setCookie("direction",direction="down",7);var s=8*e+302;if(54==e?s=736:65==e&&(s=824),"up"==direction?(f1=s+offset0,f2=s+offset0+offset1,f3=s+offset0+offset1+offset2,f4=s+offset0+offset1+offset2+offset3,f5=s+offset0+offset1+offset2+offset3+offset4,f6=s+offset0+offset1+offset2+offset3+offset4+offset5,f7=s+offset0+offset1+offset2+offset3+offset4+offset5+offset6,f8=s+offset0+offset1+offset2+offset3+offset4+offset5+offset6+offset7):(f1=s+offset0,f2=s+offset0+offset7,f3=s+offset0+offset7+offset6,f4=s+offset0+offset7+offset6+offset5,f5=s+offset0+offset7+offset6+offset5+offset4,f6=s+offset0+offset7+offset6+offset5+offset4+offset3,f7=s+offset0+offset7+offset6+offset5+offset4+offset3+offset2,f8=s+offset0+offset7+offset6+offset5+offset4+offset3+offset2+offset1),49==e||54==e||56==e)switch(e){case"49":hideFrequenciesAbove("698");break;case"54":hideFrequenciesAbove("742");break;case"56":hideFrequenciesAbove("753");break}f1=f1.toFixed(3),f2=f2.toFixed(3),f3=f3.toFixed(3),f4=f4.toFixed(3),f5=f5.toFixed(3),f6=f6.toFixed(3),f7=f7.toFixed(3),f8=f8.toFixed(3),document.getElementById("f1").innerText=f1+" MHz",document.getElementById("f2").innerText=f2+" MHz",document.getElementById("f3").innerText=f3+" MHz",document.getElementById("f4").innerText=f4+" MHz",document.getElementById("f5").innerText=f5+" MHz",document.getElementById("f6").innerText=f6+" MHz",document.getElementById("f7").innerText=f7+" MHz",document.getElementById("f8").innerText=f8+" MHz",65==e&&(document.getElementById("n1").innerHTML="<small><sup><a href='#footnote1'>1</a></sup></small>",document.getElementById("n2").innerHTML="<small><sup><a href='#footnote1'>1</a></sup></small>","up"==direction&&(document.getElementById("n3").innerHTML="<small><sup><a href='#footnote1'>1</a></sup></small>"))}function hideFrequenciesAbove(e){for(var t=1;t<9;t++)window["f"+t]>e&&(document.getElementById("rf"+t).style.display="none")}function resetTable(){document.getElementById("rf1").style.display="table-row",document.getElementById("rf2").style.display="table-row",document.getElementById("rf3").style.display="table-row",document.getElementById("rf4").style.display="table-row",document.getElementById("rf5").style.display="table-row",document.getElementById("rf6").style.display="table-row",document.getElementById("rf7").style.display="table-row",document.getElementById("rf8").style.display="table-row",document.getElementById("n1").innerHTML="",document.getElementById("n2").innerHTML="",document.getElementById("n3").innerHTML="",document.getElementById("n4").innerHTML="",document.getElementById("n5").innerHTML="",document.getElementById("n6").innerHTML="",document.getElementById("n7").innerHTML="",document.getElementById("n8").innerHTML=""}function enableCellPopup(){for(var e=document.querySelectorAll("#f1, #f2, #f3, #f4, #f5, #f6, #f7, #f8"),t=0;t<e.length;t++)e[t].addEventListener("click",(function(){var e=this.innerText;""!=(e=e.replace(" MHz",""))&&pushDialog(e)}))}function pushDialog(e){document.getElementById("dialogText").innerText=e,dialog.showModal()}function copyTable(){var e=document.getElementById("table"),t=document.createRange();t.selectNode(e),window.getSelection().addRange(t),document.execCommand("copy"),window.getSelection().removeAllRanges()}function setCookie(e,t,f){var o=new Date;o.setTime(o.getTime()+24*f*60*60*1e3);var n="expires="+o.toGMTString();document.cookie=e+"="+t+";"+n+";path=/"}function getCookie(e){for(var t=e+"=",f=decodeURIComponent(document.cookie).split(";"),o=0;o<f.length;o++){for(var n=f[o];" "==n.charAt(0);)n=n.substring(1);if(0==n.indexOf(t))return n.substring(t.length,n.length)}return""}document.addEventListener("DOMContentLoaded",(function(){enableCellPopup(),calculateFreqs()}));
\ No newline at end of file
:root{--default-top-padding:1.5em;--default-body-bottom-margin:2vmin;--default-min-font-size-px:12px;--default-min-font-size:12;--default-max-font-size-px:18px;--default-max-font-size:18;}html{font-size:calc(var(--default-min-font-size-px) + (var(--default-max-font-size) - var(--default-min-font-size)) * ((100vw - 360px) / 1560));font-size:clamp(var(--default-min-font-size-px),calc(var(--default-min-font-size-px) + (var(--default-max-font-size) - var(--default-min-font-size)) * ((100vw - 360px) / 1560)),var(--default-max-font-size-px));}body{height:calc(100vh - 3vmin);font-size:inherit;font-family:helvetica,Arial,sans-serif;background-color:#555;color:white;margin:3vmin 4vmin calc(var(--default-body-bottom-margin) - var(--default-body-bottom-margin)) 4vmin;}*:focus{outline:2px solid white;outline-offset:2px;}a{color:#ffffff;}header a{text-decoration:none;}a:not([href]){color:#AAAAAA;}header{margin-bottom:1.0;}nav{display:flex;align-items:baseline;column-gap:.7em;}nav a{margin-top:auto;margin-bottom:auto;}h1{font-size:1.5em;margin:0;}#github{margin-left:auto;}#github-cat{height:1.5em;}*,*::before,*::after{box-sizing:unset;}body,h1,h2,h3,h4,p,figure,blockquote,dl,dd{margin-block-end:0;}ul[role='list'],ol[role='list']{list-style:none;}html:focus-within{scroll-behavior:smooth;}body{text-rendering:optimizeSpeed;line-height:1.5;}a:not([class]){text-decoration-skip-ink:auto;}img,picture{max-width:100%;font-style:italic;}input,button,textarea,select{font:inherit;}@media (prefers-reduced-motion:reduce){html:focus-within{scroll-behavior:auto}*,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}body{font-size:2em;}#dialogText{font-size:23vw;line-height:.8em;}#dialog-wrapper{background:rgba(85,85,85,.97);}#dialogText{color:#fff;background-color:#555;}select{color:#000;}button,input{color:white;background-color:#333;}input[type=radio]{accent-color:#333;}th{background-color:#444444;}tr:nth-child(even){background-color:#505050;}#dialogText{border:1px solid white;border-radius:10px;}button,input,select{border:2px solid white;}button,input{-webkit-border-radius:5px;border-radius:5px;}select#channel{border-radius:5px;}body{hyphens:auto;}button,input,select,details summary{cursor:pointer;}#dialog-wrapper{cursor:pointer;}#dialogText{cursor:pointer;}#copyIcon{text-decoration:none;}td:nth-child(even){cursor:pointer;}main .first-in-main{padding-top:calc(var(--default-top-padding) - .8em);}.horizontal{margin-top:10px;}.horizontal label{margin-right:10px;}#dialogText{padding:.25em;}th,td{padding:0;padding-left:10px;padding-right:10px;}#copyIcon{margin-left:10px;}.space{margin:.6em;}p.label{margin-right:15px;}p{margin-block-start:0;}ul{margin-block-start:0;}p#source{margin-top:2em;margin-left:auto;}body{display:flex;flex-direction:column}main{display:flex;flex-direction:column;height:100%}#logo img{width:2em;height:auto;}#dialog-wrapper{position:fixed;top:0;left:0;width:100%;height:100%;display:flex;align-items:center;justify-content:center;}.horizontal{display:inline-flex;}th{text-align:left;}table,tr,td{overflow:hidden;}th:nth-child(1),td:nth-child(1){width:2ch;}th:nth-child(2),td:nth-child(2){width:13ch;}th:nth-child(3),td:nth-child(3){width:fit-content;}select#channel{width:fit-content;height:1.3em;}p#source{width:fit-content;}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment