code: function getVisUrl(url) {
      var match = /https?:\/\/(\S+)\.cartodb\.com\/viz\/(\S+)\/(?:public_)?map/.exec(url);
      if (match) {
          var user = match[1],
              mapId = match[2];
          return 'https://' + user + '.cartodb.com/api/v2/viz/' + mapId + '/viz.json';
      }
  }
docs: Convert a map's url into the viz.json url for that map.
  
  @param {String} url the map's url
  @return {String} the viz.json url, if found