Created
September 15, 2016 03:05
-
-
Save nokimaro/eb6972f1aca2dbfa57d7ac3c5950d3bc 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
| var _parent = self, | |
| bSimple = false, | |
| popunder; | |
| if (top != self) { | |
| try { | |
| if (top.document.location.toString()) { | |
| _parent = top; | |
| } | |
| } | |
| catch(err) { } | |
| } | |
| popunder = _parent.window.open(url, '_pu123123123', window_params); | |
| if (popunder) { | |
| popunder.blur(); | |
| if (bSimple) { | |
| /* classic popunder, used for ie*/ | |
| window.focus(); | |
| try { opener.window.focus(); } | |
| catch (err) { } | |
| } | |
| else { | |
| /* popunder for e.g. ff4+, chrome */ | |
| popunder.init = function(e) { | |
| with (e) { | |
| (function() { | |
| // if (typeof window.mozPaintCount != 'undefined' || typeof navigator.webkitGetUserMedia === "function") { | |
| //var x = window.open('about:blank'); | |
| //x.close(); | |
| // } | |
| try { opener.window.focus(); } | |
| catch (err) { } | |
| })(); | |
| } | |
| }; | |
| popunder.params = { | |
| url: url | |
| }; | |
| popunder.init(popunder); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment