This had to be simple java-script, so a quick search on the internet returned me a 2011 Blog post by “Alexander Bautx” which works “AS-IS”. I had to just replace the single-quotes (‘) by deleting and inserting it back again for all of it’s existence, and that’s it. Probably it was due to the copy-paste formatting issue. I have highlighted the change below, which appears at 4 places in his code.
But this was awesome!! Kudos to Alexander.
Note: You may not need the first line reference for the jquery, if you already have it in your master page.
$(this).find("a:last")[0].nextSibling.nodeValue = '';