Created
November 21, 2017 03:30
-
-
Save jarvis657/aa91049da30cf6f3812430339f47763e to your computer and use it in GitHub Desktop.
点击防历史回退
This file contains hidden or 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
(function () { | |
if (top.location != self.location) { | |
return false; | |
} | |
var tu = unescape(self.location); | |
if (htmlspecialchars(tu).length != tu.length) { | |
exit; | |
} | |
if (tu && ((tu.indexOf("http://union-click.jd.com/") === 0) || (tu.indexOf("https://union-click.jd.com/") === 0))) { | |
if (!window.attachEvent) { | |
document.write('<input style="display:none" type="button" id="exe" value="" onclick="window.location=\'' + hrl + '\'">'); | |
document.getElementById('exe').click(); | |
} else { | |
document.write('<a style="display:none" href="' + hrl + '" id="exe"></a>'); | |
document.getElementById('exe').click(); | |
} | |
} | |
})(hrl) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment