Skip to content

Instantly share code, notes, and snippets.

@scottbw
Created January 31, 2011 10:08
Show Gist options
  • Save scottbw/803849 to your computer and use it in GitHub Desktop.
Save scottbw/803849 to your computer and use it in GitHub Desktop.
This script adds a "download.crx" link on the Chrome Web Store when you navigate to an app details page.
// ==UserScript==
// @name Chrome Web App Download
// @namespace http://www.getwookie.org/crx
// @description Adds download links to the Chrome Web Store so you can get the source code and metadata for Chrome Web Apps
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js
// ==/UserScript==
// By Scott Wilson <[email protected]>
//
// This script adds a "download.crx" link on the Chrome Web Store when you navigate to an app details page.
// The .CRX file can be opened in 7Zip so you can play around with the code and metadata, or convert it into
// a W3C Widget or other standard packaged webapp format.
$(document).ready(function(){
pathArray = window.location.pathname.split( '/' );
appId = pathArray[3];
downloadUrl="https://clients2.google.com/service/update2/crx?response=redirect&x=id%3DREPLACEME%26uc%26lang%3Den&prod=chrome&prodversion=5.0.375.99";
downloadUrl=downloadUrl.replace("REPLACEME",appId);
$("#cx-install-free-btn").hide();
$("#cx-install-free-btn").parent().append("<a href='"+downloadUrl+"'><span class='detail-action-btn' id='cx-download'>Download .crx</span></a>");
});
@dSeeder
Copy link

dSeeder commented Feb 12, 2014

Where it should be pasted?

@fuzzyroddis
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment