-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.min.js
executable file
·15 lines (15 loc) · 6.36 KB
/
main.min.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
function subst(b){1===b&&(document.getElementById("debug_info").innerHTML="wkhtmltopdf: called subst()");b={};var a=document.location.search.substring(1).split("&");for(c in a)if(a.hasOwnProperty(c)){var d=a[c].split("=",2);b[d[0]]=decodeURI(d[1])}var c="page frompage topage webpage section subsection date isodate time title doctitle sitepage sitepages".split(" ");for(var e in c)if(c.hasOwnProperty(e))for(d=document.getElementsByClassName(c[e]),a=0;a<d.length;++a)d[a].textContent=b[c[e]]}
function numberWithCommas(b){return b.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")}function goBack(){window.history.back()}function targetBlank(){var b=document.querySelectorAll(".blank_target_link,.https_blank_target_link,.button_blank_target_link");[].forEach.call(b,function(a){a.target="_blank"})}function AddAttribute(b,a,d){document.getElementById(b).setAttribute(a,d)}
function setAgent(){var b=navigator.userAgent;var a=document.querySelectorAll(".js_only");[].forEach.call(a,function(a){a.style.display="block"});-1<b.indexOf("wkhtmltopdf")||-1<b.indexOf("HeadlessChrome")?(a=document.querySelectorAll(".show_only_pdfs"),[].forEach.call(a,function(a){a.style.display="block"}),a=document.querySelectorAll(".no_show_book"),[].forEach.call(a,function(a){a.style.display="none"}),a=document.querySelectorAll(".no_show_pdf"),[].forEach.call(a,function(a){a.style.display="none"}),
a=document.querySelectorAll(".show_web_page_only"),[].forEach.call(a,function(a){a.style.display="none"}),a=document.querySelectorAll(".noprint"),[].forEach.call(a,function(a){a.style.display="none"}),a=document.querySelectorAll(".show_if_js_only_no_show_pdf_book"),[].forEach.call(a,function(a){a.style.display="none"})):(a=document.querySelectorAll(".a_line_show_break_html"),[].forEach.call(a,function(a){a.style.display="block"}),a=document.querySelectorAll(".noprint"),[].forEach.call(a,function(a){a.style.display=
"block";a.className="align_center"}),a=document.querySelectorAll(".no_show_book"),[].forEach.call(a,function(a){a.style.display="block";a.className="the_chapter"}),a=document.querySelectorAll(".show_if_js_only_no_show_pdf_book"),[].forEach.call(a,function(a){a.style.display="block"}),a=document.querySelectorAll(".show_web_page_only"),[].forEach.call(a,function(a){a.style.display="block"}),a=document.querySelectorAll(".goog-te-gadget-simple"),[].forEach.call(a,function(a){a.style.marginTop="0";a.style.paddingTop=
"0";a.style.fontSize="large"}),a=document.querySelectorAll(".no_show_pdf"),[].forEach.call(a,function(a){a.style.display="inline"}))}document.onload=setAgent();
function isEven(b){return 0===b%2}function isOdd(b){return 1===Math.abs(b%2)}function numberWithCommas(b){return b.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")}
function calcNumerological(){for(var b=document.getElementById("txtWordSpell").value,d=0,a,e=0,c="";d<b.length;){a=0;switch(b.charAt(d).toLowerCase()){case "a":a=1;c+=a;break;case "b":a=2;c+=a;break;case "c":a=3;c+=a;break;case "d":a=4;c+=a;break;case "e":a=5;c+=a;break;case "f":a=6;c+=a;break;case "g":a=7;c+=a;break;case "h":a=8;c+=a;break;case "i":a=9;c+=a;break;case "j":a=1;c+=a;break;case "k":a=2;c+=a;break;case "l":a=3;c+=a;break;case "m":a=4;c+=a;break;case "n":a=5;c+=a;break;case "o":a=6;c+=
a;break;case "p":a=7;c+=a;break;case "q":a=8;c+=a;break;case "r":a=9;c+=a;break;case "s":a=1;c+=a;break;case "t":a=2;c+=a;break;case "u":a=3;c+=a;break;case "v":a=4;c+=a;break;case "w":a=5;c+=a;break;case "x":a=6;c+=a;break;case "y":a=7;c+=a;break;case "z":a=8,c+=a}e+=parseInt(a);d+1<b.length&&(c+=" + ");d+=1}c+=" = "+e.toString();b=e.toString();e=0;a=b.length;for(d=0;d<a&&1<a;)e+=parseInt(b.charAt(d)),d+2===a&&(c+=" = "+(e+parseInt(b.charAt(d+1)))),d+=1;e=b.toString();document.getElementById("numerological_value").innerHTML=
e;document.getElementById("numerological_formula").innerHTML=c}function calcEnergy(){var b=parseFloat(document.getElementById("txtFRF").value),d=parseFloat(document.getElementById("txtX").value);document.getElementById("energy").innerHTML=numberWithCommas(b-(b-d));document.getElementById("formula").innerHTML=numberWithCommas(b)+" - ( "+numberWithCommas(b)+" - "+numberWithCommas(d)+" )"}
function calcSpeeds(){var b=parseFloat(document.getElementById("txtDiameter").value),d=parseFloat(document.getElementById("txtRotation").value);b=b*Math.PI/(24*d);document.getElementById("rotation_speed").innerHTML=numberWithCommas(b.toFixed(3));b=parseFloat(document.getElementById("txtOrbitalDistance").value);d=parseFloat(document.getElementById("txtOrbitalPeriod").value);b/=24*d;document.getElementById("orbital_speed").innerHTML=numberWithCommas(b.toFixed(3))}
function presetCB(b){var d=7926.2109,a=.99726968,e=365,c=584E6;"1"===b&&(d=864575.9,a=25.379995,c=2*0x23c30f07dd50dc0*Math.PI,e=8833E7);"2"===b&&(d=3031.9186,a=58.646225,c=2237E5,e=87.97);"3"===b&&(d=7521.0769,a=243.0187,c=4225E5,e=224.7);"4"===b&&(d=7926.2109,a=.99726968,c=584E6,e=365);"5"===b&&(d=2159,a=27.321661,c=1499070,e=27.323);"6"===b&&(d=4217.246,a=1.02595675,c=888E6,e=686.98);"7"===b&&(d=88731.8063,a=.41007,c=3037E6,e=4330.6);"8"===b&&(d=74974.6481,a=.426,c=55659E5,e=10755.7);"9"===b&&(d=
31763.253,a=.71833,c=112013E5,e=30685);"10"===b&&(d=30775.272,a=.67125,c=175623E5,e=60190);document.getElementById("txtDiameter").value=d;document.getElementById("txtRotation").value=a;document.getElementById("txtOrbitalDistance").value=c;document.getElementById("txtOrbitalPeriod").value=e;calcSpeeds()}
function madnessMeter(){var b=6,d=6;var a=document.querySelectorAll('input[name="Universe"]');[].forEach.call(a,function(a){a.checked&&(b=parseInt(a.value,10),2===b&&(b=0))});a=document.querySelectorAll('input[name="God"]');[].forEach.call(a,function(a){a.checked&&(d=parseInt(a.value,10),2===d&&(d=0))});0===d&&0===b?document.getElementById("Madness_of_People").innerHTML="<span style='color: green;'>You are Sane</span>":0===d||0===b?6===d?document.getElementById("Madness_of_People").innerHTML="<span style='color: green;'>You are Sane, but I need you to answer the next question to make sure.</span>":
6===b?document.getElementById("Madness_of_People").innerHTML="<span style='color: green;'>You are Sane, but I need you to answer the previous question to make sure.</span>":document.getElementById("Madness_of_People").innerHTML="<span style='color: gold;'>You are between Sanity and Madness</span>":document.getElementById("Madness_of_People").innerHTML="<span style='color: red;'>You are Mad</span>"}window.onload=function(){calcSpeeds();calcEnergy()};