1"use strict"; 2 3$.ajaxSettings.async = false; 4const jsonNameList = ["twistsAlgToInfo"]; 5const jsonLoaded = jsonNameList.map((name) => $.getJSON(`assets/json/${name}.json`, (json) => { 6 window[`${name}`] = json; 7})); 8 9function algSearch() { 10 let idValue = ""; 11 if (document.getElementById("cornerinput3").value === "cw") { 12 idValue = `${idValue}C`; 13 } 14 if (document.getElementById("cornerinput3").value === "ccw") { 15 idValue = `${idValue}B`; 16 } 17 if (document.getElementById("cornerinput4").value === "cw") { 18 idValue = `${idValue}F`; 19 } 20 if (document.getElementById("cornerinput4").value === "ccw") { 21 idValue = `${idValue}E`; 22 } 23 if (document.getElementById("cornerinput2").value === "cw") { 24 idValue = `${idValue}I`; 25 } 26 if (document.getElementById("cornerinput2").value === "ccw") { 27 idValue = `${idValue}H`; 28 } 29 if (document.getElementById("cornerinput1").value === "cw") { 30 idValue = `${idValue}L`; 31 } 32 if (document.getElementById("cornerinput1").value === "ccw") { 33 idValue = `${idValue}K`; 34 } 35 if (document.getElementById("cornerinput7").value === "cw") { 36 idValue = `${idValue}N`; 37 } 38 if (document.getElementById("cornerinput7").value === "ccw") { 39 idValue = `${idValue}M`; 40 } 41 if (document.getElementById("cornerinput8").value === "cw") { 42 idValue = `${idValue}Q`; 43 } 44 if (document.getElementById("cornerinput8").value === "ccw") { 45 idValue = `${idValue}P`; 46 } 47 if (document.getElementById("cornerinput6").value === "cw") { 48 idValue = `${idValue}T`; 49 } 50 if (document.getElementById("cornerinput6").value === "ccw") { 51 idValue = `${idValue}S`; 52 } 53 if (document.getElementById("cornerinput5").value === "cw") { 54 idValue = `${idValue}Z`; 55 } 56 if (document.getElementById("cornerinput5").value === "ccw") { 57 idValue = `${idValue}Y`; 58 } 59 const div1 = document.getElementById("div1"); 60 if (twistsAlgToInfo.hasOwnProperty(idValue)) { 61 const rows = twistsAlgToInfo[idValue].length; 62 let tab = `<table id="table"><thead><tr><th>${arrLang[lang]["no"]}</th><th>${arrLang[lang]["algorithm"]}</th><th>${arrLang[lang]["thumbPosition"]}</th></tr></thead><tbody>`; 63 if (idValue.length === 2) { 64 tab = `<table id="table"><thead><tr><th>${arrLang[lang]["no"]}</th><th>${arrLang[lang]["algorithm"]}</th><th>${arrLang[lang]["commutator"]}</th><th>${arrLang[lang]["thumbPosition"]}</th></tr></thead><tbody>`; 65 } 66 for (let i = 0; i < rows; i++) { 67 tab += "<tr>"; 68 tab += `<td>${i + 1}</td>`; 69 tab += `<td>${twistsAlgToInfo[idValue][i]}</td>`; 70 if (idValue.length === 2) { 71 tab += `<td>${commutator(twistsAlgToInfo[idValue][i])}</td>`; 72 } 73 tab += `<td>${fingerbeginfrom(twistsAlgToInfo[idValue][i])}</td>`; 74 tab += "</tr>"; 75 } 76 tab += "</tbody></table>"; 77 div1.innerHTML = tab; 78 } else { 79 div1.innerHTML = ""; 80 } 81 const r = $("#table").width() / $("#div1").width(); 82 if (r > 1) { 83 $("#table").css("font-size", 16 / r); 84 } 85}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.