from iTunes app store to web store

Redirect iTunes app store to web store

  1. // ==UserScript==
  2. // @name from iTunes app store to web store
  3. // @namespace http://efcl.info/
  4. // @description Redirect iTunes app store to web store
  5. // @include http://itunes.apple.com/WebObjects/*
  6. // @version 0.0.1.20140518104305
  7. // ==/UserScript==
  8. (function(){
  9. var URL = location.href;
  10. var urls_def = /itms%253A%252F%252Fitunes\.apple\.com.*?id%253D(\d+)/i;
  11. var m = (URL.match(urls_def)||[])[1];
  12. if(m){
  13. location.href = "http://app-store.appspot.com/?url=viewSoftware?id=" + m;
  14. }else{
  15. return
  16. }
  17. })();
  18.