Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

new files

  • Loading branch information...
commit eff7b7fb09cb0937c44ebd555dca2c8d1eed8223 1 parent 9a1e30b
@jeads jeads authored
View
1  datazilla/webapp/static/js/plugins/jquery.history.js
@@ -0,0 +1 @@
+typeof JSON!="object"&&(JSON={}),function(){"use strict";function f(e){return e<10?"0"+e:e}function quote(e){return escapable.lastIndex=0,escapable.test(e)?'"'+e.replace(escapable,function(e){var t=meta[e];return typeof t=="string"?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'}function str(e,t){var n,r,i,s,o=gap,u,a=t[e];a&&typeof a=="object"&&typeof a.toJSON=="function"&&(a=a.toJSON(e)),typeof rep=="function"&&(a=rep.call(t,e,a));switch(typeof a){case"string":return quote(a);case"number":return isFinite(a)?String(a):"null";case"boolean":case"null":return String(a);case"object":if(!a)return"null";gap+=indent,u=[];if(Object.prototype.toString.apply(a)==="[object Array]"){s=a.length;for(n=0;n<s;n+=1)u[n]=str(n,a)||"null";return i=u.length===0?"[]":gap?"[\n"+gap+u.join(",\n"+gap)+"\n"+o+"]":"["+u.join(",")+"]",gap=o,i}if(rep&&typeof rep=="object"){s=rep.length;for(n=0;n<s;n+=1)typeof rep[n]=="string"&&(r=rep[n],i=str(r,a),i&&u.push(quote(r)+(gap?": ":":")+i))}else for(r in a)Object.prototype.hasOwnProperty.call(a,r)&&(i=str(r,a),i&&u.push(quote(r)+(gap?": ":":")+i));return i=u.length===0?"{}":gap?"{\n"+gap+u.join(",\n"+gap)+"\n"+o+"}":"{"+u.join(",")+"}",gap=o,i}}typeof Date.prototype.toJSON!="function"&&(Date.prototype.toJSON=function(e){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(e){return this.valueOf()});var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;typeof JSON.stringify!="function"&&(JSON.stringify=function(e,t,n){var r;gap="",indent="";if(typeof n=="number")for(r=0;r<n;r+=1)indent+=" ";else typeof n=="string"&&(indent=n);rep=t;if(!t||typeof t=="function"||typeof t=="object"&&typeof t.length=="number")return str("",{"":e});throw new Error("JSON.stringify")}),typeof JSON.parse!="function"&&(JSON.parse=function(text,reviver){function walk(e,t){var n,r,i=e[t];if(i&&typeof i=="object")for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(r=walk(i,n),r!==undefined?i[n]=r:delete i[n]);return reviver.call(e,t,i)}var j;text=String(text),cx.lastIndex=0,cx.test(text)&&(text=text.replace(cx,function(e){return"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)}));if(/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return j=eval("("+text+")"),typeof reviver=="function"?walk({"":j},""):j;throw new SyntaxError("JSON.parse")})}(),function(e,t){"use strict";var n=e.History=e.History||{},r=e.jQuery;if(typeof n.Adapter!="undefined")throw new Error("History.js Adapter has already been loaded...");n.Adapter={bind:function(e,t,n){r(e).bind(t,n)},trigger:function(e,t,n){r(e).trigger(t,n)},extractEventData:function(e,n,r){var i=n&&n.originalEvent&&n.originalEvent[e]||r&&r[e]||t;return i},onDomLoad:function(e){r(e)}},typeof n.init!="undefined"&&n.init()}(window),function(e,t){"use strict";var n=e.document,r=e.setTimeout||r,i=e.clearTimeout||i,s=e.setInterval||s,o=e.History=e.History||{};if(typeof o.initHtml4!="undefined")throw new Error("History.js HTML4 Support has already been loaded...");o.initHtml4=function(){if(typeof o.initHtml4.initialized!="undefined")return!1;o.initHtml4.initialized=!0,o.enabled=!0,o.savedHashes=[],o.isLastHash=function(e){var t=o.getHashByIndex(),n;return n=e===t,n},o.isHashEqual=function(e,t){return e=encodeURIComponent(e).replace(/%25/g,"%"),t=encodeURIComponent(t).replace(/%25/g,"%"),e===t},o.saveHash=function(e){return o.isLastHash(e)?!1:(o.savedHashes.push(e),!0)},o.getHashByIndex=function(e){var t=null;return typeof e=="undefined"?t=o.savedHashes[o.savedHashes.length-1]:e<0?t=o.savedHashes[o.savedHashes.length+e]:t=o.savedHashes[e],t},o.discardedHashes={},o.discardedStates={},o.discardState=function(e,t,n){var r=o.getHashByState(e),i;return i={discardedState:e,backState:n,forwardState:t},o.discardedStates[r]=i,!0},o.discardHash=function(e,t,n){var r={discardedHash:e,backState:n,forwardState:t};return o.discardedHashes[e]=r,!0},o.discardedState=function(e){var t=o.getHashByState(e),n;return n=o.discardedStates[t]||!1,n},o.discardedHash=function(e){var t=o.discardedHashes[e]||!1;return t},o.recycleState=function(e){var t=o.getHashByState(e);return o.discardedState(e)&&delete o.discardedStates[t],!0},o.emulated.hashChange&&(o.hashChangeInit=function(){o.checkerFunction=null;var t="",r,i,u,a,f=Boolean(o.getHash());return o.isInternetExplorer()?(r="historyjs-iframe",i=n.createElement("iframe"),i.setAttribute("id",r),i.setAttribute("src","#"),i.style.display="none",n.body.appendChild(i),i.contentWindow.document.open(),i.contentWindow.document.close(),u="",a=!1,o.checkerFunction=function(){if(a)return!1;a=!0;var n=o.getHash(),r=o.getHash(i.contentWindow.document.location);return n!==t?(t=n,r!==n&&(u=r=n,i.contentWindow.document.open(),i.contentWindow.document.close(),i.contentWindow.document.location.hash=o.escapeHash(n)),o.Adapter.trigger(e,"hashchange")):r!==u&&(u=r,f&&r===""?o.back():o.setHash(r,!1)),a=!1,!0}):o.checkerFunction=function(){var n=o.getHash()||"";return n!==t&&(t=n,o.Adapter.trigger(e,"hashchange")),!0},o.intervalList.push(s(o.checkerFunction,o.options.hashChangeInterval)),!0},o.Adapter.onDomLoad(o.hashChangeInit)),o.emulated.pushState&&(o.onHashChange=function(t){var n=t&&t.newURL||o.getLocationHref(),r=o.getHashByUrl(n),i=null,s=null,u=null,a;return o.isLastHash(r)?(o.busy(!1),!1):(o.doubleCheckComplete(),o.saveHash(r),r&&o.isTraditionalAnchor(r)?(o.Adapter.trigger(e,"anchorchange"),o.busy(!1),!1):(i=o.extractState(o.getFullUrl(r||o.getLocationHref()),!0),o.isLastSavedState(i)?(o.busy(!1),!1):(s=o.getHashByState(i),a=o.discardedState(i),a?(o.getHashByIndex(-2)===o.getHashByState(a.forwardState)?o.back(!1):o.forward(!1),!1):(o.pushState(i.data,i.title,encodeURI(i.url),!1),!0))))},o.Adapter.bind(e,"hashchange",o.onHashChange),o.pushState=function(t,n,r,i){r=encodeURI(r).replace(/%25/g,"%");if(o.getHashByUrl(r))throw new Error("History.js does not support states with fragment-identifiers (hashes/anchors).");if(i!==!1&&o.busy())return o.pushQueue({scope:o,callback:o.pushState,args:arguments,queue:i}),!1;o.busy(!0);var s=o.createStateObject(t,n,r),u=o.getHashByState(s),a=o.getState(!1),f=o.getHashByState(a),l=o.getHash(),c=o.expectedStateId==s.id;return o.storeState(s),o.expectedStateId=s.id,o.recycleState(s),o.setTitle(s),u===f?(o.busy(!1),!1):(o.saveState(s),c||o.Adapter.trigger(e,"statechange"),!o.isHashEqual(u,l)&&!o.isHashEqual(u,o.getShortUrl(o.getLocationHref()))&&o.setHash(u,!1),o.busy(!1),!0)},o.replaceState=function(t,n,r,i){r=encodeURI(r).replace(/%25/g,"%");if(o.getHashByUrl(r))throw new Error("History.js does not support states with fragment-identifiers (hashes/anchors).");if(i!==!1&&o.busy())return o.pushQueue({scope:o,callback:o.replaceState,args:arguments,queue:i}),!1;o.busy(!0);var s=o.createStateObject(t,n,r),u=o.getHashByState(s),a=o.getState(!1),f=o.getHashByState(a),l=o.getStateByIndex(-2);return o.discardState(a,s,l),u===f?(o.storeState(s),o.expectedStateId=s.id,o.recycleState(s),o.setTitle(s),o.saveState(s),o.Adapter.trigger(e,"statechange"),o.busy(!1)):o.pushState(s.data,s.title,s.url,!1),!0}),o.emulated.pushState&&o.getHash()&&!o.emulated.hashChange&&o.Adapter.onDomLoad(function(){o.Adapter.trigger(e,"hashchange")})},typeof o.init!="undefined"&&o.init()}(window),function(e,t){"use strict";var n=e.console||t,r=e.document,i=e.navigator,s=e.sessionStorage||!1,o=e.setTimeout,u=e.clearTimeout,a=e.setInterval,f=e.clearInterval,l=e.JSON,c=e.alert,h=e.History=e.History||{},p=e.history;try{s.setItem("TEST","1"),s.removeItem("TEST")}catch(d){s=!1}l.stringify=l.stringify||l.encode,l.parse=l.parse||l.decode;if(typeof h.init!="undefined")throw new Error("History.js Core has already been loaded...");h.init=function(e){return typeof h.Adapter=="undefined"?!1:(typeof h.initCore!="undefined"&&h.initCore(),typeof h.initHtml4!="undefined"&&h.initHtml4(),!0)},h.initCore=function(d){if(typeof h.initCore.initialized!="undefined")return!1;h.initCore.initialized=!0,h.options=h.options||{},h.options.hashChangeInterval=h.options.hashChangeInterval||100,h.options.safariPollInterval=h.options.safariPollInterval||500,h.options.doubleCheckInterval=h.options.doubleCheckInterval||500,h.options.disableSuid=h.options.disableSuid||!1,h.options.storeInterval=h.options.storeInterval||1e3,h.options.busyDelay=h.options.busyDelay||250,h.options.debug=h.options.debug||!1,h.options.initialTitle=h.options.initialTitle||r.title,h.options.html4Mode=h.options.html4Mode||!1,h.options.delayInit=h.options.delayInit||!1,h.intervalList=[],h.clearAllIntervals=function(){var e,t=h.intervalList;if(typeof t!="undefined"&&t!==null){for(e=0;e<t.length;e++)f(t[e]);h.intervalList=null}},h.debug=function(){(h.options.debug||!1)&&h.log.apply(h,arguments)},h.log=function(){var e=typeof n!="undefined"&&typeof n.log!="undefined"&&typeof n.log.apply!="undefined",t=r.getElementById("log"),i,s,o,u,a;e?(u=Array.prototype.slice.call(arguments),i=u.shift(),typeof n.debug!="undefined"?n.debug.apply(n,[i,u]):n.log.apply(n,[i,u])):i="\n"+arguments[0]+"\n";for(s=1,o=arguments.length;s<o;++s){a=arguments[s];if(typeof a=="object"&&typeof l!="undefined")try{a=l.stringify(a)}catch(f){}i+="\n"+a+"\n"}return t?(t.value+=i+"\n-----\n",t.scrollTop=t.scrollHeight-t.clientHeight):e||c(i),!0},h.getInternetExplorerMajorVersion=function(){var e=h.getInternetExplorerMajorVersion.cached=typeof h.getInternetExplorerMajorVersion.cached!="undefined"?h.getInternetExplorerMajorVersion.cached:function(){var e=3,t=r.createElement("div"),n=t.getElementsByTagName("i");while((t.innerHTML="<!--[if gt IE "+ ++e+"]><i></i><![endif]-->")&&n[0]);return e>4?e:!1}();return e},h.isInternetExplorer=function(){var e=h.isInternetExplorer.cached=typeof h.isInternetExplorer.cached!="undefined"?h.isInternetExplorer.cached:Boolean(h.getInternetExplorerMajorVersion());return e},h.options.html4Mode?h.emulated={pushState:!0,hashChange:!0}:h.emulated={pushState:!Boolean(e.history&&e.history.pushState&&e.history.replaceState&&!/ Mobile\/([1-7][a-z]|(8([abcde]|f(1[0-8]))))/i.test(i.userAgent)&&!/AppleWebKit\/5([0-2]|3[0-2])/i.test(i.userAgent)),hashChange:Boolean(!("onhashchange"in e||"onhashchange"in r)||h.isInternetExplorer()&&h.getInternetExplorerMajorVersion()<8)},h.enabled=!h.emulated.pushState,h.bugs={setHash:Boolean(!h.emulated.pushState&&i.vendor==="Apple Computer, Inc."&&/AppleWebKit\/5([0-2]|3[0-3])/.test(i.userAgent)),safariPoll:Boolean(!h.emulated.pushState&&i.vendor==="Apple Computer, Inc."&&/AppleWebKit\/5([0-2]|3[0-3])/.test(i.userAgent)),ieDoubleCheck:Boolean(h.isInternetExplorer()&&h.getInternetExplorerMajorVersion()<8),hashEscape:Boolean(h.isInternetExplorer()&&h.getInternetExplorerMajorVersion()<7)},h.isEmptyObject=function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0},h.cloneObject=function(e){var t,n;return e?(t=l.stringify(e),n=l.parse(t)):n={},n},h.getRootUrl=function(){var e=r.location.protocol+"//"+(r.location.hostname||r.location.host);if(r.location.port||!1)e+=":"+r.location.port;return e+="/",e},h.getBaseHref=function(){var e=r.getElementsByTagName("base"),t=null,n="";return e.length===1&&(t=e[0],n=t.href.replace(/[^\/]+$/,"")),n=n.replace(/\/+$/,""),n&&(n+="/"),n},h.getBaseUrl=function(){var e=h.getBaseHref()||h.getBasePageUrl()||h.getRootUrl();return e},h.getPageUrl=function(){var e=h.getState(!1,!1),t=(e||{}).url||h.getLocationHref(),n;return n=t.replace(/\/+$/,"").replace(/[^\/]+$/,function(e,t,n){return/\./.test(e)?e:e+"/"}),n},h.getBasePageUrl=function(){var e=h.getLocationHref().replace(/[#\?].*/,"").replace(/[^\/]+$/,function(e,t,n){return/[^\/]$/.test(e)?"":e}).replace(/\/+$/,"")+"/";return e},h.getFullUrl=function(e,t){var n=e,r=e.substring(0,1);return t=typeof t=="undefined"?!0:t,/[a-z]+\:\/\//.test(e)||(r==="/"?n=h.getRootUrl()+e.replace(/^\/+/,""):r==="#"?n=h.getPageUrl().replace(/#.*/,"")+e:r==="?"?n=h.getPageUrl().replace(/[\?#].*/,"")+e:t?n=h.getBaseUrl()+e.replace(/^(\.\/)+/,""):n=h.getBasePageUrl()+e.replace(/^(\.\/)+/,"")),n.replace(/\#$/,"")},h.getShortUrl=function(e){var t=e,n=h.getBaseUrl(),r=h.getRootUrl();return h.emulated.pushState&&(t=t.replace(n,"")),t=t.replace(r,"/"),h.isTraditionalAnchor(t)&&(t="./"+t),t=t.replace(/^(\.\/)+/g,"./").replace(/\#$/,""),t},h.getLocationHref=function(e){return e=e||r,e.URL===e.location.href?e.location.href:e.location.href===decodeURIComponent(e.URL)?e.URL:e.location.hash&&decodeURIComponent(e.location.href.replace(/^[^#]+/,""))===e.location.hash?e.location.href:e.URL.indexOf("#")==-1&&e.location.href.indexOf("#")!=-1?e.location.href:e.URL||e.location.href},h.store={},h.idToState=h.idToState||{},h.stateToId=h.stateToId||{},h.urlToId=h.urlToId||{},h.storedStates=h.storedStates||[],h.savedStates=h.savedStates||[],h.normalizeStore=function(){h.store.idToState=h.store.idToState||{},h.store.urlToId=h.store.urlToId||{},h.store.stateToId=h.store.stateToId||{}},h.getState=function(e,t){typeof e=="undefined"&&(e=!0),typeof t=="undefined"&&(t=!0);var n=h.getLastSavedState();return!n&&t&&(n=h.createStateObject()),e&&(n=h.cloneObject(n),n.url=n.cleanUrl||n.url),n},h.getIdByState=function(e){var t=h.extractId(e.url),n;if(!t){n=h.getStateString(e);if(typeof h.stateToId[n]!="undefined")t=h.stateToId[n];else if(typeof h.store.stateToId[n]!="undefined")t=h.store.stateToId[n];else{for(;;){t=(new Date).getTime()+String(Math.random()).replace(/\D/g,"");if(typeof h.idToState[t]=="undefined"&&typeof h.store.idToState[t]=="undefined")break}h.stateToId[n]=t,h.idToState[t]=e}}return t},h.normalizeState=function(e){var t,n;if(!e||typeof e!="object")e={};if(typeof e.normalized!="undefined")return e;if(!e.data||typeof e.data!="object")e.data={};return t={},t.normalized=!0,t.title=e.title||"",t.url=h.getFullUrl(e.url?decodeURIComponent(e.url):h.getLocationHref()),t.hash=h.getShortUrl(t.url),t.data=h.cloneObject(e.data),t.id=h.getIdByState(t),t.cleanUrl=t.url.replace(/\??\&_suid.*/,""),t.url=t.cleanUrl,n=!h.isEmptyObject(t.data),(t.title||n)&&h.options.disableSuid!==!0&&(t.hash=h.getShortUrl(t.url).replace(/\??\&_suid.*/,""),/\?/.test(t.hash)||(t.hash+="?"),t.hash+="&_suid="+t.id),t.hashedUrl=h.getFullUrl(t.hash),(h.emulated.pushState||h.bugs.safariPoll)&&h.hasUrlDuplicate(t)&&(t.url=t.hashedUrl),t},h.createStateObject=function(e,t,n){var r={data:e,title:t,url:n};return r=h.normalizeState(r),r},h.getStateById=function(e){e=String(e);var n=h.idToState[e]||h.store.idToState[e]||t;return n},h.getStateString=function(e){var t,n,r;return t=h.normalizeState(e),n={data:t.data,title:e.title,url:e.url},r=l.stringify(n),r},h.getStateId=function(e){var t,n;return t=h.normalizeState(e),n=t.id,n},h.getHashByState=function(e){var t,n;return t=h.normalizeState(e),n=t.hash,n},h.extractId=function(e){var t,n,r,i;return e.indexOf("#")!=-1?i=e.split("#")[0]:i=e,n=/(.*)\&_suid=([0-9]+)$/.exec(i),r=n?n[1]||e:e,t=n?String(n[2]||""):"",t||!1},h.isTraditionalAnchor=function(e){var t=!/[\/\?\.]/.test(e);return t},h.extractState=function(e,t){var n=null,r,i;return t=t||!1,r=h.extractId(e),r&&(n=h.getStateById(r)),n||(i=h.getFullUrl(e),r=h.getIdByUrl(i)||!1,r&&(n=h.getStateById(r)),!n&&t&&!h.isTraditionalAnchor(e)&&(n=h.createStateObject(null,null,i))),n},h.getIdByUrl=function(e){var n=h.urlToId[e]||h.store.urlToId[e]||t;return n},h.getLastSavedState=function(){return h.savedStates[h.savedStates.length-1]||t},h.getLastStoredState=function(){return h.storedStates[h.storedStates.length-1]||t},h.hasUrlDuplicate=function(e){var t=!1,n;return n=h.extractState(e.url),t=n&&n.id!==e.id,t},h.storeState=function(e){return h.urlToId[e.url]=e.id,h.storedStates.push(h.cloneObject(e)),e},h.isLastSavedState=function(e){var t=!1,n,r,i;return h.savedStates.length&&(n=e.id,r=h.getLastSavedState(),i=r.id,t=n===i),t},h.saveState=function(e){return h.isLastSavedState(e)?!1:(h.savedStates.push(h.cloneObject(e)),!0)},h.getStateByIndex=function(e){var t=null;return typeof e=="undefined"?t=h.savedStates[h.savedStates.length-1]:e<0?t=h.savedStates[h.savedStates.length+e]:t=h.savedStates[e],t},h.getCurrentIndex=function(){var e=null;return h.savedStates.length<1?e=0:e=h.savedStates.length-1,e},h.getHash=function(e){var t=h.getLocationHref(e),n;return n=h.getHashByUrl(t),n},h.unescapeHash=function(e){var t=h.normalizeHash(e);return t=decodeURIComponent(t),t},h.normalizeHash=function(e){var t=e.replace(/[^#]*#/,"").replace(/#.*/,"");return t},h.setHash=function(e,t){var n,i;return t!==!1&&h.busy()?(h.pushQueue({scope:h,callback:h.setHash,args:arguments,queue:t}),!1):(h.busy(!0),n=h.extractState(e,!0),n&&!h.emulated.pushState?h.pushState(n.data,n.title,n.url,!1):h.getHash()!==e&&(h.bugs.setHash?(i=h.getPageUrl(),h.pushState(null,null,i+"#"+e,!1)):r.location.hash=e),h)},h.escapeHash=function(t){var n=h.normalizeHash(t);return n=e.encodeURIComponent(n),h.bugs.hashEscape||(n=n.replace(/\%21/g,"!").replace(/\%26/g,"&").replace(/\%3D/g,"=").replace(/\%3F/g,"?")),n},h.getHashByUrl=function(e){var t=String(e).replace(/([^#]*)#?([^#]*)#?(.*)/,"$2");return t=h.unescapeHash(t),t},h.setTitle=function(e){var t=e.title,n;t||(n=h.getStateByIndex(0),n&&n.url===e.url&&(t=n.title||h.options.initialTitle));try{r.getElementsByTagName("title")[0].innerHTML=t.replace("<","&lt;").replace(">","&gt;").replace(" & "," &amp; ")}catch(i){}return r.title=t,h},h.queues=[],h.busy=function(e){typeof e!="undefined"?h.busy.flag=e:typeof h.busy.flag=="undefined"&&(h.busy.flag=!1);if(!h.busy.flag){u(h.busy.timeout);var t=function(){var e,n,r;if(h.busy.flag)return;for(e=h.queues.length-1;e>=0;--e){n=h.queues[e];if(n.length===0)continue;r=n.shift(),h.fireQueueItem(r),h.busy.timeout=o(t,h.options.busyDelay)}};h.busy.timeout=o(t,h.options.busyDelay)}return h.busy.flag},h.busy.flag=!1,h.fireQueueItem=function(e){return e.callback.apply(e.scope||h,e.args||[])},h.pushQueue=function(e){return h.queues[e.queue||0]=h.queues[e.queue||0]||[],h.queues[e.queue||0].push(e),h},h.queue=function(e,t){return typeof e=="function"&&(e={callback:e}),typeof t!="undefined"&&(e.queue=t),h.busy()?h.pushQueue(e):h.fireQueueItem(e),h},h.clearQueue=function(){return h.busy.flag=!1,h.queues=[],h},h.stateChanged=!1,h.doubleChecker=!1,h.doubleCheckComplete=function(){return h.stateChanged=!0,h.doubleCheckClear(),h},h.doubleCheckClear=function(){return h.doubleChecker&&(u(h.doubleChecker),h.doubleChecker=!1),h},h.doubleCheck=function(e){return h.stateChanged=!1,h.doubleCheckClear(),h.bugs.ieDoubleCheck&&(h.doubleChecker=o(function(){return h.doubleCheckClear(),h.stateChanged||e(),!0},h.options.doubleCheckInterval)),h},h.safariStatePoll=function(){var t=h.extractState(h.getLocationHref()),n;if(!h.isLastSavedState(t))return n=t,n||(n=h.createStateObject()),h.Adapter.trigger(e,"popstate"),h;return},h.back=function(e){return e!==!1&&h.busy()?(h.pushQueue({scope:h,callback:h.back,args:arguments,queue:e}),!1):(h.busy(!0),h.doubleCheck(function(){h.back(!1)}),p.go(-1),!0)},h.forward=function(e){return e!==!1&&h.busy()?(h.pushQueue({scope:h,callback:h.forward,args:arguments,queue:e}),!1):(h.busy(!0),h.doubleCheck(function(){h.forward(!1)}),p.go(1),!0)},h.go=function(e,t){var n;if(e>0)for(n=1;n<=e;++n)h.forward(t);else{if(!(e<0))throw new Error("History.go: History.go requires a positive or negative integer passed.");for(n=-1;n>=e;--n)h.back(t)}return h};if(h.emulated.pushState){var v=function(){};h.pushState=h.pushState||v,h.replaceState=h.replaceState||v}else h.onPopState=function(t,n){var r=!1,i=!1,s,o;return h.doubleCheckComplete(),s=h.getHash(),s?(o=h.extractState(s||h.getLocationHref(),!0),o?h.replaceState(o.data,o.title,o.url,!1):(h.Adapter.trigger(e,"anchorchange"),h.busy(!1)),h.expectedStateId=!1,!1):(r=h.Adapter.extractEventData("state",t,n)||!1,r?i=h.getStateById(r):h.expectedStateId?i=h.getStateById(h.expectedStateId):i=h.extractState(h.getLocationHref()),i||(i=h.createStateObject(null,null,h.getLocationHref())),h.expectedStateId=!1,h.isLastSavedState(i)?(h.busy(!1),!1):(h.storeState(i),h.saveState(i),h.setTitle(i),h.Adapter.trigger(e,"statechange"),h.busy(!1),!0))},h.Adapter.bind(e,"popstate",h.onPopState),h.pushState=function(t,n,r,i){if(h.getHashByUrl(r)&&h.emulated.pushState)throw new Error("History.js does not support states with fragement-identifiers (hashes/anchors).");if(i!==!1&&h.busy())return h.pushQueue({scope:h,callback:h.pushState,args:arguments,queue:i}),!1;h.busy(!0);var s=h.createStateObject(t,n,r);return h.isLastSavedState(s)?h.busy(!1):(h.storeState(s),h.expectedStateId=s.id,p.pushState(s.id,s.title,s.url),h.Adapter.trigger(e,"popstate")),!0},h.replaceState=function(t,n,r,i){if(h.getHashByUrl(r)&&h.emulated.pushState)throw new Error("History.js does not support states with fragement-identifiers (hashes/anchors).");if(i!==!1&&h.busy())return h.pushQueue({scope:h,callback:h.replaceState,args:arguments,queue:i}),!1;h.busy(!0);var s=h.createStateObject(t,n,r);return h.isLastSavedState(s)?h.busy(!1):(h.storeState(s),h.expectedStateId=s.id,p.replaceState(s.id,s.title,s.url),h.Adapter.trigger(e,"popstate")),!0};if(s){try{h.store=l.parse(s.getItem("History.store"))||{}}catch(m){h.store={}}h.normalizeStore()}else h.store={},h.normalizeStore();h.Adapter.bind(e,"unload",h.clearAllIntervals),h.saveState(h.storeState(h.extractState(h.getLocationHref(),!0))),s&&(h.onUnload=function(){var e,t,n;try{e=l.parse(s.getItem("History.store"))||{}}catch(r){e={}}e.idToState=e.idToState||{},e.urlToId=e.urlToId||{},e.stateToId=e.stateToId||{};for(t in h.idToState){if(!h.idToState.hasOwnProperty(t))continue;e.idToState[t]=h.idToState[t]}for(t in h.urlToId){if(!h.urlToId.hasOwnProperty(t))continue;e.urlToId[t]=h.urlToId[t]}for(t in h.stateToId){if(!h.stateToId.hasOwnProperty(t))continue;e.stateToId[t]=h.stateToId[t]}h.store=e,h.normalizeStore(),n=l.stringify(e);try{s.setItem("History.store",n)}catch(i){if(!/QUOTA_EXCEEDED_ERR/.test(i.message))throw i;s.removeItem("History.store"),s.setItem("History.store",n)}},h.intervalList.push(a(h.onUnload,h.options.storeInterval)),h.Adapter.bind(e,"beforeunload",h.onUnload),h.Adapter.bind(e,"unload",h.onUnload));if(!h.emulated.pushState){h.bugs.safariPoll&&h.intervalList.push(a(h.safariStatePoll,h.options.safariPollInterval));if(i.vendor==="Apple Computer, Inc."||(i.appCodeName||"")==="Mozilla")h.Adapter.bind(e,"hashchange",function(){h.Adapter.trigger(e,"popstate")}),h.getHash()&&h.Adapter.onDomLoad(function(){h.Adapter.trigger(e,"hashchange")})}},(!h.options||!h.options.delayInit)&&h.init()}(window)
View
842 schema_perftest.json
@@ -0,0 +1,842 @@
+{
+ "results": {
+ "163.com": [
+ "666.0",
+ "587.0",
+ "626.0"
+ ],
+ "56.com": [
+ "789.0",
+ "705.0",
+ "739.0"
+ ],
+ "alibaba.com": [
+ "103.0",
+ "95.0",
+ "105.0"
+ ],
+ "alipay.com": [
+ "1704.0",
+ "1054.0",
+ "1097.0"
+ ],
+ "aljazeera.net": [
+ "333.0",
+ "334.0",
+ "333.0"
+ ],
+ "amazon.com": [
+ "874.0",
+ "745.0",
+ "763.0"
+ ],
+ "ameblo.jp": [
+ "144.0",
+ "123.0",
+ "122.0"
+ ],
+ "ask.com": [
+ "36.0",
+ "24.0",
+ "30.0"
+ ],
+ "baidu.com": [
+ "1058.0",
+ "66.0",
+ "63.0"
+ ],
+ "bbc.co.uk": [
+ "320.0",
+ "783.0",
+ "320.0"
+ ],
+ "beatonna.livejournal.com": [
+ "312.0",
+ "402.0",
+ "391.0"
+ ],
+ "bild.de": [
+ "1576.0",
+ "1425.0",
+ "1410.0"
+ ],
+ "bing.com": [
+ "68.0",
+ "65.0",
+ "64.0"
+ ],
+ "blogfa.com": [
+ "92.0",
+ "82.0",
+ "73.0"
+ ],
+ "cakewrecks.blogspot.com": [
+ "280.0",
+ "303.0",
+ "288.0"
+ ],
+ "cgi.ebay.com": [
+ "373.0",
+ "374.0",
+ "346.0"
+ ],
+ "chemistry.about.com": [
+ "224.0",
+ "136.0",
+ "143.0"
+ ],
+ "chinaz.com": [
+ "270.0",
+ "224.0",
+ "237.0"
+ ],
+ "cnet.com": [
+ "431.0",
+ "395.0",
+ "404.0"
+ ],
+ "cnn.com": [
+ "1076.0",
+ "966.0",
+ "923.0"
+ ],
+ "csdn.net": [
+ "229.0",
+ "197.0",
+ "165.0"
+ ],
+ "dailymail.co.uk": [
+ "1424.0",
+ "1246.0",
+ "1219.0"
+ ],
+ "dailymotion.com": [
+ "257.0",
+ "271.0",
+ "250.0"
+ ],
+ "deviantart.com": [
+ "288.0",
+ "258.0",
+ "258.0"
+ ],
+ "digg.com": [
+ "213.0",
+ "195.0",
+ "186.0"
+ ],
+ "douban.com": [
+ "247.0",
+ "209.0",
+ "195.0"
+ ],
+ "ehow.com": [
+ "180.0",
+ "171.0",
+ "180.0"
+ ],
+ "en.wikipedia.org": [
+ "437.0",
+ "438.0",
+ "412.0"
+ ],
+ "etsy.com": [
+ "224.0",
+ "231.0",
+ "236.0"
+ ],
+ "ezinearticles.com": [
+ "154.0",
+ "132.0",
+ "163.0"
+ ],
+ "facebook.com": [
+ "82.0",
+ "77.0",
+ "75.0"
+ ],
+ "filestube.com": [
+ "178.0",
+ "183.0",
+ "183.0"
+ ],
+ "foxnews.com": [
+ "450.0",
+ "417.0",
+ "379.0"
+ ],
+ "globo.com": [
+ "848.0",
+ "796.0",
+ "887.0"
+ ],
+ "gmx.net": [
+ "266.0",
+ "244.0",
+ "240.0"
+ ],
+ "goo.ne.jp": [
+ "143.0",
+ "122.0",
+ "155.0"
+ ],
+ "google.com": [
+ "89.0",
+ "82.0",
+ "83.0"
+ ],
+ "guardian.co.uk": [
+ "409.0",
+ "360.0",
+ "390.0"
+ ],
+ "hao123.com": [
+ "391.0",
+ "108.0",
+ "104.0"
+ ],
+ "hatena.ne.jp": [
+ "262.0",
+ "215.0",
+ "215.0"
+ ],
+ "homeway.com.cn": [
+ "564.0",
+ "473.0",
+ "481.0"
+ ],
+ "huffingtonpost.com": [
+ "1080.0",
+ "1077.0",
+ "1064.0"
+ ],
+ "icanhascheezburger.com": [
+ "419.0",
+ "424.0",
+ "422.0"
+ ],
+ "icious.com": [
+ "186.0",
+ "169.0",
+ "177.0"
+ ],
+ "ifeng.com": [
+ "595.0",
+ "641.0",
+ "450.0"
+ ],
+ "imdb.com": [
+ "586.0",
+ "526.0",
+ "503.0"
+ ],
+ "imgur.com": [
+ "346.0",
+ "230.0",
+ "221.0"
+ ],
+ "indiatimes.com": [
+ "295.0",
+ "267.0",
+ "300.0"
+ ],
+ "linkedin.com": [
+ "31.0",
+ "27.0",
+ "27.0"
+ ],
+ "mail.ru": [
+ "329.0",
+ "295.0",
+ "292.0"
+ ],
+ "mashable.com": [
+ "591.0",
+ "541.0",
+ "538.0"
+ ],
+ "media.photobucket.com": [
+ "22.0",
+ "28.0",
+ "28.0"
+ ],
+ "mozilla.com": [
+ "406.0",
+ "371.0",
+ "378.0"
+ ],
+ "msn.com": [
+ "266.0",
+ "268.0",
+ "248.0"
+ ],
+ "myparentswereawesome.tumblr.com": [
+ "182.0",
+ "206.0",
+ "211.0"
+ ],
+ "myspace.com": [
+ "683.0",
+ "561.0",
+ "555.0"
+ ],
+ "naver.com": [
+ "387.0",
+ "386.0",
+ "381.0"
+ ],
+ "nicovideo.jp": [
+ "212.0",
+ "203.0",
+ "214.0"
+ ],
+ "noimpactman.typepad.com": [
+ "373.0",
+ "371.0",
+ "340.0"
+ ],
+ "orange.fr": [
+ "109.0",
+ "117.0",
+ "100.0"
+ ],
+ "page.renren.com": [
+ "241.0",
+ "207.0",
+ "219.0"
+ ],
+ "people.com.cn": [
+ "540.0",
+ "468.0",
+ "468.0"
+ ],
+ "php.net": [
+ "88.0",
+ "86.0",
+ "80.0"
+ ],
+ "rakuten.co.jp": [
+ "490.0",
+ "471.0",
+ "356.0"
+ ],
+ "rambler.ru": [
+ "279.0",
+ "242.0",
+ "255.0"
+ ],
+ "reddit.com": [
+ "180.0",
+ "213.0",
+ "240.0"
+ ],
+ "repubblica.it": [
+ "451.0",
+ "368.0",
+ "395.0"
+ ],
+ "reuters.com": [
+ "376.0",
+ "299.0",
+ "302.0"
+ ],
+ "seesaa.net": [
+ "266.0",
+ "245.0",
+ "228.0"
+ ],
+ "slideshare.net": [
+ "218.0",
+ "204.0",
+ "169.0"
+ ],
+ "sohu.com": [
+ "642.0",
+ "566.0",
+ "592.0"
+ ],
+ "spiegel.de": [
+ "444.0",
+ "395.0",
+ "440.0"
+ ],
+ "stackoverflow.com": [
+ "319.0",
+ "294.0",
+ "323.0"
+ ],
+ "store.apple.com": [
+ "592.0",
+ "447.0",
+ "452.0"
+ ],
+ "taringa.net": [
+ "247.0",
+ "232.0",
+ "235.0"
+ ],
+ "telegraph.co.uk": [
+ "328.0",
+ "299.0",
+ "286.0"
+ ],
+ "terra.com.br": [
+ "367.0",
+ "371.0",
+ "377.0"
+ ],
+ "thepiratebay.org": [
+ "206.0",
+ "182.0",
+ "189.0"
+ ],
+ "thesartorialist.blogspot.com": [
+ "739.0",
+ "782.0",
+ "792.0"
+ ],
+ "tmall.com": [
+ "432.0",
+ "322.0",
+ "335.0"
+ ],
+ "torrentz.eu": [
+ "1050.0",
+ "110.0",
+ "113.0"
+ ],
+ "tudou.com": [
+ "357.0",
+ "307.0",
+ "310.0"
+ ],
+ "twitter.com": [
+ "216.0",
+ "207.0",
+ "196.0"
+ ],
+ "ucoz.ru": [
+ "153.0",
+ "127.0",
+ "116.0"
+ ],
+ "uol.com.br": [
+ "461.0",
+ "453.0",
+ "451.0"
+ ],
+ "vkontakte.ru": [
+ "103.0",
+ "83.0",
+ "88.0"
+ ],
+ "w3.org": [
+ "125.0",
+ "120.0",
+ "126.0"
+ ],
+ "w3schools.com": [
+ "139.0",
+ "128.0",
+ "115.0"
+ ],
+ "web.de": [
+ "274.0",
+ "230.0",
+ "235.0"
+ ],
+ "whois.domaintools.com": [
+ "164.0",
+ "83.0",
+ "103.0"
+ ],
+ "wp.pl": [
+ "265.0",
+ "214.0",
+ "249.0"
+ ],
+ "wsj.com": [
+ "617.0",
+ "558.0",
+ "585.0"
+ ],
+ "xinhuanet.com": [
+ "854.0",
+ "865.0",
+ "755.0"
+ ],
+ "xunlei.com": [
+ "933.0",
+ "909.0",
+ "894.0"
+ ],
+ "yahoo.co.jp": [
+ "93.0",
+ "69.0",
+ "86.0"
+ ],
+ "yandex.ru": [
+ "245.0",
+ "237.0",
+ "244.0"
+ ],
+ "yelp.com": [
+ "462.0",
+ "410.0",
+ "405.0"
+ ],
+ "youku.com": [
+ "580.0",
+ "530.0",
+ "530.0"
+ ],
+ "youtube.com": [
+ "354.0",
+ "274.0",
+ "319.0"
+ ],
+ "zol.com.cn": [
+ "652.0",
+ "572.0",
+ "580.0"
+ ]
+ },
+ "results_aux": {
+ "main_rss": [
+ "72122368",
+ "89206784",
+ "90710016",
+ "93384704",
+ "98676736",
+ "102776832",
+ "104378368",
+ "107352064",
+ "118648832",
+ "116051968",
+ "114241536",
+ "119185408",
+ "111882240",
+ "115748864",
+ "136167424",
+ "133001216",
+ "135909376",
+ "141484032",
+ "136798208",
+ "136601600",
+ "135417856",
+ "152686592",
+ "143863808",
+ "140906496",
+ "144883712",
+ "142585856",
+ "141848576",
+ "139915264",
+ "141393920",
+ "136826880",
+ "135618560",
+ "139444224",
+ "140664832",
+ "138887168",
+ "135860224",
+ "137482240",
+ "134184960",
+ "135983104",
+ "136122368",
+ "138465280",
+ "140492800",
+ "142610432",
+ "142323712",
+ "141565952",
+ "140443648",
+ "139108352",
+ "136720384",
+ "135901184",
+ "135589888",
+ "140107776",
+ "136724480",
+ "136388608",
+ "135663616",
+ "134983680",
+ "135331840",
+ "132050944",
+ "132956160",
+ "133623808",
+ "140271616",
+ "138436608",
+ "138723328",
+ "139350016",
+ "134299648",
+ "134926336",
+ "134578176",
+ "142462976",
+ "148357120",
+ "172298240",
+ "172904448",
+ "167161856",
+ "165482496",
+ "157765632",
+ "151285760",
+ "149712896",
+ "150904832",
+ "152748032",
+ "154136576",
+ "161161216",
+ "158474240",
+ "153616384",
+ "153759744",
+ "159219712",
+ "159309824",
+ "159223808",
+ "159318016",
+ "157437952",
+ "162385920",
+ "161898496",
+ "163717120",
+ "163323904",
+ "160092160",
+ "155025408",
+ "156364800",
+ "154722304",
+ "153915392",
+ "154660864",
+ "152289280",
+ "159399936",
+ "152625152",
+ "151363584",
+ "162496512",
+ "162648064",
+ "164470784",
+ "155590656",
+ "154185728",
+ "152379392",
+ "150921216",
+ "151949312",
+ "152285184",
+ "159297536",
+ "156372992",
+ "156557312",
+ "161239040",
+ "155205632",
+ "158298112",
+ "167124992",
+ "162471936",
+ "161673216",
+ "164835328",
+ "161984512",
+ "160825344",
+ "158281728",
+ "164982784",
+ "158330880",
+ "155975680",
+ "158412800",
+ "162308096",
+ "161017856",
+ "159277056",
+ "159666176",
+ "157941760",
+ "158040064",
+ "157437952",
+ "159182848",
+ "157253632",
+ "153051136",
+ "155262976",
+ "151986176",
+ "153169920",
+ "152662016",
+ "153841664",
+ "158158848",
+ "157790208",
+ "157347840",
+ "157270016",
+ "153976832",
+ "152989696",
+ "152559616",
+ "151842816",
+ "153468928",
+ "155406336",
+ "154587136",
+ "151343104",
+ "150654976",
+ "147668992",
+ "149622784",
+ "147365888",
+ "149688320",
+ "148840448",
+ "153718784",
+ "151138304",
+ "151240704",
+ "152625152",
+ "149356544",
+ "147849216",
+ "149094400",
+ "155758592",
+ "157757440",
+ "173686784",
+ "173670400",
+ "169566208",
+ "168361984",
+ "159285248",
+ "155049984",
+ "151773184",
+ "153034752",
+ "156340224",
+ "157769728",
+ "163049472",
+ "160309248",
+ "156725248",
+ "156200960",
+ "161132544",
+ "158035968",
+ "159838208",
+ "159248384",
+ "156876800",
+ "163905536",
+ "164196352",
+ "163553280",
+ "162721792",
+ "159043584",
+ "155623424",
+ "157310976",
+ "154398720",
+ "152690688",
+ "152023040",
+ "150384640",
+ "155734016",
+ "150310912",
+ "148156416",
+ "159916032",
+ "158863360",
+ "162074624",
+ "150343680",
+ "150003712",
+ "149815296",
+ "149909504",
+ "150462464",
+ "151019520",
+ "154513408",
+ "153325568",
+ "151511040",
+ "158121984",
+ "151826432",
+ "155500544",
+ "161931264",
+ "157065216",
+ "157601792",
+ "159711232",
+ "157159424",
+ "153587712",
+ "152948736",
+ "159780864",
+ "151695360",
+ "147214336",
+ "151302144",
+ "152567808",
+ "157495296",
+ "157966336",
+ "157097984",
+ "153907200",
+ "150777856",
+ "151244800",
+ "152883200",
+ "151523328",
+ "148725760",
+ "149188608",
+ "146071552",
+ "147095552",
+ "147664896",
+ "149254144",
+ "150831104",
+ "151146496",
+ "152391680",
+ "151142400",
+ "149803008",
+ "146571264",
+ "146280448",
+ "144437248",
+ "146022400",
+ "147415040",
+ "148787200",
+ "150003712",
+ "147161088",
+ "145874944",
+ "148062208",
+ "146587648",
+ "146239488",
+ "146448384",
+ "149618688",
+ "146731008",
+ "146817024",
+ "148029440",
+ "143884288",
+ "143904768",
+ "144338944",
+ "150528000",
+ "153956352",
+ "170328064",
+ "169480192",
+ "166031360",
+ "164032512",
+ "156352512",
+ "152584192",
+ "149594112",
+ "151015424",
+ "152793088",
+ "152854528",
+ "158572544",
+ "155385856",
+ "151617536",
+ "151322624",
+ "156491776",
+ "156041216",
+ "155545600",
+ "157372416",
+ "152903680",
+ "157818880",
+ "158097408",
+ "159756288",
+ "159305728",
+ "156852224",
+ "155230208",
+ "154509312",
+ "151814144",
+ "150151168",
+ "150573056",
+ "149635072",
+ "153280512",
+ "151470080",
+ "150413312",
+ "159612928"
+ ],
+ "shutdown": [
+ 904
+ ]
+ },
+ "test_build": {
+ "branch": "Mozilla-Beta",
+ "id": "20120228122102",
+ "name": "Firefox",
+ "revision": "785345035a3b",
+ "version": "14.0a2"
+ },
+ "test_machine": {
+ "name": "qm-pxp01",
+ "os": "linux",
+ "osversion": "Ubuntu 11.10",
+ "platform": "x86_64"
+ },
+ "testrun": {
+ "date": "1343692312",
+ "options": {
+ "responsiveness": "false",
+ "rss": "true",
+ "shutdown": "true",
+ "tpchrome": "true",
+ "tpcycles": "3",
+ "tpdelay": "",
+ "tpmozafterpaint": "false",
+ "tppagecycles": "1",
+ "tprender": "false"
+ },
+ "suite": "Talos tp5n"
+ }
+}
View
0  vendor/corsheaders/__init__.py
No changes.
View
30 vendor/corsheaders/defaults.py
@@ -0,0 +1,30 @@
+from django.conf import settings
+
+default_headers = (
+ 'x-requested-with',
+ 'content-type',
+ 'accept',
+ 'origin',
+ 'authorization',
+)
+CORS_ALLOW_HEADERS = getattr(settings, 'CORS_ALLOW_HEADERS', default_headers)
+
+default_methods = (
+ 'GET',
+ 'POST',
+ 'PUT',
+ 'PATCH',
+ 'DELETE',
+ 'OPTIONS',
+)
+CORS_ALLOW_METHODS = getattr(settings, 'CORS_ALLOW_METHODS', default_methods)
+
+CORS_ALLOW_CREDENTIALS = getattr(settings, 'CORS_ALLOW_CREDENTIALS', False)
+
+CORS_PREFLIGHT_MAX_AGE = getattr(settings, 'CORS_PREFLIGHT_MAX_AGE', 86400)
+
+CORS_ORIGIN_ALLOW_ALL = getattr(settings, 'CORS_ORIGIN_ALLOW_ALL', False)
+
+CORS_ORIGIN_WHITELIST = getattr(settings, 'CORS_ORIGIN_WHITELIST', ())
+
+CORS_EXPOSE_HEADERS = getattr(settings, 'CORS_EXPOSE_HEADERS', ())
View
47 vendor/corsheaders/middleware.py
@@ -0,0 +1,47 @@
+from django import http
+from urlparse import urlparse
+
+from corsheaders import defaults as settings
+
+
+class CorsMiddleware(object):
+
+ def process_request(self, request):
+ '''
+ If CORS preflight header, then create an empty body response (200 OK) and return it
+
+ Django won't bother calling any other request view/exception middleware along with
+ the requested view; it will call any response middlewares
+ '''
+ if request.method == 'OPTIONS' and request.META.get('HTTP_ACCESS_CONTROL_REQUEST_METHOD'):
+ response = http.HttpResponse()
+ return response
+ return None
+
+ def process_response(self, request, response):
+ '''
+ Add the respective CORS headers
+ '''
+ origin = request.META.get('HTTP_ORIGIN')
+ if origin:
+ # todo: check hostname from db instead
+ url = urlparse(origin)
+
+ if not settings.CORS_ORIGIN_ALLOW_ALL and url.hostname not in settings.CORS_ORIGIN_WHITELIST:
+ return response
+
+ response['Access-Control-Allow-Origin'] = "*" if settings.CORS_ORIGIN_ALLOW_ALL else origin
+
+ if len(settings.CORS_EXPOSE_HEADERS):
+ response['Access-Control-Expose-Headers'] = ', '.join(settings.CORS_EXPOSE_HEADERS)
+
+ if settings.CORS_ALLOW_CREDENTIALS:
+ response['Access-Control-Allow-Credentials'] = 'true'
+
+ if request.method == 'OPTIONS':
+ response['Access-Control-Allow-Headers'] = ', '.join(settings.CORS_ALLOW_HEADERS)
+ response['Access-Control-Allow-Methods'] = ', '.join(settings.CORS_ALLOW_METHODS)
+ if settings.CORS_PREFLIGHT_MAX_AGE:
+ response['Access-Control-Max-Age'] = settings.CORS_PREFLIGHT_MAX_AGE
+
+ return response
View
1  vendor/datasource/t/character_encoding_data.txt
@@ -0,0 +1 @@
+JägerMonkey
View
10 vendor/django_cors_headers-0.06-py2.6.egg-info/PKG-INFO
@@ -0,0 +1,10 @@
+Metadata-Version: 1.0
+Name: django-cors-headers
+Version: 0.06
+Summary: Django app for handling the server headers required for Cross-Origin Resource Sharing (CORS).
+Home-page: https://github.com/OttoYiu/django-cors-headers
+Author: Otto Yiu
+Author-email: otto@live.ca
+License: UNKNOWN
+Description: UNKNOWN
+Platform: UNKNOWN
View
9 vendor/django_cors_headers-0.06-py2.6.egg-info/SOURCES.txt
@@ -0,0 +1,9 @@
+setup.cfg
+setup.py
+corsheaders/__init__.py
+corsheaders/defaults.py
+corsheaders/middleware.py
+django_cors_headers.egg-info/PKG-INFO
+django_cors_headers.egg-info/SOURCES.txt
+django_cors_headers.egg-info/dependency_links.txt
+django_cors_headers.egg-info/top_level.txt
View
1  vendor/django_cors_headers-0.06-py2.6.egg-info/dependency_links.txt
@@ -0,0 +1 @@
+
View
11 vendor/django_cors_headers-0.06-py2.6.egg-info/installed-files.txt
@@ -0,0 +1,11 @@
+../corsheaders/defaults.py
+../corsheaders/middleware.py
+../corsheaders/__init__.py
+../corsheaders/defaults.pyc
+../corsheaders/middleware.pyc
+../corsheaders/__init__.pyc
+./
+SOURCES.txt
+dependency_links.txt
+top_level.txt
+PKG-INFO
View
1  vendor/django_cors_headers-0.06-py2.6.egg-info/top_level.txt
@@ -0,0 +1 @@
+corsheaders
Please sign in to comment.
Something went wrong with that request. Please try again.