This is a quick test of a few Links to test copying bookmarklets (Javascript:) links and then sorting on Link Text. Will need to make sure links still work after being copied. Any failures will probably involve double/single quotes or ampersands. Test with "select_links" from https://www.squarefree.com/bookmarklets/pagelinks.html which does not sort the link text. Type "javascript:" (w/o quotes)into request or leave blank to pick up all links.  Only picks up Link text (visible) and the url as the link but can't do anything with the output since it is a "Chrome page" about:blank. Goal is to copy all attribues in the anchor and sort them by visible link text.

Test first with: domains:, href:, brj:, parentips:,   comments:, src:, wrap:, and then bml:

Reset:  Reset (F5)

Text and Links: 

Debugging:  revealtags: (Reveal All Tags)
HTML Debug:  rvHTML: Reveal HTML comments) 

Style (appearance): bml:  bml#:  bmlx:  bold: brj: 

 

**** "bold:" use of bold tag (<B>) has been replaced by the strong tag (<STRONG>), only "Reset" above in this test is using the bold tag.

Additional tests: (an HTML comment can be revealed by "rvHTML")
Highlight links:

javascript:for%28i=0;i%3Cdocument.all.length;i++%29%7Bif%28document.all[i].tagName==%27A%27%29%7Bwith%28document.all[i].style%29%7Bif%28backgroundColor==%27yellow%27%29%7Bvoid%28backgroundColor=document.bgColor%29%7Delse%7Bvoid%28backgroundColor=%27yellow%27%29%7D%7D%7D%7D
bold (highlight bold in yellow)
javascript:if(frames.length>1)alert('This / bookmarklet does not work with frames.');else{var lnks=(document.all)?document.all.tags('B'):document.getElementsByTagName('B');for (nIx5Bs=0;nIx5Bs


search links from squarefree.com/bookmarklets/pagelinks.html
"javascript:(function(){var x,n,nD,z,i; function htmlEscape(s){s=s.replace(/&/g,'&amp;');s=s.replace(/>/g,'&gt;');s=s.replace(/</g,'&lt;');return s;} function attrQuoteEscape(s){s=s.replace(/&/g,'&amp;'); s=s.replace(/"/g, '&quot;');return s;} x=prompt("show links with this word/phrase in link text or target url (leave blank to list all links):", ""); n=0; if(x!=null) { x=x.toLowerCase(); nD = window.open().document; nD.writeln('<html><head><title>Links containing "'+htmlEscape(x)+'"</title><base target="_blank"></head><body>'); nD.writeln('Links on <a href="'+attrQuoteEscape(location.href)+'">'+htmlEscape(location.href)+'</a><br> with link text or target url containing &quot;' + htmlEscape(x) + '&quot;<br><hr>'); z = document.links; for (i = 0; i < z.length; ++i) { if ((z[i].innerHTML && z[i].innerHTML.toLowerCase().indexOf(x) != -1) || z[i].href.toLowerCase().indexOf(x) != -1 ) { nD.writeln(++n + '. <a href="' + attrQuoteEscape(z[i].href) + '">' + (z[i].innerHTML || htmlEscape(z[i].href)) + '</a><br>'); } } nD.writeln('<hr></body></html>'); nD.close(); } })();"

partial source from squarefree.com/bookmarkets/webdevel.html -- partial source
"javascript:function getSelSource() { x = document.createElement("div"); x.appendChild(window.getSelection().getRangeAt(0).cloneContents()); return x.innerHTML; } function makeHR() { return nd.createElement("hr"); } function makeParagraph(text) { p = nd.createElement("p"); p.appendChild(nd.createTextNode(text)); return p; } function makePre(text) { p = nd.createElement("pre"); p.appendChild(nd.createTextNode(text)); return p; } nd = window.open().document; ndb = nd.body; if (!window.getSelection || !window.getSelection().rangeCount || window.getSelection().getRangeAt(0).collapsed) { nd.title="Generated Source of: " + location.href; ndb.appendChild(makeParagraph("No selection, showing generated source of entire document.")); ndb.appendChild(makeHR()); ndb.appendChild(makePre("<html>\n" + document.documentElement.innerHTML + "\n</html>")); } else { nd.title="Partial Source of: " + location.href; ndb.appendChild(makePre(getSelSource())); }; void 0"


topographic view from squarefree.com/bookmarklets/webdevel.html
"javascript:(function(){var s="body",c="",I=" ! important;",i,b,f,x,h; for(i=0;i<17;++i) { x = i.toString(16); b = i>15?"FCC":x+x+x; f = i>9?"000":"FFF"; c += s + " {background: #" + b + I + "border-color: #" + b + I + "color: #" + f + I + "}\n"; s += " *"; } if(document.createStyleSheet) { document.createStyleSheet("javascript:'"+c+"'"); } else { h=document.createElement('link'); h.rel='stylesheet'; h.href='data:text/css,'+escape(c); document.getElementsByTagName("head")[0].appendChild(h);}})()"
Note all " within initial and last are actually &quot; all < are &lt; and all > are &gt; Created 2024-03-05 as a test subset from bookmarklets (bml) page 10:45PM