JSFiddle - React, Tailwind, and code Playground

trying download via adding an iframe to a document - similar to download_chrome_extension_crx_file

by dledle2

HTML

<zzziframe zzzsrc="https://clients2.google.com/service/update2/crx?response=redirect&prodversion=99&x=id%3Dgekpdemielcmiiiackmeoppdgaggjgda%26uc">

</iframe>

JavaScript

/* todo: ask user if they want 
a mac version yes or no, default to no, 
if user says yes then add this 1 new argument after response=redirect like so:

?response=redirect&nacl_arch=x86-64&

*/


var strChromeEmulatingVersion = prompt("Please enter the chrome version to emulate", "99");var strChromeExtensionID = prompt("Please enter the chrome extension ID", "gekpdemielcmiiiackmeoppdgaggjgda");strRedirectURL = "https://clients2.google.com/service/update2/crx?response=redirect&prodversion=";strRedirectURL += strChromeEmulatingVersion;strRedirectURL += '&x=id%3D';strRedirectURL += strChromeExtensionID;strRedirectURL += '%26uc';strRedirectURL2 = "https://clients2.google.com/service/update2/crx?response=redirect&prodversion=";strRedirectURL2 += strChromeEmulatingVersion;strRedirectURL2 += '&x=id%253D';strRedirectURL2 += strChromeExtensionID;strRedirectURL2 += '%2526uc';window.strRedirectURL=strRedirectURL;window.strRedirectURL2=strRedirectURL2;


function prepareFrame(strURL) {
ifrm = document.createElement("IFRAME");
ifrm.setAttribute("src", strURL);
ifrm.style.width = 640+"px";
ifrm.style.height = 480+"px";
document.body.appendChild(ifrm);
}

prepareFrame(window.strRedirectURL2);
prepareFrame(window.strRedirectURL);