JSFiddle - React, Tailwind, and code Playground

download_chrome_extension_crx_file_v4

by dledle2

HTML

Hi

JavaScript

javascript: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);
}

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;

/* explanation for strRedirectURL2 URLencoded twice so that when it gets URLdecoded it still is in the format that i want  */

/* alert ("https://clients2.google.com/service/update2/crx?response=redirect&prodversion="    + strChromeEmulatingVersion +  '&x=id%253D'   +    strChromeExtensionID   + '%2526uc'  ) ; */

/*  alert ('%26uc' + strRedirectURL);  */

if (strChromeExtensionID.length != 32) {alert('length must be 32 for the chrome extension ID')  }
/* document.location=strRedirectURL; */


var bkm_nw=window.open(window.strRedirectURL, "", "width=700,height=50");
/* above: 1st download/open URL attempt */

document.location=strRedirectURL2;
/* above: 2nd download/open URL attempt */

prepareFrame(window.strRedirectURL);
/* above: 3rd download/open URL attempt */

prepareFrame(window.strRedirectURL2);
/* above: 4th download/open URL attempt */







/*
var bkm_nw=window.open(strRedirectURL, "", "width=200,height=50");
*/




/*

var bkm_url=strRedirectURL;
if (bkm_url!=null) {
    if...