Comparing version 0.0.7 to 0.0.8
@@ -1735,3 +1735,3 @@ /** | ||
var removeD6Param = function (url) { | ||
return url.replace(/[&\?]d6=[1r]/g, ''); | ||
return ensureString(url).replace(/[&\?]d6=[1r]/g, ''); | ||
}; | ||
@@ -1738,0 +1738,0 @@ |
@@ -1,1 +0,1 @@ | ||
!function(n){var t=function(){},e=t,r=t,o=function(){var t=n.XMLHttpRequest,e=n.ActiveXObject;return t?new t:e?new e("Microsoft.XMLHTTP"):!1},u=function(n,t,i,c){z(t)&&(c=i,i=t,t=0);var a=o();return a&&(a.onreadystatechange=function(){if(4==a.readyState){--u._WAITING;var n=a.status,t=200==n,o=t?i||e:c||r,f=tt(a.responseText);f._STATUS=n,f._REQUEST=a,f=f||{_ERROR:"_OFFLINE"},o(f)}},a.open(t?"POST":"GET",n,!0),a.setRequestHeader("x-requested-with","XMLHttpRequest"),t&&a.setRequestHeader("content-type","application/x-www-form-urlencoded"),u._WAITING=(u._WAITING||0)+1,a._URL=n,t&&(a._BODY=t),a._TIME=getTime(),a.send(t||null)),!0},i=function(n,t){if(n)for(var e=0,r=f(n);r>e;e++){var o=t(n[e],e,n);if(o===!1)break}},c=function(n,t){if(n)for(var e in n){var r=t(e,n[e],n);if(r===!1)break}},a=function(n,t){return n&&t&&c(t,function(t,e){n[t]=e}),n},f=function(n){return Z(n)||Y(n)?n.length:0},s=function(n){return f(n)>1},l=function(n,t){return nt(n)&&n.push(t),t},p=function(n){for(var t=function(t){n.push(t)},e=1,r=arguments.length;r>e;e++)i(arguments[e],t)},v=function(n,t){return f(arguments)<2&&(t=n,n=document),Y(t)?n.getElementById(t):t},d=function(n,t){return f(arguments)<2&&(t=n,n=document),n.getElementsByTagName(t||"*")},m=function(n,t){f(arguments)<2&&(t=n,n=document),t=t.split(".");var e,r=(t[0]||"*").toUpperCase(),o=t[1],u="*"==r;return o?(e=[],n.getElementsByClassName?i(n.getElementsByClassName(o),function(n){(u||n.tagName==r)&&e.push(n)}):i(d(n,r),function(n){D(n,o)&&e.push(n)})):e=d(n,r),e},g=function(n,t){var e=(v(n)||{}).parentNode;return t&&e&&e.tagName!=t&&(e=g(e,t)),e},_=function(n){if(!Y(n))return n;n=n||"";var t=n.split("?"),e=t[0].split("."),r=e.slice(1).join(" "),o=e[0].split("#"),u=o[0]||"div",c=o[1],a=t[1],f=_[u]||(_[u]=document.createElement(u)),s=f.cloneNode(!0);return c&&(s.id=c),r&&(s.className=r),a&&(a=a.split("&"),i(a,function(n){var t=n.split("="),e=Q(t[0]),r=Q(t[1]);s[e]=r,s.setAttribute(e,r)})),s},E=function(n,t,e){var r=_(t);return n&&T(n,r,e),r},h=function(n){return v(n).childNodes},T=function(n,t,e){n=v(n),t=v(t),n&&t&&($(e)&&(e=h(n)[e]),n.insertBefore(t,e||null))},N=function(n,t){n=v(n),n&&(n.innerHTML=t)},R=function(n){return n=v(n),n?n.className:void 0},D=function(n,t){var e=new RegExp("(^|\\s)"+t+"(\\s|$)");return e.test(R(n))},L=function(n,t){n=v(n),n&&(n.className+=" "+t)},y=function(n,t){if(n=v(n)){var e=R(n).split(/\s/),r=[];i(e,function(n){n!=t&&r.push(n)}),n.className=r.join(" ")}},A=function(n,t){var e=d("head")[0],r=E(e,"script");t&&(r.onload=t,r.onreadystatechange=function(){S(r)&&t()}),r.src=n},C=function(n,t,e){(!t||z(t))&&(e=t,t=n,n=document);var r;if(M(t,",")){r=[];var o=F(t);i(o,function(t){var e=C(n,t);f(e)&&p(r,e)})}else if(M(t," ")){var u=t.indexOf(" "),c=t.substr(0,u),a=t.substr(u+1);r=[],C(n,c,function(n){var t=C(n,a);p(r,t)})}else if("#"==t[0]){var s=v(n,t.substr(1));r=s?[s]:[]}else r=m(n,t);return e&&i(r,e),r},I=function(t,e,r,o,u){if(M(e," ")){var c=W(e);return void i(c,function(n){I(t,n,r,o,u)})}if(t=v(t)){var a=function(i){i=i||n.event;var c=i.target||i.srcElement;3==c.nodeType&&(c=g(c));var a=i.relatedTarget||i.toElement;if("mouseout"==e)for(;a=g(a);)if(a==c)return;return r(t,i,c,u||o)};t.addEventListener?t.addEventListener(e,a,!0):t.attachEvent?t.attachEvent("on"+e,a):t["on"+e]=a;var f=t._HANDLERS=t._HANDLERS||{},s=f[e]=f[e]||[];l(s,r)}},b=function(n){n.preventDefault()},O=function(n,t,e,r,o,u){t=t.split(".");var i=t[0].toUpperCase(),c=t[1],a=function(n,t,e,o){return i&&e.tagName!=i||c&&!D(e,c)?(e=g(e),void(e&&a(n,t,e,o))):r(e,t,n,u||o)};I(n,e,a,o)},S=function(n){var t=n.readyState;return"complete"==t||"script"==n.tagName&&"loaded"==t},U=function(n){if(n=v(n)){var t=n.type[0],e=n.value,r=n.checked,o=n.options;return"c"==t||"r"==t?e=r?e:null:n.multiple?(e=[],i(o,function(n){n.selected&&l(e,n.value)})):o&&(e=o[n.selectedIndex].value),e}},H=function(){var t=n.history||{};return i(["push","replace"],function(n){var e=t[n+"State"];t[n]=function(n){e&&e.apply(t,[null,null,n])}}),t},w=function(n){H().push(n)},x=function(t){I(n,"popstate",t)},G=function(){B("error",arguments)},k=function(){B("log",arguments)},B=function(t,e){var r=n.console;r&&r[t]&&r[t].apply(r,e)},j=function(n){return Y(n)?n:""+n},M=function(n,t){return j(n).indexOf(t)>-1},q=function(n,t){return 0==j(n).indexOf(t)},P=function(n){return j(n).replace(/^\s+|\s+$/g,"")},F=function(n){return j(n).split(",")},W=function(n){return j(n).split(" ")},X=function(n,t,e){var r=n.match(t);r&&e.apply(n,r)},J=function(n){return j(n).toLowerCase()},K=function(n){return encodeURIComponent(n)},Q=function(n){return decodeURIComponent(n)},V=function(n,t){return typeof n==t},$=function(n){return V(n,"number")},Y=function(n){return V(n,"string")},z=function(n){return V(n,"function")},Z=function(n,t){return n instanceof(t||Object)},nt=function(n){return Z(n,Array)},tt=function(t){if("{"==t[0])try{var e=n.eval;e("eval.J="+t),t=e.J}catch(r){G('[Jymin] Could not parse JS: "'+t+'"')}return t},et=function(n){tt("0;"+n)};!function(){var t,e,r=n.D6=function(n){a(o,n),f||p()},o=r._VIEWS={},c=r._CACHE={},f=!1,p=function(){t=document.body,O(t,"a","click",function(n,t){var e=m(n.href),r=t.which,o=!r||1==r;v(e)&&o&&(b(t),h(e))}),O(t,"a","mouseover",function(n){if(!D(n,"_NOPREFETCH")){var t=m(n.href),e=t!=m(location);e&&v(t)&&E(t)}});var n=function(n){var t=n.form;t&&(t._LAST_CHANGED=getTime())};O(t,"input","change",n),O(t,"select","change",n),O(t,"textarea","change",n);var e=function(n){if("submit"==n.type){var t=n.form;t&&t._CLICKED_BUTTON!=n&&(t._CLICKED_BUTTON=n,t._LAST_CHANGED=getTime())}};O(t,"input","click",e),O(t,"button","click",e),O(t,"form","submit",function(n,t){var e=m(n.action),r="get"==J(n.method);if(v(e)){b(t);var o=[];C(n,"input,select,textarea,button",function(t){var e=t.name,r=t.type,u=U(t),c=!e;c=c||"radio"==r&&!u,c=c||"submit"==r&&t!=n._CLICKED_BUTTON,c||(Y(u)?l(o,K(e)+"="+K(u)):i(u,function(n){l(o,K(e)+"="+K(n))}))}),r?(e+=(M(e,"?")?"&":"?")+o.join("&"),o=0):(e=g(e,n._LAST_CHANGED),o=o.join("&")),h(e,o)}});x(function(){h(location)}),f=!0},v=function(n){return q(n,location.protocol+"//"+location.host+"/")},m=function(n){return j(n).replace(/#.*$/,"")},g=function(n,t){return n+(M(n,"?")?"&":"?")+"d6="+(t||1)},_=function(n){return n.replace(/[&\?]d6=[1r]/g,"")},E=function(n){c[n]||(k('[D6] Prefetching "'+n+'".'),c[n]=[function(t){k('[D6] Executing callbacks for prefetched URL "'+n+'".'),c[n]=t;var e=t.ttl||1e4;setTimeout(function(){nt(c[n])||(k('[D6] Removing "'+n+'" from prefetch cache.'),delete c[n])},e)}],T(n))},h=r._LOAD_URL=function(n,t){r._LOADING_URL=_(n),r._LOAD_STARTED=getTime(),k('[D6] Loading "'+n+'".'),C("._SPINNER",function(n){L(n,"_LOADING")});var e=c[n];e?nt(e)?(k('[D6] Queueing callback for "'+n+'".'),l(e,R)):(k('[D6] Found precached response for "'+n+'".'),R(e)):(k('[D6] Creating callback queue for "'+n+'".'),c[n]=[R],T(n,t))},T=function(n,t){k('[D6] Fetching response for "'+n+'".');var e=g(n),r=function(t){var e=c[n];c[n]=t,k("[D6] Running "+e.length+' callback(s) for "'+n+'".'),i(e,function(n){n(t)})};u(e,t,r,r,1)},R=function(t){r._CONTEXT=t;var e,u=(t._ERROR,_(t._REQUEST._URL)),i=t.d6u||u,a=t.d6||"error0",f=r._VIEW=o[a];u==r._LOADING_URL&&(C("._SPINNER",function(n){y(n,"_LOADING")}),Y(t)&&"<"==P(t)[0]?(e=t,k("[D6] Rendering HTML string")):f?(e=f.call(o,t),k('[D6] Rendering view "'+a+'".')):(G('[D6] View "'+a+'" not found. Changing location.'),n.location=i)),e&&(I(e),w(i),delete c[u])},I=function(n){X(n,/<title.*?>([\s\S]+)<\/title>/,function(n,t){document.title=t});var e=[];n=n.replace(/<script.*?>([\s\S]*?)<\/script>/g,function(n,t){return t&&(e.push(t),n=""),n}),X(n,/<body.*?>([\s\S]+)<\/body>/,function(n,e){N(t,e),t.scrollTop=0}),e.forEach(et),onReady()},S=d("script");i(S,function(n){var t=j(n.src).split("?");s(t)&&(e=t[1])}),A("/d6.js?"+e)}()}(window); | ||
!function(n){var t=function(){},e=t,r=t,o=function(){var t=n.XMLHttpRequest,e=n.ActiveXObject;return t?new t:e?new e("Microsoft.XMLHTTP"):!1},u=function(n,t,i,c){z(t)&&(c=i,i=t,t=0);var a=o();return a&&(a.onreadystatechange=function(){if(4==a.readyState){--u._WAITING;var n=a.status,t=200==n,o=t?i||e:c||r,f=tt(a.responseText);f._STATUS=n,f._REQUEST=a,f=f||{_ERROR:"_OFFLINE"},o(f)}},a.open(t?"POST":"GET",n,!0),a.setRequestHeader("x-requested-with","XMLHttpRequest"),t&&a.setRequestHeader("content-type","application/x-www-form-urlencoded"),u._WAITING=(u._WAITING||0)+1,a._URL=n,t&&(a._BODY=t),a._TIME=getTime(),a.send(t||null)),!0},i=function(n,t){if(n)for(var e=0,r=f(n);r>e;e++){var o=t(n[e],e,n);if(o===!1)break}},c=function(n,t){if(n)for(var e in n){var r=t(e,n[e],n);if(r===!1)break}},a=function(n,t){return n&&t&&c(t,function(t,e){n[t]=e}),n},f=function(n){return Z(n)||Y(n)?n.length:0},s=function(n){return f(n)>1},l=function(n,t){return nt(n)&&n.push(t),t},p=function(n){for(var t=function(t){n.push(t)},e=1,r=arguments.length;r>e;e++)i(arguments[e],t)},v=function(n,t){return f(arguments)<2&&(t=n,n=document),Y(t)?n.getElementById(t):t},d=function(n,t){return f(arguments)<2&&(t=n,n=document),n.getElementsByTagName(t||"*")},m=function(n,t){f(arguments)<2&&(t=n,n=document),t=t.split(".");var e,r=(t[0]||"*").toUpperCase(),o=t[1],u="*"==r;return o?(e=[],n.getElementsByClassName?i(n.getElementsByClassName(o),function(n){(u||n.tagName==r)&&e.push(n)}):i(d(n,r),function(n){D(n,o)&&e.push(n)})):e=d(n,r),e},g=function(n,t){var e=(v(n)||{}).parentNode;return t&&e&&e.tagName!=t&&(e=g(e,t)),e},_=function(n){if(!Y(n))return n;n=n||"";var t=n.split("?"),e=t[0].split("."),r=e.slice(1).join(" "),o=e[0].split("#"),u=o[0]||"div",c=o[1],a=t[1],f=_[u]||(_[u]=document.createElement(u)),s=f.cloneNode(!0);return c&&(s.id=c),r&&(s.className=r),a&&(a=a.split("&"),i(a,function(n){var t=n.split("="),e=Q(t[0]),r=Q(t[1]);s[e]=r,s.setAttribute(e,r)})),s},E=function(n,t,e){var r=_(t);return n&&T(n,r,e),r},h=function(n){return v(n).childNodes},T=function(n,t,e){n=v(n),t=v(t),n&&t&&($(e)&&(e=h(n)[e]),n.insertBefore(t,e||null))},N=function(n,t){n=v(n),n&&(n.innerHTML=t)},R=function(n){return n=v(n),n?n.className:void 0},D=function(n,t){var e=new RegExp("(^|\\s)"+t+"(\\s|$)");return e.test(R(n))},L=function(n,t){n=v(n),n&&(n.className+=" "+t)},y=function(n,t){if(n=v(n)){var e=R(n).split(/\s/),r=[];i(e,function(n){n!=t&&r.push(n)}),n.className=r.join(" ")}},A=function(n,t){var e=d("head")[0],r=E(e,"script");t&&(r.onload=t,r.onreadystatechange=function(){S(r)&&t()}),r.src=n},C=function(n,t,e){(!t||z(t))&&(e=t,t=n,n=document);var r;if(M(t,",")){r=[];var o=F(t);i(o,function(t){var e=C(n,t);f(e)&&p(r,e)})}else if(M(t," ")){var u=t.indexOf(" "),c=t.substr(0,u),a=t.substr(u+1);r=[],C(n,c,function(n){var t=C(n,a);p(r,t)})}else if("#"==t[0]){var s=v(n,t.substr(1));r=s?[s]:[]}else r=m(n,t);return e&&i(r,e),r},I=function(t,e,r,o,u){if(M(e," ")){var c=W(e);return void i(c,function(n){I(t,n,r,o,u)})}if(t=v(t)){var a=function(i){i=i||n.event;var c=i.target||i.srcElement;3==c.nodeType&&(c=g(c));var a=i.relatedTarget||i.toElement;if("mouseout"==e)for(;a=g(a);)if(a==c)return;return r(t,i,c,u||o)};t.addEventListener?t.addEventListener(e,a,!0):t.attachEvent?t.attachEvent("on"+e,a):t["on"+e]=a;var f=t._HANDLERS=t._HANDLERS||{},s=f[e]=f[e]||[];l(s,r)}},b=function(n){n.preventDefault()},O=function(n,t,e,r,o,u){t=t.split(".");var i=t[0].toUpperCase(),c=t[1],a=function(n,t,e,o){return i&&e.tagName!=i||c&&!D(e,c)?(e=g(e),void(e&&a(n,t,e,o))):r(e,t,n,u||o)};I(n,e,a,o)},S=function(n){var t=n.readyState;return"complete"==t||"script"==n.tagName&&"loaded"==t},U=function(n){if(n=v(n)){var t=n.type[0],e=n.value,r=n.checked,o=n.options;return"c"==t||"r"==t?e=r?e:null:n.multiple?(e=[],i(o,function(n){n.selected&&l(e,n.value)})):o&&(e=o[n.selectedIndex].value),e}},H=function(){var t=n.history||{};return i(["push","replace"],function(n){var e=t[n+"State"];t[n]=function(n){e&&e.apply(t,[null,null,n])}}),t},w=function(n){H().push(n)},x=function(t){I(n,"popstate",t)},G=function(){B("error",arguments)},k=function(){B("log",arguments)},B=function(t,e){var r=n.console;r&&r[t]&&r[t].apply(r,e)},j=function(n){return Y(n)?n:""+n},M=function(n,t){return j(n).indexOf(t)>-1},q=function(n,t){return 0==j(n).indexOf(t)},P=function(n){return j(n).replace(/^\s+|\s+$/g,"")},F=function(n){return j(n).split(",")},W=function(n){return j(n).split(" ")},X=function(n,t,e){var r=n.match(t);r&&e.apply(n,r)},J=function(n){return j(n).toLowerCase()},K=function(n){return encodeURIComponent(n)},Q=function(n){return decodeURIComponent(n)},V=function(n,t){return typeof n==t},$=function(n){return V(n,"number")},Y=function(n){return V(n,"string")},z=function(n){return V(n,"function")},Z=function(n,t){return n instanceof(t||Object)},nt=function(n){return Z(n,Array)},tt=function(t){if("{"==t[0])try{var e=n.eval;e("eval.J="+t),t=e.J}catch(r){G('[Jymin] Could not parse JS: "'+t+'"')}return t},et=function(n){tt("0;"+n)};!function(){var t,e,r=n.D6=function(n){a(o,n),f||p()},o=r._VIEWS={},c=r._CACHE={},f=!1,p=function(){t=document.body,O(t,"a","click",function(n,t){var e=m(n.href),r=t.which,o=!r||1==r;v(e)&&o&&(b(t),h(e))}),O(t,"a","mouseover",function(n){if(!D(n,"_NOPREFETCH")){var t=m(n.href),e=t!=m(location);e&&v(t)&&E(t)}});var n=function(n){var t=n.form;t&&(t._LAST_CHANGED=getTime())};O(t,"input","change",n),O(t,"select","change",n),O(t,"textarea","change",n);var e=function(n){if("submit"==n.type){var t=n.form;t&&t._CLICKED_BUTTON!=n&&(t._CLICKED_BUTTON=n,t._LAST_CHANGED=getTime())}};O(t,"input","click",e),O(t,"button","click",e),O(t,"form","submit",function(n,t){var e=m(n.action),r="get"==J(n.method);if(v(e)){b(t);var o=[];C(n,"input,select,textarea,button",function(t){var e=t.name,r=t.type,u=U(t),c=!e;c=c||"radio"==r&&!u,c=c||"submit"==r&&t!=n._CLICKED_BUTTON,c||(Y(u)?l(o,K(e)+"="+K(u)):i(u,function(n){l(o,K(e)+"="+K(n))}))}),r?(e+=(M(e,"?")?"&":"?")+o.join("&"),o=0):(e=g(e,n._LAST_CHANGED),o=o.join("&")),h(e,o)}});x(function(){h(location)}),f=!0},v=function(n){return q(n,location.protocol+"//"+location.host+"/")},m=function(n){return j(n).replace(/#.*$/,"")},g=function(n,t){return n+(M(n,"?")?"&":"?")+"d6="+(t||1)},_=function(n){return j(n).replace(/[&\?]d6=[1r]/g,"")},E=function(n){c[n]||(k('[D6] Prefetching "'+n+'".'),c[n]=[function(t){k('[D6] Executing callbacks for prefetched URL "'+n+'".'),c[n]=t;var e=t.ttl||1e4;setTimeout(function(){nt(c[n])||(k('[D6] Removing "'+n+'" from prefetch cache.'),delete c[n])},e)}],T(n))},h=r._LOAD_URL=function(n,t){r._LOADING_URL=_(n),r._LOAD_STARTED=getTime(),k('[D6] Loading "'+n+'".'),C("._SPINNER",function(n){L(n,"_LOADING")});var e=c[n];e?nt(e)?(k('[D6] Queueing callback for "'+n+'".'),l(e,R)):(k('[D6] Found precached response for "'+n+'".'),R(e)):(k('[D6] Creating callback queue for "'+n+'".'),c[n]=[R],T(n,t))},T=function(n,t){k('[D6] Fetching response for "'+n+'".');var e=g(n),r=function(t){var e=c[n];c[n]=t,k("[D6] Running "+e.length+' callback(s) for "'+n+'".'),i(e,function(n){n(t)})};u(e,t,r,r,1)},R=function(t){r._CONTEXT=t;var e,u=(t._ERROR,_(t._REQUEST._URL)),i=t.d6u||u,a=t.d6||"error0",f=r._VIEW=o[a];u==r._LOADING_URL&&(C("._SPINNER",function(n){y(n,"_LOADING")}),Y(t)&&"<"==P(t)[0]?(e=t,k("[D6] Rendering HTML string")):f?(e=f.call(o,t),k('[D6] Rendering view "'+a+'".')):(G('[D6] View "'+a+'" not found. Changing location.'),n.location=i)),e&&(I(e),w(i),delete c[u])},I=function(n){X(n,/<title.*?>([\s\S]+)<\/title>/,function(n,t){document.title=t});var e=[];n=n.replace(/<script.*?>([\s\S]*?)<\/script>/g,function(n,t){return t&&(e.push(t),n=""),n}),X(n,/<body.*?>([\s\S]+)<\/body>/,function(n,e){N(t,e),t.scrollTop=0}),e.forEach(et),onReady()},S=d("script");i(S,function(n){var t=j(n.src).split("?");s(t)&&(e=t[1])}),A("/d6.js?"+e)}()}(window); |
@@ -7,3 +7,3 @@ { | ||
], | ||
"version": "0.0.7", | ||
"version": "0.0.8", | ||
"main": "d6.js", | ||
@@ -10,0 +10,0 @@ "homepage": "http://lighter.io/d6", |
@@ -151,3 +151,3 @@ /** | ||
var removeD6Param = function (url) { | ||
return url.replace(/[&\?]d6=[1r]/g, ''); | ||
return ensureString(url).replace(/[&\?]d6=[1r]/g, ''); | ||
}; | ||
@@ -154,0 +154,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
70928
1