Advertisement
FIN-codelines

pelitiedosto

Mar 18th, 2023 (edited)
220
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5 20.54 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html lang="fi">
  3. <head>
  4. <meta charset="UTF-8" />
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  6. <title>YLLÄTYSSARJA Y 4-3-32 (13)</title>
  7. <meta name="apple-mobile-web-app-title" content="YLLÄTYSSARJA" />
  8. <meta name="author" content="MaPi" />
  9. <style>*{box-sizing:border-box}html{background:#F7F7F7;height:101%}body{margin:0}a{text-decoration:none;font-weight:bold;color:#FFF}h2{margin-left:10px;color:#00F}h3{margin:0 0 0 10px;font-weight:bold;font-size:xx-large;color:#F00;text-align:center}input.perus,input.ov,input.tv{width:30px;text-align:center;margin:10px}textarea{width:60%;height:150px;padding:12px 20px;border:2px solid #CCC;border-radius:4px;background-color:#f8f8f8;font-size:16px;resize:none}#doloce{width:50px;height:50px;border:none;border-radius:50%;text-align:center;box-shadow:5px 10px 20px #808080;position:absolute;top:10px;right:10px}#main{width:760px;margin:30px auto;display:block;padding:20px;border:solid 1px #00F;box-shadow:4px -4px #00F}#main2{width:760px;margin:30px auto;display:none;padding:20px;border:solid 1px #00F;box-shadow:4px -4px #00F;position:relative}#main3{width:760px;height:320px;overflow:scroll;margin:30px auto;display:block;padding:20px;border:solid 1px #00F;box-shadow:4px -4px #00F}#p1,#p2,#p3,#p4,#p5,#p6,#p7,#p8,#p9,#p10,#p11,#p12,#p13{width:40px;margin:5px;display:inline-block;position:relative}#o1,#o2,#o3,#o4,#o5,#o6,#o7,#o8,#o9,#o10,#o11,#o12,#o13,#t1,#t2,#t3,#t4,#t5,#t6,#t7,#t8,#t9,#t10,#t11,#t12,#t13{opacity:0}#ots1,#ots2,#ots3,#ots4,#ots5,#ots6,#ots7,#ots8,#ots9,#ots10,#ots11,#ots12,#ots13{width:40px;margin:5px;display:inline-block;border:2px solid #008000;padding:5px;text-align:center;background:#DCDCDC;position:absolute;top:-40px;right:-11px}#virhe{text-align:center}#peetee,#jakokaavio{margin-left:10px;padding:10px;font-size:large;font-family:monospace}.corner-ribbon{background:#e43;color:#f0f0f0;left:-50px;letter-spacing:1px;line-height:2;position:absolute;text-align:center;top:25px;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);width:200px}.corner-ribbon.sticky{position:fixed}.corner-ribbon.top-right{left:auto;right:-50px;top:25px;-webkit-transform:rotate(45deg);transform:rotate(45deg)}.corner-ribbon.blue{background:#00F}.dolo{font-size:30px;cursor:pointer}.hakunappula{display:inline-block;padding:.7em 1.4em;margin:0 .3em .3em 10em;border-radius:.15em;box-sizing:border-box;text-decoration:none;font-weight:400;color:#FFF;background-color:#3369FF;box-shadow:inset 0 -.6em 0 -.35em rgba(0,0,0,.17);text-align:center}.hakunappula:hover{background-color:#0034C2;cursor:pointer}.info{margin-left:80px;padding:10px;font-weight:bold;font-size:x-large;text-align:center}.mix{font-size:smaller}.copclip{cursor:copy}@media screen and (max-width:720px){#kulmio{display:none}}</style>
  10. </head><body>
  11. <div id="main">
  12. <form action="#" autocomplete="off">
  13. <h2>PERUSRIVI (ensisijaiset pelimerkit) &nbsp;&nbsp;&nbsp;<sub>1</sub> <span class="mix">X</span> <sup>2</sup></h2><br><br>
  14. <div id="p1"><input class="perus" type="text" maxlength="1" name="perusmerkki_1" /><div id="ots1">1</div></div>
  15. <div id="p2"><input class="perus" type="text" maxlength="1" name="perusmerkki_2" /><div id="ots2">2</div></div>
  16. <div id="p3"><input class="perus" type="text" maxlength="1" name="perusmerkki_3" /><div id="ots3">3</div></div>
  17. <div id="p4"><input class="perus" type="text" maxlength="1" name="perusmerkki_4" /><div id="ots4">4</div></div>
  18. <div id="p5"><input class="perus" type="text" maxlength="1" name="perusmerkki_5" /><div id="ots5">5</div></div>
  19. <div id="p6"><input class="perus" type="text" maxlength="1" name="perusmerkki_6" /><div id="ots6">6</div></div>
  20. <div id="p7"><input class="perus" type="text" maxlength="1" name="perusmerkki_7" /><div id="ots7">7</div></div>
  21. <div id="p8"><input class="perus" type="text" maxlength="1" name="perusmerkki_8" /><div id="ots8">8</div></div>
  22. <div id="p9"><input class="perus" type="text" maxlength="1" name="perusmerkki_9" /><div id="ots9">9</div></div>
  23. <div id="p10"><input class="perus" type="text" maxlength="1" name="perusmerkki_10" /><div id="ots10">10</div></div>
  24. <div id="p11"><input class="perus" type="text" maxlength="1" name="perusmerkki_11" /><div id="ots11">11</div></div>
  25. <div id="p12"><input class="perus" type="text" maxlength="1" name="perusmerkki_12" /><div id="ots12">12</div></div>
  26. <div id="p13"><input class="perus" type="text" maxlength="1" name="perusmerkki_13" /><div id="ots13">13</div></div>
  27. <h2>VAIHDELLUT TOISET LISÄMERKIT (valinnainen)</h2>
  28. <input id="o1" class="ov" type="text" maxlength="1" name="ovmerkki_1" />
  29. <input id="o2" class="ov" type="text" maxlength="1" name="ovmerkki_2" />
  30. <input id="o3" class="ov" type="text" maxlength="1" name="ovmerkki_3" />
  31. <input id="o4" class="ov" type="text" maxlength="1" name="ovmerkki_4" />
  32. <input id="o5" class="ov" type="text" maxlength="1" name="ovmerkki_5" />
  33. <input id="o6" class="ov" type="text" maxlength="1" name="ovmerkki_6" />
  34. <input id="o7" class="ov" type="text" maxlength="1" name="ovmerkki_7" />
  35. <input id="o8" class="ov" type="text" maxlength="1" name="ovmerkki_8" />
  36. <input id="o9" class="ov" type="text" maxlength="1" name="ovmerkki_9" />
  37. <input id="o10" class="ov" type="text" maxlength="1" name="ovmerkki_10" />
  38. <input id="o11" class="ov" type="text" maxlength="1" name="ovmerkki_11" />
  39. <input id="o12" class="ov" type="text" maxlength="1" name="ovmerkki_12" />
  40. <input id="o13" class="ov" type="text" maxlength="1" name="ovmerkki_13" />
  41. <h2>VAIHDELLUT KOLMANNET LISÄMERKIT (valinnainen)</h2>
  42. <input id="t1" class="tv" type="text" maxlength="1" name="tvmerkki_1" />
  43. <input id="t2" class="tv" type="text" maxlength="1" name="tvmerkki_2" />
  44. <input id="t3" class="tv" type="text" maxlength="1" name="tvmerkki_3" />
  45. <input id="t4" class="tv" type="text" maxlength="1" name="tvmerkki_4" />
  46. <input id="t5" class="tv" type="text" maxlength="1" name="tvmerkki_5" />
  47. <input id="t6" class="tv" type="text" maxlength="1" name="tvmerkki_6" />
  48. <input id="t7" class="tv" type="text" maxlength="1" name="tvmerkki_7" />
  49. <input id="t8" class="tv" type="text" maxlength="1" name="tvmerkki_8" />
  50. <input id="t9" class="tv" type="text" maxlength="1" name="tvmerkki_9" />
  51. <input id="t10" class="tv" type="text" maxlength="1" name="tvmerkki_10" />
  52. <input id="t11" class="tv" type="text" maxlength="1" name="tvmerkki_11" />
  53. <input id="t12" class="tv" type="text" maxlength="1" name="tvmerkki_12" />
  54. <input id="t13" class="tv" type="text" maxlength="1" name="tvmerkki_13" />
  55. </form><br>
  56. <button class="hakunappula">VALMIS</button>
  57. <div id="output"></div><br>
  58. <div id="virhe"></div>
  59. </div>
  60. <div id="main2">
  61. <h2>PELITIEDOSTO &nbsp;&nbsp;&nbsp;<sup>2</sup> <span class="mix">X</span> <sub>1</sub></h2>
  62. <div id="peetee"><textarea id="tpt"></textarea></div>
  63. <div id="doloce"><span class='dolo' onclick = "downloadFile()" title="Luo pelitiedosto Ladatut tiedostot -kansioon">&#128229;</span></div>
  64. </div>
  65. <div id="main3">
  66. <h2>JAKOKAAVIO (<span title="Yllätyssarja">Y</span> <span title="täysin vaihdeltuja">4</span>-<span title="osittain vaihdeltuja">3</span>-<span title="rivien lukumäärä">32</span>) &nbsp;&nbsp;&nbsp;<sup>X</sup> <span class="mix">1</span> <sub>2</sub></h2>
  67. <div id="jakokaavio" class="copclip" onclick="copyDivToClipboard()" title="Kopioi jakokaavio leikepöydälle"></div>
  68. </div>
  69. <div id="kulmio" class="corner-ribbon top-right sticky blue" title="Yllätyssarja 4-3-32"><a href="#" target="_self">Y-4-3-32</a></div><br /><br />
  70. <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.1/jquery.min.js"></script>
  71. <script>function paluuAlkuun(){location.reload()}function copyDivToClipboard(){var e=document.createRange();e.selectNode(document.getElementById("jakokaavio")),window.getSelection().removeAllRanges(),window.getSelection().addRange(e),document.execCommand("copy"),window.getSelection().removeAllRanges()}let omatrivit=[["","","","","","","","","","","","",""],["","","","","","","","","","","","",""],["","","","","","","","","","","","",""],["","","","","","","","","","","","",""],["","","","","","","","","","","","",""],["","","","","","","","","","","","",""],["","","","","","","","","","","","",""],["","","","","","","","","","","","",""],["","","","","","","","","","","","",""],["","","","","","","","","","","","",""],["","","","","","","","","","","","",""],["","","","","","","","","","","","",""],["","","","","","","","","","","","",""],["","","","","","","","","","","","",""],["","","","","","","","","","","","",""],["","","","","","","","","","","","",""],["","","","","","","","","","","","",""],["","","","","","","","","","","","",""],["","","","","","","","","","","","",""],["","","","","","","","","","","","",""],["","","","","","","","","","","","",""],["","","","","","","","","","","","",""],["","","","","","","","","","","","",""],["","","","","","","","","","","","",""],["","","","","","","","","","","","",""],["","","","","","","","","","","","",""],["","","","","","","","","","","","",""],["","","","","","","","","","","","",""],["","","","","","","","","","","","",""],["","","","","","","","","","","","",""],["","","","","","","","","","","","",""],["","","","","","","","","","","","",""]];const csv=[["1","1","1","1","X","X","X"],["1","1","1","1","2","2","2"],["1","1","1","X","1","X","2"],["1","1","1","2","1","2","X"],["1","1","1","2","X","1","2"],["1","1","1","X","2","1","X"],["1","1","1","X","X","2","1"],["1","1","1","2","2","X","1"],["1","2","2","1","2","X","X"],["1","2","2","1","X","2","2"],["1","2","2","2","1","X","2"],["1","2","2","X","1","2","X"],["1","2","2","2","X","1","X"],["1","2","2","X","2","1","2"],["1","2","2","X","X","X","1"],["1","2","2","2","2","2","1"],["2","1","2","1","X","2","X"],["2","1","2","1","2","X","2"],["2","1","2","X","1","X","X"],["2","1","2","2","1","2","2"],["2","1","2","X","X","1","2"],["2","1","2","2","2","1","X"],["2","1","2","X","2","2","1"],["2","1","2","2","X","X","1"],["2","2","1","1","X","X","2"],["2","2","1","1","2","2","X"],["2","2","1","2","1","X","X"],["2","2","1","X","1","2","2"],["2","2","1","X","X","1","X"],["2","2","1","2","2","1","2"],["2","2","1","X","2","X","1"],["2","2","1","2","X","2","1"]],vaihtoehdot=["1","2","X","x",void 0];let perusrivi1=[],perusrivi2=[],perusrivi3=[];$(document).ready(function(){$("button").click(function(){var e=0,t=$("form").serializeArray(),i=0,a=0,r=0;$.each(t,function(e,t){"perusmerkki_1"===t.name&&""!=t.value&&(i++,perusrivi1[0]=t.value.toUpperCase()),"perusmerkki_2"===t.name&&""!=t.value&&(i++,perusrivi1[1]=t.value.toUpperCase()),"perusmerkki_3"===t.name&&""!=t.value&&(i++,perusrivi1[2]=t.value.toUpperCase()),"perusmerkki_4"===t.name&&""!=t.value&&(i++,perusrivi1[3]=t.value.toUpperCase()),"perusmerkki_5"===t.name&&""!=t.value&&(i++,perusrivi1[4]=t.value.toUpperCase()),"perusmerkki_6"===t.name&&""!=t.value&&(i++,perusrivi1[5]=t.value.toUpperCase()),"perusmerkki_7"===t.name&&""!=t.value&&(i++,perusrivi1[6]=t.value.toUpperCase()),"perusmerkki_8"===t.name&&""!=t.value&&(i++,perusrivi1[7]=t.value.toUpperCase()),"perusmerkki_9"===t.name&&""!=t.value&&(i++,perusrivi1[8]=t.value.toUpperCase()),"perusmerkki_10"===t.name&&""!=t.value&&(i++,perusrivi1[9]=t.value.toUpperCase()),"perusmerkki_11"===t.name&&""!=t.value&&(i++,perusrivi1[10]=t.value.toUpperCase()),"perusmerkki_12"===t.name&&""!=t.value&&(i++,perusrivi1[11]=t.value.toUpperCase()),"perusmerkki_13"===t.name&&""!=t.value&&(i++,perusrivi1[12]=t.value.toUpperCase()),"ovmerkki_1"===t.name&&""!=t.value&&(i--,a++,perusrivi2[0]=t.value.toUpperCase()),"ovmerkki_2"===t.name&&""!=t.value&&(i--,a++,perusrivi2[1]=t.value.toUpperCase()),"ovmerkki_3"===t.name&&""!=t.value&&(i--,a++,perusrivi2[2]=t.value.toUpperCase()),"ovmerkki_4"===t.name&&""!=t.value&&(i--,a++,perusrivi2[3]=t.value.toUpperCase()),"ovmerkki_5"===t.name&&""!=t.value&&(i--,a++,perusrivi2[4]=t.value.toUpperCase()),"ovmerkki_6"===t.name&&""!=t.value&&(i--,a++,perusrivi2[5]=t.value.toUpperCase()),"ovmerkki_7"===t.name&&""!=t.value&&(i--,a++,perusrivi2[6]=t.value.toUpperCase()),"ovmerkki_8"===t.name&&""!=t.value&&(i--,a++,perusrivi2[7]=t.value.toUpperCase()),"ovmerkki_9"===t.name&&""!=t.value&&(i--,a++,perusrivi2[8]=t.value.toUpperCase()),"ovmerkki_10"===t.name&&""!=t.value&&(i--,a++,perusrivi2[9]=t.value.toUpperCase()),"ovmerkki_11"===t.name&&""!=t.value&&(i--,a++,perusrivi2[10]=t.value.toUpperCase()),"ovmerkki_12"===t.name&&""!=t.value&&(i--,a++,perusrivi2[11]=t.value.toUpperCase()),"ovmerkki_13"===t.name&&""!=t.value&&(i--,a++,perusrivi2[12]=t.value.toUpperCase()),"tvmerkki_1"===t.name&&""!=t.value&&(a--,r++,perusrivi3[0]=t.value.toUpperCase()),"tvmerkki_2"===t.name&&""!=t.value&&(a--,r++,perusrivi3[1]=t.value.toUpperCase()),"tvmerkki_3"===t.name&&""!=t.value&&(a--,r++,perusrivi3[2]=t.value.toUpperCase()),"tvmerkki_4"===t.name&&""!=t.value&&(a--,r++,perusrivi3[3]=t.value.toUpperCase()),"tvmerkki_5"===t.name&&""!=t.value&&(a--,r++,perusrivi3[4]=t.value.toUpperCase()),"tvmerkki_6"===t.name&&""!=t.value&&(a--,r++,perusrivi3[5]=t.value.toUpperCase()),"tvmerkki_7"===t.name&&""!=t.value&&(a--,r++,perusrivi3[6]=t.value.toUpperCase()),"tvmerkki_8"===t.name&&""!=t.value&&(a--,r++,perusrivi3[7]=t.value.toUpperCase()),"tvmerkki_9"===t.name&&""!=t.value&&(a--,r++,perusrivi3[8]=t.value.toUpperCase()),"tvmerkki_10"===t.name&&""!=t.value&&(a--,r++,perusrivi3[9]=t.value.toUpperCase()),"tvmerkki_11"===t.name&&""!=t.value&&(a--,r++,perusrivi3[10]=t.value.toUpperCase()),"tvmerkki_12"===t.name&&""!=t.value&&(a--,r++,perusrivi3[11]=t.value.toUpperCase()),"tvmerkki_13"===t.name&&""!=t.value&&(a--,r++,perusrivi3[12]=t.value.toUpperCase())}),$("#output").replaceWith('<span class="info">varmat: '+i+" / osittain vaihdellut "+a+" / t\xe4ysin vaihdellut "+r+'</span> <span class="dolo" onclick = "paluuAlkuun()" title="K\xe4ynnist\xe4 uudelleen">\uD83D\uDD11</span>'),(i!=omatrivit[0].length-a-r||3!=a||4!=r)&&$("#virhe").replaceWith("<br /><h3>Merkkien sy\xf6t\xf6ss\xe4 havaittu virhe!</h3>"),$("button").css("display","none");for(let l=0;l<perusrivi1.length;l++)if(!0==!vaihtoehdot.includes(perusrivi1[l])){$("#virhe").replaceWith("<br /><h3>Merkkien sy\xf6t\xf6ss\xe4 havaittu virhe!</h3>");break}for(let v=0;v<perusrivi2.length;v++)if(!0==!vaihtoehdot.includes(perusrivi2[v])){$("#virhe").replaceWith("<br /><h3>Merkkien sy\xf6t\xf6ss\xe4 havaittu virhe!</h3>");break}for(let s=0;s<perusrivi3.length;s++)if(!0==!vaihtoehdot.includes(perusrivi3[s])){$("#virhe").replaceWith("<br /><h3>Merkkien sy\xf6t\xf6ss\xe4 havaittu virhe!</h3>");break}for(let n=0;n<perusrivi1.length;n++)if("1"==perusrivi1[n]&&"1"==perusrivi2[n]||"2"==perusrivi1[n]&&"2"==perusrivi2[n]||"X"==perusrivi1[n]&&"X"==perusrivi2[n]||"1"==perusrivi1[n]&&"1"==perusrivi3[n]||"2"==perusrivi1[n]&&"2"==perusrivi3[n]||"X"==perusrivi1[n]&&"X"==perusrivi3[n]||"1"==perusrivi2[n]&&"1"==perusrivi3[n]||"2"==perusrivi2[n]&&"2"==perusrivi3[n]||"X"==perusrivi2[n]&&"X"==perusrivi3[n]){$("#virhe").replaceWith("<br /><h3>Merkkien sy\xf6t\xf6ss\xe4 havaittu virhe!</h3>");break}let o=[];for(let p=0;p<omatrivit[0].length;p++)void 0!==perusrivi1[p]&&(marks=1),void 0!==perusrivi2[p]&&(marks=2),void 0!==perusrivi3[p]&&(marks=3),3===marks?o[p]=perusrivi1[p]+perusrivi2[p]+perusrivi3[p]:2===marks?o[p]=perusrivi1[p]+perusrivi2[p]:o[p]=perusrivi1[p];let _=[],u=[];rex=0,fux=0;for(let c=0;c<omatrivit[0].length;c++)if(1===o[c].length)for(let m=0;m<omatrivit.length;m++)omatrivit[m][c]=perusrivi1[c];else 2===o[c].length?(_[rex]=String(c),rex++):(u[fux]=String(c),fux++);ovlask=0;for(let h=0;h<a;h++){for(let g=0;g<omatrivit.length;g++)"1"===csv[g][h]?omatrivit[g][_[ovlask]]=perusrivi1[_[ovlask]]:omatrivit[g][_[ovlask]]=perusrivi2[_[ovlask]];ovlask++}tvlask=0;for(let k=_.length;k<_.length+u.length;k++){for(let y=0;y<omatrivit.length;y++)"1"===csv[y][k]?omatrivit[y][u[tvlask]]=perusrivi1[u[tvlask]]:"2"===csv[y][k]?omatrivit[y][u[tvlask]]=perusrivi3[u[tvlask]]:omatrivit[y][u[tvlask]]=perusrivi2[u[tvlask]];tvlask++}let f="";for(let X=0;X<omatrivit.length;X++){for(let C=0;C<omatrivit[X].length;C++)f+=omatrivit[X][C];f+="\n"}document.getElementById("tpt").innerHTML=f,$("textarea").text(function(e,t){return t.replace("x","X")}),(e=document.getElementById("tpt").value.length)>0&&i==omatrivit[0].length-a-r&&3==a&&4==r&&$("#main2").css("display","block"),0==document.getElementById("o1").value.length&&$("#o1").css("opacity",0),0==document.getElementById("o2").value.length&&$("#o2").css("opacity",0),0==document.getElementById("o3").value.length&&$("#o3").css("opacity",0),0==document.getElementById("o4").value.length&&$("#o4").css("opacity",0),0==document.getElementById("o5").value.length&&$("#o5").css("opacity",0),0==document.getElementById("o6").value.length&&$("#o6").css("opacity",0),0==document.getElementById("o7").value.length&&$("#o7").css("opacity",0),0==document.getElementById("o8").value.length&&$("#o8").css("opacity",0),0==document.getElementById("o9").value.length&&$("#o9").css("opacity",0),0==document.getElementById("o10").value.length&&$("#o10").css("opacity",0),0==document.getElementById("o11").value.length&&$("#o11").css("opacity",0),0==document.getElementById("o12").value.length&&$("#o12").css("opacity",0),0==document.getElementById("o13").value.length&&$("#o13").css("opacity",0),0==document.getElementById("t1").value.length&&$("#t1").css("opacity",0),0==document.getElementById("t2").value.length&&$("#t2").css("opacity",0),0==document.getElementById("t3").value.length&&$("#t3").css("opacity",0),0==document.getElementById("t4").value.length&&$("#t4").css("opacity",0),0==document.getElementById("t5").value.length&&$("#t5").css("opacity",0),0==document.getElementById("t6").value.length&&$("#t6").css("opacity",0),0==document.getElementById("t7").value.length&&$("#t7").css("opacity",0),0==document.getElementById("t8").value.length&&$("#t8").css("opacity",0),0==document.getElementById("t9").value.length&&$("#t9").css("opacity",0),0==document.getElementById("t10").value.length&&$("#t10").css("opacity",0),0==document.getElementById("t11").value.length&&$("#t11").css("opacity",0),0==document.getElementById("t12").value.length&&$("#t12").css("opacity",0),0==document.getElementById("t13").value.length&&$("#t13").css("opacity",0)}),$("#doloce").click(function(){$(this).hide(1e3)})}),$("#p1").change(function(){1==$("#p1").val.length&&$("#o1").css("opacity",1)}),$("#p2").change(function(){1==$("#p2").val.length&&$("#o2").css("opacity",1)}),$("#p3").change(function(){1==$("#p3").val.length&&$("#o3").css("opacity",1)}),$("#p4").change(function(){1==$("#p4").val.length&&$("#o4").css("opacity",1)}),$("#p5").change(function(){1==$("#p5").val.length&&$("#o5").css("opacity",1)}),$("#p6").change(function(){1==$("#p6").val.length&&$("#o6").css("opacity",1)}),$("#p7").change(function(){1==$("#p7").val.length&&$("#o7").css("opacity",1)}),$("#p8").change(function(){1==$("#p8").val.length&&$("#o8").css("opacity",1)}),$("#p9").change(function(){1==$("#p9").val.length&&$("#o9").css("opacity",1)}),$("#p10").change(function(){1==$("#p10").val.length&&$("#o10").css("opacity",1)}),$("#p11").change(function(){1==$("#p11").val.length&&$("#o11").css("opacity",1)}),$("#p12").change(function(){1==$("#p12").val.length&&$("#o12").css("opacity",1)}),$("#p13").change(function(){1==$("#p13").val.length&&$("#o13").css("opacity",1)}),$("#o1").change(function(){1==$("#t1").val.length&&$("#t1").css("opacity",1)}),$("#o2").change(function(){1==$("#t2").val.length&&$("#t2").css("opacity",1)}),$("#o3").change(function(){1==$("#t3").val.length&&$("#t3").css("opacity",1)}),$("#o4").change(function(){1==$("#t4").val.length&&$("#t4").css("opacity",1)}),$("#o5").change(function(){1==$("#t5").val.length&&$("#t5").css("opacity",1)}),$("#o6").change(function(){1==$("#t6").val.length&&$("#t6").css("opacity",1)}),$("#o7").change(function(){1==$("#t7").val.length&&$("#t7").css("opacity",1)}),$("#o8").change(function(){1==$("#t8").val.length&&$("#t8").css("opacity",1)}),$("#o9").change(function(){1==$("#t9").val.length&&$("#t9").css("opacity",1)}),$("#o10").change(function(){1==$("#t10").val.length&&$("#t10").css("opacity",1)}),$("#o11").change(function(){1==$("#t11").val.length&&$("#t11").css("opacity",1)}),$("#o12").change(function(){1==$("#t12").val.length&&$("#t12").css("opacity",1)}),$("#o13").change(function(){1==$("#t13").val.length&&$("#t13").css("opacity",1)});for(var lukema,rlkm=0;rlkm<csv.length;rlkm++)rlkm<9?document.getElementById("jakokaavio").innerHTML+="0"+(rlkm+1)+": "+csv[rlkm].join(" ")+"<br />":(rlkm+1)%10==0?document.getElementById("jakokaavio").innerHTML+=rlkm+1+": "+csv[rlkm].join(" ")+"<br /><br />":document.getElementById("jakokaavio").innerHTML+=rlkm+1+": "+csv[rlkm].join(" ")+"<br />";const d=new Date;let ms=d.getUTCMilliseconds();const downloadFile=()=>{let e=document.createElement("a"),t=document.querySelector("textarea").value,i=new Blob([t],{type:"text/plain"});e.href=URL.createObjectURL(i),e.download="pelitiedosto-"+ms+".txt",e.click(),URL.revokeObjectURL(e.href)};</script>
  72. </body></html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement