I currently have this jquery but it won’t work. if it helps my url is http://link-ads.blogspot.com/
the jquery also makes sure the href has http:// if not present in ?url=
<script type='text/javascript'>
var url = "document.location.href"
url = url.split('?url=')[1].split(/\?|\%3F/)[0];
if (url.indexOf('http://') == -1) url = 'http://' + url;
$("a#download").attr("href",url);
</script>
<a href="" id="download" class="button">continue</a>
I notice two issues
should be changed to
also before you do this line
url = url.split('?url=')[1].split(/\?|\%3F/)[0];you should make sure that this is possible with something like
if (url.indexOf("?url=") != -1 )otherwise you will get an exception because there won’t be a [1] element in the array