(function() { var head = document.getElementsByTagName( 'head' )[ 0 ]; var meta = document.createElement( 'meta' ); meta.name = 'referrer'; meta.content = 'no-referrer-when-downgrade'; head.appendChild( meta ); var script = document.getElementById( 'widget-script-1688720687143' ); var URL = (window.location.search === '') ? script.getAttribute( 'embed-url' ) : script.getAttribute( 'embed-url' ) + window.location.search; var parent = script.parentNode; var overflowWrapper = document.createElement( 'div' ); var wrapper = document.createElement( 'div' ); var frame = document.createElement( 'iframe' ); frame.referrerPolicy = 'unsafe-url'; frame.setAttribute('name', 'widget-iframe-1688720687143'); var broughtToYou = document.createElement( 'footer' ); var parse_url = /^(?:([A-Za-z]+):)?(\/{0,3})([0-9.\-A-Za-z]+)(?::(\d+))?(?:\/([^?#]*))?(?:\?([^#]*))?(?:#(.*))?$/;; var parts = parse_url.exec( URL ); var paesResult = parts[ 1 ] + ':' + parts[ 2 ] + parts[ 3 ] + '/'; var mainDomain = paesResult ? paesResult : 'https://app.millionmind.com/'; overflowWrapper.className = 'overflowWrapper'; wrapper.className = 'wrapper'; var isMobile = mobileCheck(); try { var heightContainer = ( script.hasAttribute( 'hide-copyright' ) === false && !isMobile ) ? 'calc(100vh - 23px);' : '100vh;'; if ( ( script.hasAttribute( 'height' ) || script.hasAttribute( 'width' ) ) && !isMobile ) { var height = script.getAttribute( 'height' ); var width = script.getAttribute( 'width' ); var printWith = parseInt( width ) + '%'; var printHeight = height ? parseInt( height ) + 65 + 'px' : heightContainer ; overflowWrapper.style.cssText = 'margin: 0 auto;' + 'display:flex;'+ 'justify-content:center;'+ 'align-items:center;'+ 'flex-direction:column;'+ 'position:relative;'+ 'width:'+ printWith + ';'+ 'height:' + printHeight + ';'; wrapper.style.cssText = 'position:relative;' + 'display:block;'+ 'width: 100%;'+ 'overflow: auto;'+ 'height:100%;' ; } else { var printHeight = height ? parseInt( height ) + 65 + 'px' : heightContainer ; overflowWrapper.style.cssText = 'display:flex;'+ 'justify-content:center;'+ 'align-items:center;'+ 'flex-direction:column;'+ 'position:relative;'+ 'height:'+ printHeight +';'; wrapper.style.cssText = 'position: relative; '+ 'width: 100%;'+ 'overflow: auto;'+ 'height:100%;' ; } if ( script.hasAttribute( 'border-radius' ) && !isMobile ) { var borderRadius = script.getAttribute( 'border-radius' ) ; overflowWrapper.style.cssText = overflowWrapper.style.cssText + 'border-radius:' + borderRadius +';'; wrapper.style.cssText = wrapper.style.cssText + 'border-bottom-left-radius:' + borderRadius + ';' + 'border-bottom-right-radius:' + borderRadius + ';' ; } if ( script.hasAttribute( 'border-width' ) && !isMobile ) { var borderWidth = script.getAttribute( 'border-width' ) ; overflowWrapper.style.cssText = overflowWrapper.style.cssText + 'border-style: solid; box-sizing: content-box;'+ 'border-width:'+ borderWidth + ';'; } if ( script.hasAttribute( 'border-color' ) && !isMobile ) { var borderColor = script.getAttribute( 'border-color' ); overflowWrapper.style.cssText = overflowWrapper.style.cssText + 'border-color:' + borderColor +';' ; } if ( script.hasAttribute( 'box-shadow' ) && !isMobile ) { overflowWrapper.style.cssText = overflowWrapper.style.cssText + 'box-shadow: 8px 8px 11px 1px rgba(0, 0, 0, 0.5);'; } broughtToYou.innerHTML = 'Powered by: ' + 'Playerence'; broughtToYou.style.cssText = 'display: flex;' + 'justify-content: center;' + 'align-items: center;' + 'font-size: 10px;' + 'padding: 3px;' + 'background: transparent;' + 'height: 20px'; frame.src = URL; frame.width = '100%'; frame.height = '100%'; frame.style.cssText = 'position: absolute;' + ' top: 0;' + ' right: 0;' + ' border: none;' + ' overflow:auto;' + ' margin: 0!important;' + ' padding: 0!important;' + ' opacity: 1!important'; if ( isFacebookApp() ) { var facebookBrowserRedirect = document.createElement( 'a' ); var embedUrl = script.getAttribute( 'embed-url' ) + '/?fromFacebookEmbed=true'; facebookBrowserRedirect.setAttribute( 'href', embedUrl ); facebookBrowserRedirect.className = 'facebookBrowserRedirect'; facebookBrowserRedirect.style.cssText = '' + 'position: absolute;' + 'top: 0;' + 'left: 0;' + 'z-index: 999;' + 'opacity:0;'; wrapper.appendChild( facebookBrowserRedirect ); } } catch ( e ) { wrapper.innerText = 'This quiz is not supported in your current browser, please try another one.'; wrapper.style.textAlign = 'center'; } parent.appendChild( overflowWrapper ); overflowWrapper.appendChild( wrapper ); if ( script.hasAttribute( 'hide-copyright' ) === false && !isMobile ) { overflowWrapper.appendChild( broughtToYou ); } wrapper.appendChild( frame ); adaptPadding(); window.addEventListener( 'resize', function () { adaptPadding(); } ); function adaptPadding() { var windowHeight = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight; var windowWidth = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth; var parentWidth = 0; var paddingTop = 0; try { parentWidth = window.getComputedStyle( parent, null ).getPropertyValue( 'width' ); } catch ( e ) { parentWidth = parent.currentStyle.width; } if ( parseInt( parentWidth ) <= windowWidth ) { if ( parseInt( parentWidth ) <= 420 ) { overflowWrapper.style.width = windowWidth + 'px'; var height = script.getAttribute( 'height' ); var printHeight = height ? parseInt( height ) + 'px' : 'calc(100vh - 16px)'; if ( overflowWrapper.getBoundingClientRect().x > 0 ) { overflowWrapper.style.width = 'auto'; overflowWrapper.style.height = printHeight ; } } paddingTop = ( windowHeight * 0.9 ) / parseInt( parentWidth ) * 90 + '%'; } else { paddingTop = windowHeight / windowWidth * 100 + '%'; } if ( isFacebookApp() ) { paddingTop = ( screen.height * 0.8 ) / screen.width * 90 + '%'; wrapper.style.paddingTop = paddingTop; if ( !script.hasAttribute( 'height' ) || isMobile ) { wrapper.style.paddingTop = paddingTop; } } } function generateCookie() { var is_safari = navigator.userAgent.indexOf( 'Safari' ) > -1; var is_chrome = navigator.userAgent.indexOf( 'Chrome' ) > -1; if ( ( is_chrome ) && ( is_safari ) ) { is_safari = false; } if ( is_safari ) { const hasFixedCookie = checkCookie( 'fixed' ); if ( !hasFixedCookie ) { document.cookie = 'fixed=fixed; expires=Tue, 19 Jan 2038 03:14:07 UTC; path=/'; window.location.replace( mainDomain + 'cookieGenerator' ); } } } function getCookie( cname ) { var name = cname + '='; var ca = document.cookie.split( ';' ); for ( var i = 0 ; i < ca.length ; i++ ) { var c = ca[ i ]; while ( c.charAt( 0 ) == ' ' ) { c = c.substring( 1 ); } if ( c.indexOf( name ) == 0 ) { return c.substring( name.length, c.length ); } } return ''; } function checkCookie( cname ) { var user = getCookie( cname ); return user != ''; } function mobileCheck() { let mobile = false; ( function ( a ) { if ( /(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test( a ) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test( a.substr( 0, 4 ) ) ) mobile = true; } )( navigator.userAgent || navigator.vendor || window.opera ); return mobile; } function isFacebookApp() { var ua = navigator.userAgent || navigator.vendor || window.opera; return ( ua.indexOf( 'FBAN' ) > -1 ) || ( ua.indexOf( 'FBAV' ) > -1 ); } })();