Last active
December 15, 2021 06:12
-
-
Save mikka2061/c2e6f75a39c82251e5a75daa8f8a5ff7 to your computer and use it in GitHub Desktop.
Turn #tags into links
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function(){ | |
var link_entries = $('div.f-entry > p, div.f-entry > ul > li'); | |
if ( link_entries.length > 0 ) { | |
for (i = 0; i < link_entries.length; i = i + 1) { | |
link_entries[i].innerHTML = link_entries[i].innerHTML.replace(/ #(\S+)/g,' <a class="tagz" href="/tagged/$1" title="Find more posts tagged with #$1">#$1</a>'); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment