// hashtag_and_a_bit.js // RJM Programming // November, 2021 // Help out Hashtag Position Less a Bit var firstlfh=''; var dgbiv='-40'; function lfh() { if (1 == 1) { var thish=('' + location.hash); if (thish != firstlfh) { firstlfh=thish; //alert(thish); if (firstlfh.split('#').length > 2) { if (firstlfh.split('#andabit').length == 2) { window.scroll(0, 0); var rect=document.getElementById(firstlfh.split('#')[1].split('#')[0]).getBoundingClientRect(); if (('' + rect.top) != '') { var newtop=eval(('' + rect.y)); //y)); newtop+=eval('' + dgbiv); //document.getElementById('i1').value); window.scroll(0, newtop); } } } else if (thish.indexOf('#content') != -1) { //firstlfh=thish; window.scroll(0, 0); var rect=document.getElementById(thish.split('#')[1].split('#')[0]).getBoundingClientRect(); if (('' + rect.top) != '') { console.log('rect.y=' + rect.y); var newtopc=eval(('' + rect.y)); //y)); newtopc-=eval('30'); //document.getElementById('i1').value); console.log('newtopc=' + newtopc); window.scroll(0, newtopc); } } } } } setInterval(lfh, 1000);