JSFiddle - React, Tailwind, and code Playground
download_chrome_extension_crx_file_v5c
by dledle2
HTML
<pre>download_chrome_extension_crx_file_v5c
note: added try catch to all 4 opening attempts and moved the 2nd method to be the last
method attempted (seems to make it so it works in both firefox and chrome with
this weird order and new try-catching)
</pre>
<!-- <iframe width="100%" height="300" src="//jsfiddle.net/publicshare/ub043d57/embedded/" allowfullscreen="allowfullscreen" frameborder="0"></iframe> // -->
JavaScript
javascript:function prepareFrame(strURL) {
var 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");
var strRedirectURL = "https://clients2.google.com/service/update2/crx?response=redirect&prodversion=";
strRedirectURL += strChromeEmulatingVersion;
strRedirectURL += '&x=id%3D';
strRedirectURL += strChromeExtensionID;
strRedirectURL += '%26uc';
var 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; */
/* try {var bkm_nw = window.open(window.strRedirectURL, ""); } catch(e){} */
/* above: similar to the 1st download/open URL attempt below but removed the window size, perhaps this is less like an advert now... */
try {var bkm_nw = window.open(window.strRedirectURL, "", "width=700,height=50"); } catch(e){} /* above: 1st download/open URL attempt */
try {prepareFrame(window.strRedirectURL); } catch(e){} /* above: 3rd download/open URL attempt */
try...