Skip to content

Instantly share code, notes, and snippets.

@timothyclemans
Created January 9, 2014 05:23
Show Gist options
  • Save timothyclemans/8329776 to your computer and use it in GitHub Desktop.
Save timothyclemans/8329776 to your computer and use it in GitHub Desktop.
var oGet = jQuery.get;
jQuery.get = function() {
arguments[0] = 'http://www.corsproxy.com/' + arguments[0].replace("http://", "").replace("https://", "");
return oGet.apply(this, arguments);
};
var oPost = jQuery.post;
jQuery.post = function() {
arguments[0] = 'http://www.corsproxy.com/' + arguments[0].replace("http://", "").replace("https://", "");
return oPost.apply(this, arguments);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment