ehm
Hi all
i was using a code to redirect post links in a good way actually
like
u'll be redirected to the link in 5 secs and here's the code
and here's the java code for it
so the problem is
the code opens the post link in the same page
i was wondering if there's anyways to make it opens in a new window ?
Hi all
i was using a code to redirect post links in a good way actually
like
u'll be redirected to the link in 5 secs and here's the code
and here's the java code for it
- Code:
$(function () {
$(".post-entry a").not("a[href$='.jpg'],a[href$='.jpeg'],a[href$='.png'],a[href$='.gif'],a[href$='.bmp'],a[href^='/'],a[href^='" + location.origin + "']").click(function (a) {
a.preventDefault();
a = location.href;
var b = this.href;
z = "/redirect/?url=" + encodeURIComponent(b);
window.history && history.pushState ? history.pushState({}, "Redirecting...", z) : location.hash = z;
var d, c = 5;
$("#main-content").html('<div id="redirects"><h3>Redirecting...</h3><p class="redirectMess">You are preparing to leave <strong>' +
document.title + '</strong>and move to the path: <strong><a href="' + b + '" rel="nofollow">' + b + '</a></strong>within <strong><span class="delayTime">' + c + '</span></strong>more seconds ... You want to make sure that this path is not?</p><div class="redirectFooter"><ul class="redirectButtons"><li><a class="cancel" href="' + a + '">back</a></li><li><a href="' + b + '" class="redirectSkip forward" rel="nofollow">continue (<span class="delayTime">' +
c + "</span>)</a></li></ul></div></div>");
d = setInterval(function () {
var a = c--;
0 > a ? window.location = b : $(".delayTime").text(a)
}, 1E3);
$(".redirectButtons a").click(function () {
clearInterval(d)
})
})
});
so the problem is
the code opens the post link in the same page
i was wondering if there's anyways to make it opens in a new window ?
Last edited by neos on July 19th 2016, 11:00 am; edited 1 time in total