Skip to content

Instantly share code, notes, and snippets.

@inkarkat
Last active June 30, 2022 11:00
Show Gist options
  • Save inkarkat/cd1d40996a1f818dfc71 to your computer and use it in GitHub Desktop.
Save inkarkat/cd1d40996a1f818dfc71 to your computer and use it in GitHub Desktop.
javascript:(function%20(){/*%20https://gist.github.com/inkarkat/cd1d40996a1f818dfc71%20*/function%20ls(u,c){var%20h=document.getElementsByTagName("head")[0];var%20s=document.createElement("script");s.src=u;var%20d=false;s.onload=s.onreadystatechange=function%20(){if(!d&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){d=true;c();s.onload=s.onreadystatechange=null;h.removeChild(s);}};h.appendChild(s);}var%20$;var%20loc=location.href;var%20anchorPos=location.href.lastIndexOf('#');if(anchorPos>-1){loc=loc.substring(0,anchorPos);/*%20if%20already%20has%20an%20anchor,%20it%20needs%20to%20be%20replaced%20*/}function%20a(n,t){return%20'<a%20href="'+loc+'#'+n+'"%20title="'+t+':%20'+n+'"%20style="margin:0;padding:0;"><img%20src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGdSURBVDjLpVMxa8JAFL6rAQUHXQoZpLU/oUOnDtKtW/MDBFHHThUKTgrqICgOEtd2EVxb2qFkKTgVChbSCnZTiVBEMBRLiEmafleCDaWxDX3w8e7dve+7l3cv1LZt8h/jvA56vV7DNM20YRgE/jyRSOR+ytvwEgAxvVwui/BF+LTvCtjNwKvj/X8CbgXPOHMEZl559HsTu93uPQi7jBiNRgMEx8PR0GIxRB+y2eze2gqQeAXoSCaqqu5bpsWIdyzGvvRrBW7rdDo2I6ZSKeq7B8x0XV/bwJWAJEnHSMwBDUEQWq5GfsJthUJhlVuv11uckyiGgiH2RWK73RYRb2cymbG7gnK5vIX9USwWI1yAI/KjLGK7teEI8HN1TizrnZWdRxxsNps8vI3YLpVKbB2EWB6XkMHzgAlvriYRSW+app1Mpy/jSCRSRSyDUON5nuJGytaAHI/vVPv9p/FischivL96gEP2bGxorhVFqYXDYQFCScwBYa9EKU1OlAkB+QLEU2AGaJ7PWKlUDiF2BBw4P9Mt/KUoije+5uAv9gGcjD6Kg4wu3AAAAABJRU5ErkJggg%3D%3D"%20/></a>';}ls("//ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js",function%20(){$=jQuery;$("a[name]").each(function%20(i){$(a(this.name,"NAME")).insertBefore(this.nextSibling);});$("[id]:not(input[type='hidden'])").each(function%20(i){switch(this.nodeName){case'TD':$(this).prepend(a(this.id,"ID"));break;default:$(a(this.id,"ID")).insertBefore(this.nextSibling);}});});})()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment