20,21d19 < var ajfval=false; < var usefetch=true; 28,41d25 < < if (('' + location.hash).indexOf('allthreeajax') != -1) { < toggleval=Math.abs(toggleval); < ajfval=false; < usefetch=false; < } else if (('' + location.hash).indexOf('=ajax') != -1) { < toggleval=-1; < ajfval=true; < usefetch=false; < } else { < toggleval=-1; < ajfval=true; < usefetch=true; < } 43d26 < setInterval(recheck, 1000); 46,72d28 < async function url2cont(url) { // thanks to https://stackoverflow.com/questions/44070437/how-to-get-a-file-or-blob-from-an-url-in-javascript < try { < const data = await fetch(url); < //bappendis.innerHTML+='
url2cont ' + (' ' + bjsiind + '.' + bjsitrs.length).substring(0,1) + ' at ' + ('' + new Date()) + '
'; < consolelog("Success."); < } catch (err) { < console.error(err.name, err.message); < } < } < < < function recheck() { < if (('' + location.hash).indexOf('allthreeajax') != -1) { < toggleval=Math.abs(toggleval); < ajfval=false; < usefetch=false; < } else if (('' + location.hash).indexOf('=ajax') != -1) { < toggleval=-1; < ajfval=true; < usefetch=false; < } else { < toggleval=-1; < ajfval=true; < usefetch=true; < } < } < 84d39 < if (toggleval >= 0) { 94,96d48 < } else { < jsajaxit(); < } 152c104 < bappendis.innerHTML+='Finishing ' + (usefetch ? 'Fetch' : 'Ajax fast') + ' at ' + (' ' + bjsiind + '.' + bjsitrs.length).substring(0,1) + ' at ' + ('' + new Date()) + '
'; --- > bappendis.innerHTML+='Finishing Ajax fast' + (' ' + bjsiind + '.' + bjsitrs.length).substring(0,1) + ' at ' + ('' + new Date()) + '
'; 168c120 < bappendis.innerHTML+='Finishing ' + (usefetch ? 'Fetch' : 'Ajax fast') + ' at ' + (' ' + bjsiind + '.' + bjsitrs.length).substring(0,1) + ' at ' + ('' + new Date()) + '
'; --- > bappendis.innerHTML+='Finishing Ajax fast' + (' ' + bjsiind + '.' + bjsitrs.length).substring(0,1) + ' at ' + ('' + new Date()) + '
'; 200c152 < bappendis.innerHTML+='Starting ' + (usefetch ? 'Fetch' : 'Ajax fast') + ' at ' + ('' + new Date()) + '
'; --- > bappendis.innerHTML+='Starting Ajax fast at ' + ('' + new Date()) + '
'; 207d158 < if (toggleval >= 0) { 217,219d167 < } else { < bjsajaxit(); < } 230c178 < } else if (toggleval >= 0) { --- > } else { 237,238d184 < } else if (usefetch) { < bappendis.innerHTML+='url2cont ' + (' ' + bjsiind + '.' + bjsitrs.length).substring(0,1) + ' at ' + ('' + new Date()) + '
'; 240c186 < bappendis.innerHTML+='bjsajaxit ' + (' ' + bjsiind + '.' + bjsitrs.length).substring(0,1) + ' at ' + ('' + new Date()) + '
'; --- > bappendis.innerHTML+='bjsajaxit ' + bjsiind + '.' + bjsitrs.length + ' at ' + ('' + new Date()) + '
'; 251c197 < ajclears[0]=ajfval; //false; --- > ajclears[0]=false; 260,262d205 < if (usefetch) { < url2cont('/HTMLCSS/sleep.php?n=0'); < } else { 270c213 < ajclears[1]=ajfval; //false; --- > ajclears[1]=false; 278d220 < } 294c236 < } else if (toggleval >= 0) { --- > } else { 302,304d243 < if (usefetch) { < url2cont('/HTMLCSS/sleep.php?n=0'); < } else { 312c251 < ajclears[1]=ajfval; //false; --- > ajclears[1]=false; 319d257 < } 332c270 < ajclears[0]=ajfval; //false; --- > ajclears[0]=false;