var isInIframe = (parent !== window), parentUrl = null; if (isInIframe) { parentUrl = document.referrer; }
Spin Again