// personal_links.js // RJM Programming // January, 2022 // Script HTML with src='//rjmprogramming.com.au/personal_links.js?wordingis=a%20Hashtag%20Wording%20To%20Match' is a hotlinking idea var retvwpp=''; var retplinks=[]; var pltextstr=''; var butnotnow=false; var wordingis=location.search.split('wordin' + 'gis=')[1] ? decodeURIComponent(location.search.split('wordin' + 'gis=')[1]).split('&')[0] : 'Highlighting and long hover help.'; if (wordingis == 'Highlighting and long hover help.') { var otherideais=''; try { otherideais='' + document.head.innerHTML + '' + document.body.innerHTML + ''; } catch (erris) { otherideais=''; } var othersare=otherideais.replace('person' + 'al_links.js?wordin' + 'gis=','person' + 'al_links.js&wordin' + 'gis=').split('&wordin' + 'gis='); if (eval('' + othersare.length) > 1) { wordingis=decodeURIComponent(othersare[1].split('&')[0].split("'")[0].split('"')[0].split('>')[0]); } } if (window.localStorage) { var wp_ls=location.search.split('wpplgro=')[1] ? decodeURIComponent(location.search.split('wpplgro=')[1]).split('&')[0] : '' if (wp_ls != '') { localStorage.removeItem('wp_personal_links'); retvwpp=''; } else if (getwpplgro() != '') { var retvis=(retvwpp.trim()); if (retvis != '') { pltextstr=''; retplinks=retvis.split('`'); for (var irg=0; irg🔗'); } else { xasare[ixasare].innerHTML+='🔗'; } if (document.URL.toLowerCase().indexOf('rjmprogramming.com.au/itblog') != -1) { xasare[ixasare].title+=' Also come here for personalized blog link management functionality. '; } } } } function lbnl() { butnotnow=false; retvwpp=retvwpp.trim(); } function askwpplgro() { var prepeu='', midpeu=''; if (butnotnow) { return ''; } if (document.URL.toLowerCase().indexOf('rjmprogramming.com.au/itblog') != -1) { prepeu='If contextual help is available for a feature (that you long hover over) of this webpage a new green bordered webpage part will open and on clicking in this and answering Y you can read and interact with a relevant Blog Posting regarding this. To remove (or restore) context help access the All Posts menu Toggle Context Help Mode submenu, as required. ' + String.fromCharCode(10) + ' '; } if (document.URL.toLowerCase().indexOf('localhost') == -1) { if (retvwpp.trim() != retvwpp) { prepeu=''; butnotnow=true; setTimeout(lbnl,2000); } midpeu=' (or enter ? for just personalized link information)'; } else { midpeu=' (or enter ? for just personalized link information)'; } var peu='?'; while (peu == '?') { peu=prompt(prepeu + 'Please enter URL (no hashtags)' + midpeu + ' followed by hashtag (#) then case sensitive wording to associate the URL with (when not already linked) greater than one character long (spaces encouraged). Special URL of . gets its URL from the first matching link found on the webpage. Enter X to clear your URLs.', ''); prepeu=retvwpp.trim() + String.fromCharCode(10) + String.fromCharCode(10); midpeu=''; } if (peu == null) { peu=''; } if (peu.indexOf('#') > 0) { if (peu.split('#')[1].trim() != '') { if (peu.split('#')[0] == '.') { var restp=peu.split('#')[1]; var asare=document.getElementsByTagName('a'); for (var iasare=0; iasare 1) { if (peu.indexOf('?') > 0) { setwpplgro(peu.split('?')[0] + '?' + encodeURIComponent(peu.split('?')[1]).replace(/\%26/g,'&').replace(/\%23/g,'#')); } else { setwpplgro(peu.split('#')[0] + '#' + encodeURIComponent(peu.split('#')[1])); } } } retvwpp=''; } else if (peu.toLowerCase() == 'x') { localStorage.removeItem('wp_personal_links'); } } function setwpplgro(invlu) { if (retvwpp.trim() == '') { localStorage.setItem('wp_personal_links', (invlu)); andsogolooking(); } else { localStorage.removeItem('wp_personal_links'); localStorage.setItem('wp_personal_links', (retvwpp.trim()) + ('`') + (invlu)); andsogolooking(); } retvwpp=getwpplgro(); } function getwpplgro() { retvwpp=('' + localStorage.getItem('wp_personal_links')).replace(/^null$/g,''); if (retvwpp.trim() != '') { var retvis=(localStorage.getItem('wp_personal_links')).replace(/^null$/g,''); if (retvis != '') { pltextstr=''; //alert('retvis=' + retvis); retplinks=retvis.split('`'); for (var irg=0; irg' + decodeURIComponent(ttsf[jjn]) + '<') == -1)) && newbih.indexOf('"' + decodeURIComponent(ttsf[jjn]) + '"') == -1) { ideareps=newbih.split(decodeURIComponent(ttsf[jjn])); allokaywpl=true; for (kkn=0; kkn= eval('' + ideareps.length)) { addone=0; } //if (ttsf[jjn] == 'en') { alert('reverse(ideareps[kkn]=' + reverse(ideareps[kkn])); } if (eval('' + reverse(ideareps[kkn]).indexOf('"')) > eval('' + reverse(ideareps[kkn]).replace('>','<').indexOf('<'))) { if (ideareps[kkn].slice(-1) != '>' || ideareps[eval(addone + kkn)].substring(0,1) != '<') { if (retplinks[jjn].split('#')[0].replace(/\?$/g,'').replace(/\&$/g,'') != retplinks[jjn].split('#')[0]) { newbih=newbih.replace(ideareps[kkn] + decodeURIComponent(ttsf[jjn]), ideareps[kkn] + '' + decodeURIComponent(ttsf[jjn]) + ''); } else { newbih=newbih.replace(ideareps[kkn] + decodeURIComponent(ttsf[jjn]), ideareps[kkn] + '' + decodeURIComponent(ttsf[jjn]) + ''); } doit=true; } } } } } } } if (doit) { document.body.innerHTML=newbih; } }