47d46 < var ck=false; 57,60d55 < var prevs=''; < var overallq=""; < var overallm=""; < var overalla=""; 114,123d108 < function getask() { < qs=eval("[" + overallq + "]"); < os=eval("[" + overallm + "]"); < as=eval("[" + overalla + "]"); < //alert(qs); < //alert(os); < //alert(as); < pickq(); < } < 125,143d109 < if (!ck) { < ck=true; < if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) { < document.getElementById('answer').onchange=function() { twoanswer(); }; < } < document.getElementById('resa').href=document.URL.split('#')[0].split('?')[0]; < if (window.localStorage) { < if (('' + window.localStorage.getItem("dykquiz")).replace('undefined','').replace('null','') != '') { < var bigqa=decodeURIComponent(window.localStorage.getItem("dykquiz")); < var bqs=bigqa.split('"^"'); < if (bqs.length >= 3) { < overallq=bqs[0] + '"'; < overallm='"' + bqs[1] + '"'; < overalla='"' + bqs[2]; < document.getElementById('smode').innerHTML=""; < } < } < } < } 149c115 < if (eval('' + qs.length) > 1) { lastq=apick; } --- > lastq=apick; 268,270d233 < function twoanswer() { < oneanswer(document.getElementById('answer')); < } 383,441d345 < function ask() { < var cnt=0; < var theq=" ", cdelimq=""; < var them=" ", cdelimm=""; < var thea=" ", cdelima=""; < overallq=""; < overallm=""; < overalla=""; < while (theq != "" && them != "" && thea != "") { < if (qs.length > cnt) { < theq=prompt("Enter question(s) (delimited by |) for set " + eval(1 + cnt), qs[cnt]); < } else { < theq=prompt("Enter question(s) (delimited by |) for set " + eval(1 + cnt), ""); < } < if (!theq) { theq=""; } < if (theq != '') { < if (os.length > cnt) { < them=prompt("Enter full list of choices using comma delimitation " + eval(1 + cnt), os[cnt]); < } else { < them=prompt("Enter full list of choices using comma delimitation " + eval(1 + cnt), ""); < } < if (!them) { them=""; } < } < if (theq != '' && them != '') { < if (as.length > cnt) { < thea=prompt("Enter full list of correct answer (using padded comma delimitation where order does not matter) set(s) (delimited by |) " + eval(1 + cnt), as[cnt]); < } else { < thea=prompt("Enter full list of correct answer (using padded comma delimitation where order does not matter) set(s) (delimited by |) " + eval(1 + cnt), ""); < } < if (!thea) { thea=""; } < } < if (theq != "" && them != "" && thea != "") { < overallq+=cdelimq + '"' + theq + '"'; < overallm+=cdelimq + '"' + them + '"'; < overalla+=cdelimq + '"' + thea + '"'; < cdelimq=","; < cdelimm=","; < cdelima=","; < cnt++; < } < } < if (overallq != "" && overallm != "" && overalla != "") { < //alert(1); < if (window.localStorage) { < //alert(11); < if (('' + window.localStorage.getItem("dykquiz")).replace('undefined','').replace('null','') != '') { < window.localStorage.removeItem("dykquiz"); < window.localStorage.setItem("dykquiz", encodeURIComponent(overallq + '^' + overallm + '^' + overalla)); < } else { < window.localStorage.setItem("dykquiz", encodeURIComponent(overallq + '^' + overallm + '^' + overalla)); < } < } < location.href=document.URL.split('#')[0].split('?')[0]; < } < if (document.getElementById('sdyk')) { < document.getElementById('sdyk').value=prevs; < } < } < 445,446c349,350 <