Skip to content

Instantly share code, notes, and snippets.

@azu
Created May 7, 2009 10:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save azu/108045 to your computer and use it in GitHub Desktop.
Save azu/108045 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name from iTunes app store to appspot.com
// @namespace http://web.zgo.jp/
// @include http://*
// ==/UserScript==
(function(){
window.addEventListener("load", function(e){
var aTags = document.getElementsByTagName("a");
var urls = /http:\/\/itunes\.apple\.com\/WebObjects\/MZStore\.woa\/wa\/(.*)$/ig;
for (var i=0; i<aTags.length; i++) {
var href = aTags[i].href;
aTags[i].href = href.replace(urls, "http://app-store.appspot.com/?url=$1");
}
}, false);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment