Instantly share code, notes, and snippets.

What would you like to do?
// ==UserScript==
// @name from iTunes app store to
// @namespace
// @include http://*
// ==/UserScript==
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, "$1");
}, false);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment