Skip to content

Commit

Permalink
Updating PvPIVs footer on pages
Browse files Browse the repository at this point in the history
  • Loading branch information
DeathbyToast committed May 19, 2024
1 parent 96fe58f commit d8e9949
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 18 deletions.
6 changes: 3 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -281,9 +281,9 @@ <h3>Advanced:<button id=advButton onclick='collapsible("advCollapsible","advArro
<label>Remember My Settings:<input id=save type=checkbox oninput=saveCurrentSettings()></label><br>
<button id=resetButton type=resetSettings onclick=localStorage.clear(),location.reload()>Reset All Saved Settings to Defaults</button>
</div><br>
<div style=overflow-x:auto>
<p style=color:var(--tableHeaderText);font-size:.8em>© 2023 PvP IVs | <a href=https://pvpivs.com/privacy>Privacy Policy</a> | <a href=https://pvpivs.com/contact>Contact Us</a></p>
<p style=color:var(--tableDividers);font-size:.6em>Pokémon and Pokémon GO are copyright of The Pokémon Company, Niantic, Inc., and Nintendo.<br>All trademarked images and names are property of their respective owners, and any such material is used on this site for educational purposes only.<br>PvP IVs has no affiliation with The Pokémon Company, Niantic, Inc., or Nintendo.</p>
<div style=overflow-x:auto;max-width:474px;margin-left:auto;margin-right:auto>
<p style=color:var(--tableHeaderText);font-size:.8em>© 2024 PvP IVs | <a href=https://pvpivs.com/privacy>Privacy Policy</a> | <a href=https://pvpivs.com/contact>Contact Us</a></p>
<p style=color:var(--tableDividers);font-size:.6em>Pokémon and Pokémon GO are copyright of The Pokémon Company, Niantic, Inc., and Nintendo. All trademarked images and names are property of their respective owners, and any such material is used on this site for educational purposes only. PvP IVs has no affiliation with The Pokémon Company, Niantic, Inc., or Nintendo.</p>
</div><br><br><br><br>
</section>
<footer>
Expand Down
6 changes: 3 additions & 3 deletions indexTest.html
Original file line number Diff line number Diff line change
Expand Up @@ -3149,9 +3149,9 @@ <h4>Debug:</h4>
<button id=getDetails>Export Search Builder JSON</button><br>
<button id=reload>Reload Search Builder JSON</button><br>
</div><br>
<div style=overflow-x:auto>
<p style=color:var(--tableHeaderText);font-size:.8em>© 2023 PvP IVs | <a href=https://pvpivs.com/privacy>Privacy Policy</a> | <a href=https://pvpivs.com/contact>Contact Us</a></p>
<p style=color:var(--tableHeaderText);font-size:.6em>Pokémon and Pokémon GO are copyright of The Pokémon Company, Niantic, Inc., and Nintendo.<br>All trademarked images and names are property of their respective owners, and any such material is used on this site for educational purposes only.<br>PvP IVs has no affiliation with The Pokémon Company, Niantic, Inc., or Nintendo.</p>
<div style=overflow-x:auto;max-width:474px;margin-left:auto;margin-right:auto>
<p style=color:var(--tableHeaderText);font-size:.8em>© 2024 PvP IVs | <a href=https://pvpivs.com/privacy>Privacy Policy</a> | <a href=https://pvpivs.com/contact>Contact Us</a></p>
<p style=color:var(--tableDividers);font-size:.6em>Pokémon and Pokémon GO are copyright of The Pokémon Company, Niantic, Inc., and Nintendo. All trademarked images and names are property of their respective owners, and any such material is used on this site for educational purposes only. PvP IVs has no affiliation with The Pokémon Company, Niantic, Inc., or Nintendo.</p>
</div><p style=overflow-x:auto id=timing_outputs></p>
<br><br><br><br>
</section>
Expand Down
6 changes: 3 additions & 3 deletions leagueRanks.html
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,9 @@ <h3>Advanced:<button id=advButton onclick='collapsible("advCollapsible","advArro
<script src=https://pvpivs.com/includes/pokeListObj.js></script>
<script>var lastPercent,perfTiming=!1;function start(){var e,t=performance.now(),l=Object.keys(pokeListObj);l.length<1e3&&console.log("ERROR: Failed to load pokeListObj!"),document.getElementById("outputBox").innerHTML="";var o=document.getElementById("maxLvl").value;console.log("maxLvl read as:"+o);var n=Math.max(0,2*(o-1)),a=document.getElementById("league").value,r=document.getElementById("league").options[document.getElementById("league").selectedIndex].innerHTML;console.log("leagueName: "+JSON.stringify(r));var s=document.getElementById("mega").checked,c=document.getElementById("all").checked,i=document.getElementById("myBar"),u=document.getElementById("feedbackBox"),d=document.getElementById("buckets").checked,p=document.getElementById("limit").value,m=document.getElementById("impossible").checked,h=0;i.style.width="0%",i.innerHTML="0%",lastPercent=0;var f=document.createElement("table"),g=document.createElement("tbody");f.setAttribute("id","outTable");var v=f.createTHead().insertRow(0);v.innerHTML="<tr><th>Dex</th><th>Mon</th><th>Lvl</th><th>CP</th><th>Atk IV</th><th>Def IV</th><th>Sta IV</th><th>Apr</th><th>Perfect</th>",o>41&&(v.innerHTML+="<th>XL</th>"),v.innerHTML+="<th>PvP Atk</th><th>PvP Def</th><th>PvP HP</th><th>Stat Prod</th></tr>",d&&(v.innerHTML+="<th>a0</th><th>a1</th><th>a2</th><th>a3</th><th>a4</th><th>d0</th><th>d1</th><th>d2</th><th>d3</th><th>d4</th><th>s0</th><th>s1</th><th>s2</th><th>s3</th><th>s4</th></tr>");var y="",b="";atkBuckets=new Array(5).fill(0),defBuckets=new Array(5).fill(0),staBuckets=new Array(5).fill(0);var C=new Array(5).fill(0);for(j=0;j<5;j++)C[j]=new Array(5).fill(0);for(j=0;j<5;j++)for(k=0;k<5;k++)C[j][k]=new Array(5).fill(0);e=window.location.href.split("?")[0]+"?",a/1!=1500&&(e+="cp="+a),o/1!=51&&(e+="&max="+o),s&&(e+="&mega="+s),c&&(e+="&all="+c),d&&(e+="&buckets="+d+"&limit="+p),m&&(e+="&impossible="+m),e=encodeURI(e);var I="PvP IVs - "+r+" Rankings (Level "+o+")";document.title=I,window.history.pushState(null,I,e),function e(){if(l[h].includes("Mega_")&&!s)console.log("Skipping "+l[h]);else{var r=pokeListObj[l[h]].split(","),v=Math.max(10,Math.floor((parseInt(r[1])+15)*Math.sqrt(parseInt(r[2])+15)*Math.sqrt(parseInt(r[3])+15)*cpm[n]*cpm[n]/10));if(c||1==o||500==a&&v>410||1500==a&&v>1150||2500==a&&v>2200||v>2500){var I=document.createElement("tr");const[e,t]=adjustFloors(l[h],o,m);var B=calculate(parseInt(r[1]),parseInt(r[2]),parseInt(r[3]),e,t,o,!1,a,l[h]),w=Object.keys(B),E=w[0].split(".")[0];B.numRanks/1>0?(progress(l[h],pokeListObj[l[h]].split(",")[0].split("b")[0].split("&")[0],o,Math.round(h/l.length*100),u,i,I,B[w[0]][0],parseFloat(100*w[0].split(".")[0]/E).toFixed(3),w[0].split(".")[0],B.numRanks/1),d&&calculateBuckets(B,w,p,atkBuckets,defBuckets,staBuckets,I,C,l[h]),g.appendChild(I)):b+=l[h]+"(L"+t+"+), "}else y+=l[h]+"("+v+"), "}if(!(h<l.length-1)){console.log("i: "+h),u.innerHTML="<p><i>Complete!</i></p><br />",d&&(u.innerHTML+="<p>atkBuckets: "+JSON.stringify(atkBuckets)+", defBuckets: "+JSON.stringify(defBuckets)+", staBuckets: "+JSON.stringify(staBuckets)+"</p><br />"),f.appendChild(g),document.getElementById("outputBox").appendChild(f),document.getElementById("outputBox").innerHTML+="<br /><br />";const e=(e,t)=>e.children[t].innerText||e.children[t].textContent,l=(t,l)=>(o,n)=>{return a=e(l?o:n,t),r=e(l?n:o,t),""===a||""===r||isNaN(a.replace("%",""))||isNaN(r.replace("%",""))?a.toString().localeCompare(r):a.replace("%","")-r.replace("%","");var a,r};document.querySelectorAll("th").forEach((e=>e.addEventListener("click",(()=>{const t=e.closest("table").querySelector("tbody");Array.from(t.querySelectorAll("tr")).sort(l(Array.from(e.parentNode.children).indexOf(e),this.asc=!this.asc)).forEach((e=>t.appendChild(e)))}))));var L="Skipped all CPs below ";if(L+=500==a?"400 ":1500==a?"1300 ":2500==a?"2300 ":"2500 ",L+=y+". Removed all too big mon: "+b,console.log(L),L="",d){console.log("atkBuckets: "+JSON.stringify(atkBuckets)),console.log("defBuckets: "+JSON.stringify(defBuckets)),console.log("staBuckets: "+JSON.stringify(staBuckets)),console.log("ivBuckets: "+JSON.stringify(C));var x="";for(h=0;h<5;h++){for(j=0;j<5;j++)if(C[h][j][0]||C[h][j][1]||C[h][j][2]||C[h][j][3]||C[h][j][4])if(C[h][j][0]||C[h][j][1]||C[h][j][2]||C[h][j][3]||!C[h][j][4])if(C[h][j][0]||C[h][j][1]||C[h][j][2]||!C[h][j][3]||!C[h][j][4])if(!C[h][j][0]&&!C[h][j][1]&&C[h][j][2]&&C[h][j][3]&&C[h][j][4])x+=h+"attack&"+j+"defense&0-1hp,";else for(k=0;k<5;k++)C[h][j][k]||(x+=h+"attack&"+j+"defense&"+k+"hp,");else x+=h+"attack&"+j+"defense&0-2hp,";else x+=h+"attack&"+j+"defense&0-3hp,";else x+=h+"attack&"+j+"defense&0-4hp,";x+="<br />"}}d&&(u.innerHTML+="<p>"+x+"</p><br />");var T=performance.now();return console.log("start: Execution took "+(T-t).toFixed(1)+"ms"),!0}setTimeout(e,0),h++}()}function progress(e,t,l,o,n,a,r,s,c,i,u){n.innerHTML="<p><i>Calculating "+e+", please wait...</i></p>",o>lastPercent+1&&(lastPercent=o,a.style.width=o+"%",a.innerHTML=o+"%"),outCell(t,r),outCell(e,r),outCell(s.L,r),outCell(s.CP,r),outCell(s.IVs.A,r),outCell(s.IVs.D,r),outCell(s.IVs.S,r),outCell(s.IVs.star,r),outCell(c+"%",r),l>41&&outCell(XLcandy(s.L/1-40),r),outCell(numOut(s.battle.A,1),r),outCell(numOut(s.battle.D,1),r),outCell(s.battle.S,r),outCell(i,r)}function adjustFloors(e,t,l){if(!l){if(boxRewrd.includes(e))return console.log("Detected box reward mon:"+e),[1,15];if(raidOnly.includes(e))return console.log("Detected Raid+Trade mon:"+e),[1,20];if(boxMyth.includes(e))return console.log("Detected Mythical mon:"+e),[10,15];if(raidMyth.includes(e))return console.log("Detected Raid no Trade mon:"+e),[10,20]}return t/1==1?[15,1]:[0,0]}function XLcandy(e){switch(e){case 11:case 10:return 296;case 10.5:case 9.5:return 276;case 9:return 256;case 8.5:return 236;case 8:return 216;case 7.5:return 199;case 7:return 182;case 6.5:return 165;case 6:return 148;case 5.5:return 133;case 5:return 118;case 4.5:return 103;case 4:return 88;case 3.5:return 76;case 3:return 64;case 2.5:return 52;case 2:return 40;case 1.5:return 30;case 1:return 20;case.5:return 10;default:return 0}}function outCell(e,t){var l=document.createElement("td"),o=document.createTextNode(e);l.appendChild(o),t.appendChild(l)}function numOut(e,t){return 1===t?(Math.trunc(10*e)/10).toFixed(t):(console.log("ERROR: numOut: unsupported decimal place:"+t),!1)}function calculateBuckets(e,t,l,o,n,a,r,s,c){if(perfTiming)var i=performance.now();var u=0,d=0,p=0,m=0,h=0,f=0,g=0,k=0,v=0,y=0,b=0,C=0,I=0,B=0,j=0,w=0,E=0,L=0;for(u=0;u<l&&t[u].indexOf(".")>-1&&p<l;u++)for(d=0;d<e[t[u]].length&&d<l&&p<l;d++){var x=e[t[u]][d].IVs.A,T=e[t[u]][d].IVs.D,M=e[t[u]][d].IVs.S,O=0,R=0,A=0;x/1==15?(o[4]++,k++,O=4):x/1>10?(o[3]++,g++,O=3):x/1>5?(o[2]++,f++,O=2):x/1>0?(o[1]++,h++,O=1):x/1==0?(o[0]++,m++,O=0):console.error("Invalid atk ("+x+")"),T/1==15?(n[4]++,I++,R=4):T/1>10?(n[3]++,C++,R=3):T/1>5?(n[2]++,b++,R=2):T/1>0?(n[1]++,y++,R=1):T/1==0?(n[0]++,v++,R=0):console.error("Invalid def ("+T+")"),M/1==15?(a[4]++,L++,A=4):M/1>10?(a[3]++,E++,A=3):M/1>5?(a[2]++,w++,A=2):M/1>0?(a[1]++,j++,A=1):M/1==0?(a[0]++,B++,A=0):console.error("Invalid sta ("+M+")"),s[O][R][A]=!0,0===O&&0===R&&0===A&&console.log("Found a 0-0-0 IV spread: rank "+u+" "+c),O>1&&R<3&&A<3&&console.log("Found a "+x+"-"+T+"-"+M+" IV spread: rank "+u+" "+c),p++}if(outCell(m,r),outCell(h,r),outCell(f,r),outCell(g,r),outCell(k,r),outCell(v,r),outCell(y,r),outCell(b,r),outCell(C,r),outCell(I,r),outCell(B,r),outCell(j,r),outCell(w,r),outCell(E,r),outCell(L,r),perfTiming){var S=performance.now();console.log("calculateBuckets: Execution took "+(S-i).toFixed(1)+"ms")}}function checkURI(){if(perfTiming)var e=performance.now();var t=window.location.href.split("?")[1],l=!1;if(t){t=decodeURI(t),console.log("Read URL as: "+t);var o=t.split("&");console.log("Values array as: "+JSON.stringify(o));for(var n=0;n<o.length;n++)switch(o[n].split("=")[0]){case"cp":document.getElementById("league").value=o[n].split("=")[1],l=!0;break;case"max":document.getElementById("maxLvl").value=o[n].split("=")[1],l=!0;break;case"all":document.getElementById("all").checked="true"==o[n].split("=")[1],l=!0,collapsible("advCollapsible","advArrow");break;case"mega":document.getElementById("mega").checked="true"==o[n].split("=")[1],l=!0,collapsible("advCollapsible","advArrow");break;case"buckets":document.getElementById("buckets").checked="true"==o[n].split("=")[1],l=!0,collapsible("advCollapsible","advArrow");break;case"limit":document.getElementById("limit").value=o[n].split("=")[1],l=!0,collapsible("advCollapsible","advArrow");break;case"impossible":document.getElementById("impossible").checked="true"==o[n].split("=")[1],l=!0,collapsible("advCollapsible","advArrow");break;case"t":perfTiming=o[n].split("=")[1]}if(perfTiming){var a=performance.now();console.log("checkURI: Execution took "+(a-e).toFixed(1)+"ms")}return 1==l?(console.log("Found at least one valid URL parameter, starting calculations..."),start()):console.log("Only found invalid URL parameters, waiting for user to click Calculate button to start"),!0}if(console.log("No inputs detected, awaiting user input"),perfTiming){a=performance.now();console.log("checkURI: Execution took "+(a-e).toFixed(1)+"ms")}return!1}</script>
<br>
<div style=overflow-x:auto>
<p style=color:var(--tableHeaderText);font-size:.8em>© 2023 PvP IVs | <a href=https://pvpivs.com/privacy>Privacy Policy</a> | <a href=https://pvpivs.com/contact>Contact Us</a></p>
<p style=color:var(--tableDividers);font-size:.6em>Pokémon and Pokémon GO are copyright of The Pokémon Company, Niantic, Inc., and Nintendo.<br>All trademarked images and names are property of their respective owners, and any such material is used on this site for educational purposes only.<br>PvP IVs has no affiliation with The Pokémon Company, Niantic, Inc., or Nintendo.</p>
<div style=overflow-x:auto;max-width:474px;margin-left:auto;margin-right:auto>
<p style=color:var(--tableHeaderText);font-size:.8em>© 2024 PvP IVs | <a href=https://pvpivs.com/privacy>Privacy Policy</a> | <a href=https://pvpivs.com/contact>Contact Us</a></p>
<p style=color:var(--tableDividers);font-size:.6em>Pokémon and Pokémon GO are copyright of The Pokémon Company, Niantic, Inc., and Nintendo. All trademarked images and names are property of their respective owners, and any such material is used on this site for educational purposes only. PvP IVs has no affiliation with The Pokémon Company, Niantic, Inc., or Nintendo.</p>
</div><br><br><br><br>
<footer>
<script data-cfasync=false async src=https://cdn.intergient.com/ramp_core.js></script>
Expand Down
6 changes: 3 additions & 3 deletions searchStr.html
Original file line number Diff line number Diff line change
Expand Up @@ -324,9 +324,9 @@ <h3>Advanced:<button id=advButton onclick='collapsible("advCollapsible","advArro
</div>
<br><div id=overflowArea></div>
<br>
<div style=overflow-x:auto>
<p style=color:var(--tableHeaderText);font-size:.8em>© 2023 PvP IVs | <a href=https://pvpivs.com/privacy>Privacy Policy</a> | <a href=https://pvpivs.com/contact>Contact Us</a></p>
<p style=color:var(--tableHeaderText);font-size:.6em>Pokémon and Pokémon GO are copyright of The Pokémon Company, Niantic, Inc., and Nintendo.<br>All trademarked images and names are property of their respective owners, and any such material is used on this site for educational purposes only.<br>PvP IVs has no affiliation with The Pokémon Company, Niantic, Inc., or Nintendo.</p>
<div style=overflow-x:auto;max-width:474px;margin-left:auto;margin-right:auto>
<p style=color:var(--tableHeaderText);font-size:.8em>© 2024 PvP IVs | <a href=https://pvpivs.com/privacy>Privacy Policy</a> | <a href=https://pvpivs.com/contact>Contact Us</a></p>
<p style=color:var(--tableDividers);font-size:.6em>Pokémon and Pokémon GO are copyright of The Pokémon Company, Niantic, Inc., and Nintendo. All trademarked images and names are property of their respective owners, and any such material is used on this site for educational purposes only. PvP IVs has no affiliation with The Pokémon Company, Niantic, Inc., or Nintendo.</p>
</div>
<p style=overflow-x:auto id=timing_outputs></p>
<br><br><br><br>
Expand Down
6 changes: 3 additions & 3 deletions typeLookup.html
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,9 @@
</select><br><br>
<table style=text-align:center id=resultsContainer></table>
<br><br>
<div style=overflow-x:auto>
<p style=color:var(--tableHeaderText);font-size:.8em>© 2023 PvP IVs | <a href=https://pvpivs.com/privacy>Privacy Policy</a> | <a href=https://pvpivs.com/contact>Contact Us</a></p>
<p style=color:var(--tableDividers);font-size:.6em>Pokémon and Pokémon GO are copyright of The Pokémon Company, Niantic, Inc., and Nintendo.<br>All trademarked images and names are property of their respective owners, and any such material is used on this site for educational purposes only.<br>PvP IVs has no affiliation with The Pokémon Company, Niantic, Inc., or Nintendo.</p>
<div style=overflow-x:auto;max-width:474px;margin-left:auto;margin-right:auto>
<p style=color:var(--tableHeaderText);font-size:.8em>© 2024 PvP IVs | <a href=https://pvpivs.com/privacy>Privacy Policy</a> | <a href=https://pvpivs.com/contact>Contact Us</a></p>
<p style=color:var(--tableDividers);font-size:.6em>Pokémon and Pokémon GO are copyright of The Pokémon Company, Niantic, Inc., and Nintendo. All trademarked images and names are property of their respective owners, and any such material is used on this site for educational purposes only. PvP IVs has no affiliation with The Pokémon Company, Niantic, Inc., or Nintendo.</p>
</div><br><br><br><br>
</div>
</div>
Expand Down
6 changes: 3 additions & 3 deletions typeQuiz.html
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,9 @@
</div>
</div>
<br><br>
<div style=overflow-x:auto>
<p style=color:var(--tableHeaderText);font-size:.8em>© 2023 PvP IVs | <a href=https://pvpivs.com/privacy>Privacy Policy</a> | <a href=https://pvpivs.com/contact>Contact Us</a></p>
<p style=color:var(--tableDividers);font-size:.6em>Pokémon and Pokémon GO are copyright of The Pokémon Company, Niantic, Inc., and Nintendo.<br>All trademarked images and names are property of their respective owners, and any such material is used on this site for educational purposes only.<br>PvP IVs has no affiliation with The Pokémon Company, Niantic, Inc., or Nintendo.</p>
<div style=overflow-x:auto;max-width:474px;margin-left:auto;margin-right:auto>
<p style=color:var(--tableHeaderText);font-size:.8em>© 2024 PvP IVs | <a href=https://pvpivs.com/privacy>Privacy Policy</a> | <a href=https://pvpivs.com/contact>Contact Us</a></p>
<p style=color:var(--tableDividers);font-size:.6em>Pokémon and Pokémon GO are copyright of The Pokémon Company, Niantic, Inc., and Nintendo. All trademarked images and names are property of their respective owners, and any such material is used on this site for educational purposes only. PvP IVs has no affiliation with The Pokémon Company, Niantic, Inc., or Nintendo.</p>
</div><br><br><br><br>
</div>
</section>
Expand Down

0 comments on commit d8e9949

Please sign in to comment.