Skip to content

Instantly share code, notes, and snippets.

🤹‍♂️
Code sweet code

Marcin Warpechowski warpech

🤹‍♂️
Code sweet code
View GitHub Profile
@warpech
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.