You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
NewEduCoderBuild/js/public.js

25 lines
869 B

var iframe = document.createElement('iframe');
if (
document.domain === 'www.tokcoder.com' ||
document.domain === 'tokcoder.com'
) {
iframe.src = 'https://www.educoder.net/autologin.html?t=' + Date.now();
} else {
iframe.src = 'https://www.tokcoder.com/autologin.html?t=' + Date.now();
}
iframe.sandbox =
'allow-scripts allow-same-origin allow-top-navigation allow-forms allow-popups allow-pointer-lock allow-popups-to-escape-sandbox allow-presentation allow-top-navigation-by-user-activation';
iframe.allow = 'geolocation document-domain';
iframe.style.position = 'absolute';
iframe.style.top = '-1000px';
iframe.style.opacity = 0;
iframe.style.visibility = 'hidden';
iframe.style.zIndex = -1;
document.body.appendChild(iframe);
iframe.onload = function() {
iframe.contentWindow.postMessage(
{ type: 'cookie', data: document.cookie },
'*',
);
};