Create a gist now

Instantly share code, notes, and snippets.

// ==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