crx DL link
@@ -1,6 +1,7 @@
/*
- * @title chrome web store crx download link
- * @include https://chrome.google.com/webstore/*
+ * @title crx DL link
+ * @detail prompt crx download-link on Chrome Web Store
+ * @include https://chrome.google.com/webstore/detail/*
* @contributor taizooo http://let.hatelabo.jp/taizooo/let/gYC-x-e5r_G0bw (Fork of)
* @contributor noromanba http://let.hatelabo.jp/noromanba/let/hLHX5-ST-aMn
* @license MIT License http://opensource.org/licenses/MIT
/*
* @title crx DL link
* @detail prompt crx download-link on Chrome Web Store
* @include https://chrome.google.com/webstore/detail/*
* @contributor taizooo http://let.hatelabo.jp/taizooo/let/gYC-x-e5r_G0bw (Fork of)
* @contributor noromanba http://let.hatelabo.jp/noromanba/let/hLHX5-ST-aMn
* @license MIT License http://opensource.org/licenses/MIT
*/
// http://stackoverflow.com/questions/7184793/how-to-download-a-crx-file-from-the-chrome-web-store-for-a-given-id
// http://0-9.tumblr.com/post/52782603407/chrome-extension-development-casual
(function () {
var id = location.pathname.split('/').filter(function (s) { return !!s; } ).pop();
var u = 'http://clients2.google.com/service/update2/crx?response=redirect&x=id%3D' + id + '%26uc';
prompt('link', u);
})();
// # How to get Chrome Extension download URL
// ## via
// Bookmarklet for Google Web Store
//
// - http://let.hatelabo.jp/taizooo/let/gYC-x-e5r_G0bw
// - http://let.hatelabo.jp/noromanba/let/hLHX5-ST-aMn
//
// ## e.g. Go Extensions
// - https://chrome.google.com/webstore/detail/go-extensions/cdlogpoaigpjcfjfllhjdaniobkjnkmg
//
// http://clients2.google.com/service/update2/crx?response=redirect&x=id%3Dcdlogpoaigpjcfjfllhjdaniobkjnkmg%26uc%26lang%3Den-US&prod=chrome
//
// ### decodeURIComponent
//
// http://clients2.google.com/service/update2/crx?response=redirect&x=id=cdlogpoaigpjcfjfllhjdaniobkjnkmg&uc&lang=en-US&prod=chrome
//
// ### parameters
//
// update_url: http://clients2.google.com/service/update2/crx
// redirect: response=redirect
// exec: x=id%3Dcdlogpoaigpjcfjfllhjdaniobkjnkmg%26uc
// language: lang=en-US
// product: prod=chrome
//
// `uc` is part of id
//
// ## canonicalize
// update_url + redirect + id
//
// http://clients2.google.com/service/update2/crx?response=redirect&x=id%3Dcdlogpoaigpjcfjfllhjdaniobkjnkmg%26uc
//
// ### i.e.
//
// 'http://clients2.google.com/service/update2/crx?response=redirect&x=id%3D' + id + '%26uc'
//
// ## APPENDIX
// ### more URL resolving
//
// 1. http://clients2.google.com/service/update2/crx?response=redirect&x=id%3Dcdlogpoaigpjcfjfllhjdaniobkjnkmg%26uc
// 2. https://clients2.googleusercontent.com/crx/blobs/OQAAABoPIj_5thuifVo6bmPkF7p2Vrq7ZFgx-bQzdvImRjug7tBuCqolnEUZGIpjdWYFRo_06Iw-AXXVtlyZQHx3EekAxlKa5V2JoWVIQNBSlTAK8DJlN7JkRMIi/extension_0_1.crx
//
// https needed
//
// ### wget spy
// can not use `--spider`, if use this option;
//
// $ wget --no-check-certificate --spider CRX_URL
// Spider mode enabled. Check if remote file exists.
// --2013-06-14 01:59:46-- CRX_URL
// Resolving clients2.google.com (clients2.google.com)... 74.125.235.231, 74.125.235.230, 74.125.235.227, ...
// Connecting to clients2.google.com (clients2.google.com)|74.125.235.231|:80... connected.
// HTTP request sent, awaiting response... 413 Request Entity Too Large
// Remote file does not exist -- broken link!!!
//
// > 413 Request Entity Too Large
//
// so use `--spider` shim:
//
// $ wget -O - URL > /dev/null
//
// DL files: STDOUT -> /dev/null
// messages: msg to STDERR (wget default)
//
// #### log
// ```sh
// $ wget --no-check-certificate -O - "http://clients2.google.com/service/update2/crx?response=redirect&x=id%3Dcdlogpoaigpjcfjfllhjdaniobkjnkmg%26uc" > /dev/null
// --2013-06-14 01:45:37-- http://clients2.google.com/service/update2/crx?response=redirect&x=id%3Dcdlogpoaigpjcfjfllhjdaniobkjnkmg%26uc
// Resolving clients2.google.com (clients2.google.com)... 74.125.235.197, 74.125.235.198, 74.125.235.206, ...
// Connecting to clients2.google.com (clients2.google.com)|74.125.235.197|:80... connected.
// HTTP request sent, awaiting response... 302 Moved Temporarily
// Location: https://clients2.googleusercontent.com/crx/blobs/OQAAABoPIj_5thuifVo6bmPkF7p2Vrq7ZFgx-bQzdvImRjug7tBuCqolnEUZGIpjdWYFRo_06Iw-AXXVtlyZQHx3EekAxlKa5V2JoWVIQNBSlTAK8DJlN7JkRMIi/extension_0_1.crx [following]
// --2013-06-14 01:45:38-- https://clients2.googleusercontent.com/crx/blobs/OQAAABoPIj_5thuifVo6bmPkF7p2Vrq7ZFgx-bQzdvImRjug7tBuCqolnEUZGIpjdWYFRo_06Iw-AXXVtlyZQHx3EekAxlKa5V2JoWVIQNBSlTAK8DJlN7JkRMIi/extension_0_1.crx
// Resolving clients2.googleusercontent.com (clients2.googleusercontent.com)... 74.125.235.203, 74.125.235.202, 74.125.235.204
// Connecting to clients2.googleusercontent.com (clients2.googleusercontent.com)|74.125.235.203|:443... connected.
// WARNING: The certificate of `clients2.googleusercontent.com' is not trusted.
// WARNING: The certificate of `clients2.googleusercontent.com' hasn't got a known issuer.
// HTTP request sent, awaiting response... 200 OK
// Length: 36159 (35K) [application/x-chrome-extension]
// Saving to: `STDOUT'
//
// 100%[===============================================================================================================>] 36,159 151K/s in 0.2s
//
// 2013-06-14 01:45:39 (151 KB/s) - written to stdout [36159/36159]
//
// $
// ```
- Permalink
- このページへの個別リンクです。
- RAW
- 書かれたコードへの直接のリンクです。
- Packed
- 文字列が圧縮された書かれたコードへのリンクです。
- Userscript
- Greasemonkey 等で利用する場合の .user.js へのリンクです。
- Loader
- @require やソースコードが長い場合に多段ロードする Loader コミのコードへのリンクです。
- Metadata
- コード中にコメントで @xxx と書かれたメタデータの JSON です。