Skip to content

Instantly share code, notes, and snippets.

Code sweet code

Marcin Warpechowski warpech

Code sweet code
Block or report user

Report or block warpech

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
warpech / jquery.xdomain.js
Created Dec 15, 2011 — forked from mathieucarbou/jquery.xdomain.js
jQuery CORS Plugin - transparently add CORS support for IE8+ in jQuery using XDomainRequest. Support cookies.
View jquery.xdomain.js
(function($) {
var urlParseRE = /^(((([^:\/#\?]+:)?(?:\/\/((?:(([^:@\/#\?]+)(?:\:([^:@\/#\?]+))?)@)?(([^:\/#\?]+)(?:\:([0-9]+))?))?)?)?((\/?(?:[^\/\?#]+\/+)*)([^\?#]*)))?(\?[^#]+)?)(#.*)?/;
function parseUrl(url) {
if (typeof url === "object") {
return url;
var u = url || "", matches = urlParseRE.exec(url), results;
if (matches) {
results = {
You can’t perform that action at this time.