Created
July 12, 2013 12:09
-
-
Save kikegarcia/5983987 to your computer and use it in GitHub Desktop.
Replace "a href" with the actual real URL
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
var url = $(location).attr('href'); | |
var urlsplit = url.split("/"); | |
var urlname = urlsplit[5]; | |
$('a').each(function(){ | |
this.href = this.href.replace('.pag.', urlname); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment