Created
June 28, 2018 22:08
-
-
Save kary4/a1c3db284ccadd872ae4edfe9c3f7105 to your computer and use it in GitHub Desktop.
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
<script> | |
jQuery( document ).ready(function() { | |
jQuery('.post-meta').each(function(){ | |
var thisTime = jQuery(this).find('.published').html(); | |
var thisCat = jQuery(this).find('a[rel="category tag"]').html(); | |
thisCat = thisCat.replace(/,/g,''); | |
var thisAuthor = jQuery(this).find('.author.vcard').html(); | |
jQuery(this).find('.published').remove(); | |
jQuery(this).find('a[rel="category tag"]').remove(); | |
jQuery(this).find('.author.vcard').remove(); | |
jQuery(this).wrapInner('<span class="comments"></span>'); | |
var thisComments = jQuery(this).find('.comments').html(); | |
var thisMeta = jQuery(this).html(); | |
var thisMetaNew = 'Posted on ' + thisTime + 'by Stefanni in ' + thisAuthor + ' ' + thisCat + ' ' + thisComments; | |
thisMetaNew = thisMetaNew.replace(/por/g,' '); | |
thisMetaNew = thisMetaNew.replace(/ \| \| /g,' '); | |
jQuery(this).html(thisMetaNew); | |
}); | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment