I'm trying to make a Greasemonkey script that will redo the listing on the right hand side of the page so they list from A - Z no matter how they may be laid out to begin with.
The site is http://ustvgo.tv/ and the relevant HTML is:
<div id="recent-posts-3" class="mh-widget widget_recent_entries">
<h4 class="mh-widget-title"><span class="mh-widget-title-inner">Recent Posts</span></h4>
<ul>
<li><a href="http://ustvgo.tv/fox-sports-1/">Fox Sports 1</a></li>
<li><a href="http://ustvgo.tv/disneyxd/">DisneyXD</a></li>
<!-- etc. -->
</ul>
</div>
The <a>
nodes have no ID's or subclasses.
I've got it to pull the text part of the link and to add it to a split array where the white spaces are but I for the life of me can't get it to spit out that array with the numbering so that I can add a new ID in front of the link text and still have the link text be the same as it was.
I.E. <a href="http://ustvgo.tv/fox-sports-1/">Fox Sports 1</a>
would become <a href="http://ustvgo.tv/fox-sports-1/">ID="name" Fox Sports 1</a>
that way I can have the script just sort the list by the name ID text A - Z.
How can I sort that list?