Comparing version 0.1.3 to 0.1.4
/** | ||
* ____ __ ____ _ _ _ ___ _ _____ | ||
* | _ \ / /_ / ___| (_) ___ _ __ | |_ __ __/ _ \ / | |___ / | ||
* | | | | '_ \ | | | | |/ _ \ '_ \| __| \ \ / / | | || | |_ \ | ||
* | |_| | (_) | | |___| | | __/ | | | |_ \ V /| |_| || |_ ___) | | ||
* |____/ \___/ \____|_|_|\___|_| |_|\__| \_/ \___(_)_(_)____/ | ||
* ____ __ ____ _ _ _ ___ _ _ _ | ||
* | _ \ / /_ / ___| (_) ___ _ __ | |_ __ __/ _ \ / || || | | ||
* | | | | '_ \ | | | | |/ _ \ '_ \| __| \ \ / / | | || || || |_ | ||
* | |_| | (_) | | |___| | | __/ | | | |_ \ V /| |_| || ||__ _| | ||
* |____/ \___/ \____|_|_|\___|_| |_|\__| \_/ \___(_)_(_) |_| | ||
* | ||
@@ -2045,16 +2045,16 @@ * | ||
/** | ||
* Insert a script to load D6 templates, using the cachebust from "/a.js". | ||
* Insert a script to load D6 templates. | ||
*/ | ||
var cacheBust; | ||
var scripts = getElementsByTagName('script'); | ||
forEach(scripts, function (script) { | ||
var pair = ensureString(script.src).split('?'); | ||
if (hasMany(pair)) { | ||
cacheBust = pair[1]; | ||
var cacheBust = ''; | ||
one('link,script', function (element) { | ||
var delimiter = '?v='; | ||
var pair = ensureString(element.src || element.href).split(delimiter); | ||
if (pair[1]) { | ||
cacheBust = delimiter + pair[1]; | ||
} | ||
}); | ||
insertScript('/d6.js?' + cacheBust); | ||
insertScript('/d6.js' + cacheBust); | ||
})(); | ||
@@ -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},i=function(n,t,u,c){tt(t)&&(c=u,u=t,t=0);var a=o();return a&&(c=c||r,u=u||e,a.onreadystatechange=function(){if(4==a.readyState){j('[Jymin] Received response from "'+n+'". ('+i._WAITING+" in progress)."),--i._WAITING;var t=a.status,o=200==t,f=o?u||e:c||r,s=parse(a.responseText);s._STATUS=t,s._REQUEST=a,f(s)}},a.open(t?"POST":"GET",n,!0),a.setRequestHeader("x-requested-with","XMLHttpRequest"),t&&a.setRequestHeader("content-type","application/x-www-form-urlencoded"),a._URL=n,t&&(a._BODY=t),a._TIME=getTime(),i._WAITING=(i._WAITING||0)+1,j('[Jymin] Sending request to "'+n+'". ('+i._WAITING+" in progress)."),a.send(t||null)),!0},u=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 et(n)||nt(n)?n.length:0},s=function(n){return f(n)>1},l=function(n,t){return rt(n)&&n.push(t),t},p=function(n){for(var t=function(t){n.push(t)},e=1,r=arguments.length;r>e;e++)u(arguments[e],t)},v=function(n,t){return f(arguments)<2&&(t=n,n=document),nt(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],i="*"==r;return o?(e=[],n.getElementsByClassName?u(n.getElementsByClassName(o),function(n){(i||n.tagName==r)&&e.push(n)}):u(d(n,r),function(n){L(n,o)&&e.push(n)})):e=d(n,r),e},_=function(n,t){var e=(v(n)||{}).parentNode;return t&&e&&e.tagName!=t&&(e=_(e,t)),e},g=function(n){if(!nt(n))return n;n=n||"";var t=n.split("?"),e=t[0].split("."),r=e.slice(1).join(" "),o=e[0].split("#"),i=o[0]||"div",c=o[1],a=t[1],f=g[i]||(g[i]=document.createElement(i)),s=f.cloneNode(!0);return c&&(s.id=c),r&&(s.className=r),a&&(a=a.split("&"),u(a,function(n){var t=n.split("="),e=Y(t[0]),r=Y(t[1]);s[e]=r,s.setAttribute(e,r)})),s},T=function(n,t,e){var r=g(t);return n&&D(n,r,e),r},E=function(n){return v(n).childNodes},D=function(n,t,e){n=v(n),t=v(t),n&&t&&(Z(e)&&(e=E(n)[e]),n.insertBefore(t,e||null))},N=function(n,t){n=v(n),n&&(n.innerHTML=t)},h=function(n,t){return n=v(n),n?n.getAttribute(t):void 0},R=function(n,t){return h(n,"data-"+t)},A=function(n){return n=v(n),n?n.className:void 0},L=function(n,t){var e=new RegExp("(^|\\s)"+t+"(\\s|$)");return e.test(A(n))},I=function(n,t){n=v(n),n&&(n.className+=" "+t)},y=function(n,t){if(n=v(n)){var e=A(n).split(/\s/),r=[];u(e,function(n){n!=t&&r.push(n)}),n.className=r.join(" ")}},C=function(n,t){var e=d("head")[0],r=T(e,"script");t&&(r.onload=t,r.onreadystatechange=function(){w(r)&&t()}),r.src=n},b=function(n,t,e){(!t||tt(t))&&(e=t,t=n,n=document);var r;if(P(t,",")){r=[];var o=$(t);u(o,function(t){var e=b(n,t);f(e)&&p(r,e)})}else if(P(t," ")){var i=t.indexOf(" "),c=t.substr(0,i),a=t.substr(i+1);r=[],b(n,c,function(n){var t=b(n,a);p(r,t)})}else if("#"==t[0]){var s=t.substr(1),l=v(n.ownerDocument||document,s);if(l)for(var d=_(l);d;){if(d===n){r=[l];break}d=_(d)}}else r=m(n,t);return e&&u(r,e),r||[]},O=function(t,e,r,o){var i=rt(c);if(i||P(e," ")){var c=i?e:F(e);return void u(c,function(n){O(t,n,r,o)})}if(t=v(t)){var a=function(i){i=i||n.event;var u=i.target||i.srcElement;3==u.nodeType&&(u=_(u));var c=i.relatedTarget||i.toElement;if("mouseout"==e)for(;c=_(c);)if(c==u)return;var a=r(t,i,u,o);a===!1&&G(i)};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)}},S=function(n,t,e,r,o){tt(t)?(o=e,r=t,e=n,t="",n=document):tt(e)&&(o=r,r=e,e=t,t=n,n=document);var i=t.split(","),c=function(n,t,e,o){u(i,function(i){var u=!1;if("#"==i[0]&&i==e.id)u=!0;else{var c=i.split("."),a=c[0].toUpperCase(),f=c[1];a&&e.tagName!=a||(!f||L(e,f))&&(u=!0)}if(u){var s=r(e,t,n,o);s===!1&&G(t)}}),e=_(e),e&&c(n,t,e,o)};O(n,e,c,o)},G=function(n){n?n.preventDefault&&n.preventDefault():W("[Jymin] Called preventDefault on a non-event.",n)},w=function(n){var t=n.readyState;return"complete"==t||"script"==n.tagName&&"loaded"==t},H=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=[],u(o,function(n){n.selected&&l(e,n.value)})):o&&(e=o[n.selectedIndex].value),e}},U=function(){var t=n.history||{};return u(["push","replace"],function(n){var e=t[n+"State"];t[n]=function(n){e&&e.apply(t,[null,null,n])}}),t},x=function(n){U().push(n)},k=function(n){U().replace(n)},B=function(t){O(n,"popstate",t)},W=function(){q("error",arguments)},j=function(){q("log",arguments)},q=function(t,e){var r=n.console;r&&r[t]&&r[t].apply(r,e)},M=function(n){return nt(n)?n:""+n},P=function(n,t){return M(n).indexOf(t)>-1},V=function(n,t){return 0==M(n).indexOf(t)},X=function(n){return M(n).replace(/^\s+|\s+$/g,"")},$=function(n){return M(n).split(",")},F=function(n){return M(n).split(" ")},J=function(n,t,e){var r=n.match(t);r&&e.apply(n,r)},K=function(n){return M(n).toLowerCase()},Q=function(n){return encodeURIComponent(n)},Y=function(n){return decodeURIComponent(n)},z=function(n,t){return typeof n==t},Z=function(n){return z(n,"number")},nt=function(n){return z(n,"string")},tt=function(n){return z(n,"function")},et=function(n,t){return n instanceof(t||Object)},rt=function(n){return et(n,Array)};!function(){var t,e=n.D6=function(n){a(r,n),c||f()},r=e._VIEWS={},o=e._CACHE={},c=(e._RENDER=function(n,t){return r[n].call(r,t||e._CONTEXT)},!1),f=function(){S("a","click",function(n,t){var e=v(n.href);if(e){var r=t.which,o=!r||1==r;p(e)&&o&&(G(t),E(e,0,n))}}),S("a","mouseover",function(n){if(!L(n,"_NOPREFETCH")){var t=v(n.href),e=t!=v(location);e&&p(t)&&T(t)}}),S("input,select,textarea","change",function(n){var t=n.form;t&&(t._LAST_CHANGED=getTime())}),S("input,button","click",function(n){if("submit"==n.type){var t=n.form;t&&t._CLICKED_BUTTON!=n&&(t._CLICKED_BUTTON=n,t._LAST_CHANGED=getTime())}}),S("form","submit",function(n,t){var e=v(n.action||location.href.replace(/\?.*$/,"")),r=h(n,"enctype"),o="get"==K(n.method);if(p(e)&&!/multipart/.test(r)){G(t);var i=n._VALIDATE?n._VALIDATE():!0;if(!i)return;var c=[];b(n,"input,select,textarea,button",function(t){var e=t.name,r=t.type,o=H(t),i=!e;i=i||"radio"==r&&!o,i=i||"submit"==r&&t!=n._CLICKED_BUTTON,i||(nt(o)?l(c,Q(e)+"="+Q(o)):u(o,function(n){l(c,Q(e)+"="+Q(n))}))}),o?(e+=(P(e,"?")?"&":"?")+c.join("&"),c=0):(e=_(e,n._LAST_CHANGED),c=c.join("&")),E(e,c,n)}});B(function(){E(location)}),c=!0},p=function(n){return V(n,location.protocol+"//"+location.host+"/")},v=function(n){return M(n).replace(/#.*$/,"")},m=function(n){return M(n).replace(/\?.*$/,"")},_=function(n,t){return n+(P(n,"?")?"&":"?")+"d6="+(t||1)},g=function(n){return M(n).replace(/[&\?]d6=[r\d]+/g,"")},T=function(n){o[n]||(j('[D6] Prefetching "'+n+'".'),o[n]=[function(t){j('[D6] Caching contents for prefetched URL "'+n+'".'),o[n]=t;var e=t.ttl||1e4;setTimeout(function(){rt(o[n])||(j('[D6] Removing "'+n+'" from prefetch cache.'),delete o[n])},e)}],D(n))},E=e._LOAD_URL=function(n,t,r){e._LOADING_URL=g(n),e._LOAD_STARTED=getTime();var i=R(r,"_D6_TARGET"),u=R(r,"_D6_VIEW");i&&b(i,function(n){I(n,"_D6_TARGET")}),j('[D6] Loading "'+n+'".'),b("._SPINNER",function(n){I(n,"_LOADING")});var c=function(n,t){A(n,t,i,u)},a=o[n];a?rt(a)?(j('[D6] Queueing callback for "'+n+'".'),l(a,c)):(j('[D6] Found precached response for "'+n+'".'),c(a,n)):(j('[D6] Creating callback queue for "'+n+'".'),o[n]=[c],D(n,t))},D=function(n,t){j('[D6] Fetching response for "'+n+'".');var e=_(n),r=function(t){var e=o[n];o[n]=t,j("[D6] Running "+e.length+' callback(s) for "'+n+'".'),u(e,function(e){e(t,n)})};i(e,t,r,r,1)},A=function(t,i,u,c){e._CONTEXT=t;var a,f=(t._ERROR,g(t.d6u||i)),s=c||t.d6||"error0",l=e._VIEW=r[s];if(i=g(i),i==e._LOADING_URL&&(b("._SPINNER,._D6_TARGET",function(n){y(n,"_LOADING")}),"<"==X(t)[0]?(a=t,j("[D6] Rendering HTML string")):l?(a=l.call(r,t),j('[D6] Rendering view "'+s+'".')):(W('[D6] View "'+s+'" not found. Changing location.'),n.location=f)),a){O(a,u);var p=m(f)==m(location.href),v=p?k:x;v(f),delete o[i]}},O=function(n,t){var e=document.body;J(n,/<title.*?>([\s\S]+)<\/title>/,function(n,t){document.title=t});var r=[];n=n.replace(/<script.*?>([\s\S]*?)<\/script>/g,function(n,t){return t&&(r.push(t),n=""),n}),t?(b(t,function(t){N(t,n)}),u(r,execute),b(t,function(n){onReady(n)})):(J(n,/<body.*?>([\s\S]+)<\/body>/,function(n,t){N(e,t),e.scrollTop=0}),u(r,execute),onReady(document))},w=d("script");u(w,function(n){var e=M(n.src).split("?");s(e)&&(t=e[1])}),C("/d6.js?"+t)}()}(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},i=function(n,t,u,c){tt(t)&&(c=u,u=t,t=0);var a=o();return a&&(c=c||r,u=u||e,a.onreadystatechange=function(){if(4==a.readyState){j('[Jymin] Received response from "'+n+'". ('+i._WAITING+" in progress)."),--i._WAITING;var t=a.status,o=200==t,f=o?u||e:c||r,s=parse(a.responseText);s._STATUS=t,s._REQUEST=a,f(s)}},a.open(t?"POST":"GET",n,!0),a.setRequestHeader("x-requested-with","XMLHttpRequest"),t&&a.setRequestHeader("content-type","application/x-www-form-urlencoded"),a._URL=n,t&&(a._BODY=t),a._TIME=getTime(),i._WAITING=(i._WAITING||0)+1,j('[Jymin] Sending request to "'+n+'". ('+i._WAITING+" in progress)."),a.send(t||null)),!0},u=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 et(n)||nt(n)?n.length:0},s=function(n,t){return rt(n)&&n.push(t),t},l=function(n){for(var t=function(t){n.push(t)},e=1,r=arguments.length;r>e;e++)u(arguments[e],t)},p=function(n,t){return f(arguments)<2&&(t=n,n=document),nt(t)?n.getElementById(t):t},v=function(n,t){return f(arguments)<2&&(t=n,n=document),n.getElementsByTagName(t||"*")},d=function(n,t){f(arguments)<2&&(t=n,n=document),t=t.split(".");var e,r=(t[0]||"*").toUpperCase(),o=t[1],i="*"==r;return o?(e=[],n.getElementsByClassName?u(n.getElementsByClassName(o),function(n){(i||n.tagName==r)&&e.push(n)}):u(v(n,r),function(n){A(n,o)&&e.push(n)})):e=v(n,r),e},m=function(n,t){var e=(p(n)||{}).parentNode;return t&&e&&e.tagName!=t&&(e=m(e,t)),e},_=function(n){if(!nt(n))return n;n=n||"";var t=n.split("?"),e=t[0].split("."),r=e.slice(1).join(" "),o=e[0].split("#"),i=o[0]||"div",c=o[1],a=t[1],f=_[i]||(_[i]=document.createElement(i)),s=f.cloneNode(!0);return c&&(s.id=c),r&&(s.className=r),a&&(a=a.split("&"),u(a,function(n){var t=n.split("="),e=Y(t[0]),r=Y(t[1]);s[e]=r,s.setAttribute(e,r)})),s},g=function(n,t,e){var r=_(t);return n&&E(n,r,e),r},T=function(n){return p(n).childNodes},E=function(n,t,e){n=p(n),t=p(t),n&&t&&(Z(e)&&(e=T(n)[e]),n.insertBefore(t,e||null))},D=function(n,t){n=p(n),n&&(n.innerHTML=t)},h=function(n,t){return n=p(n),n?n.getAttribute(t):void 0},N=function(n,t){return h(n,"data-"+t)},R=function(n){return n=p(n),n?n.className:void 0},A=function(n,t){var e=new RegExp("(^|\\s)"+t+"(\\s|$)");return e.test(R(n))},L=function(n,t){n=p(n),n&&(n.className+=" "+t)},I=function(n,t){if(n=p(n)){var e=R(n).split(/\s/),r=[];u(e,function(n){n!=t&&r.push(n)}),n.className=r.join(" ")}},y=function(n,t){var e=v("head")[0],r=g(e,"script");t&&(r.onload=t,r.onreadystatechange=function(){w(r)&&t()}),r.src=n},C=function(n,t,e){(!t||tt(t))&&(e=t,t=n,n=document);var r;if(P(t,",")){r=[];var o=$(t);u(o,function(t){var e=C(n,t);f(e)&&l(r,e)})}else if(P(t," ")){var i=t.indexOf(" "),c=t.substr(0,i),a=t.substr(i+1);r=[],C(n,c,function(n){var t=C(n,a);l(r,t)})}else if("#"==t[0]){var s=t.substr(1),v=p(n.ownerDocument||document,s);if(v)for(var _=m(v);_;){if(_===n){r=[v];break}_=m(_)}}else r=d(n,t);return e&&u(r,e),r||[]},b=function(n,t,e){return C(n,t,e)[0]},O=function(t,e,r,o){var i=rt(c);if(i||P(e," ")){var c=i?e:F(e);return void u(c,function(n){O(t,n,r,o)})}if(t=p(t)){var a=function(i){i=i||n.event;var u=i.target||i.srcElement;3==u.nodeType&&(u=m(u));var c=i.relatedTarget||i.toElement;if("mouseout"==e)for(;c=m(c);)if(c==u)return;var a=r(t,i,u,o);a===!1&&G(i)};t.addEventListener?t.addEventListener(e,a,!0):t.attachEvent?t.attachEvent("on"+e,a):t["on"+e]=a;var f=t._HANDLERS=t._HANDLERS||{},l=f[e]=f[e]||[];s(l,r)}},S=function(n,t,e,r,o){tt(t)?(o=e,r=t,e=n,t="",n=document):tt(e)&&(o=r,r=e,e=t,t=n,n=document);var i=t.split(","),c=function(n,t,e,o){u(i,function(i){var u=!1;if("#"==i[0]&&i==e.id)u=!0;else{var c=i.split("."),a=c[0].toUpperCase(),f=c[1];a&&e.tagName!=a||(!f||A(e,f))&&(u=!0)}if(u){var s=r(e,t,n,o);s===!1&&G(t)}}),e=m(e),e&&c(n,t,e,o)};O(n,e,c,o)},G=function(n){n?n.preventDefault&&n.preventDefault():W("[Jymin] Called preventDefault on a non-event.",n)},w=function(n){var t=n.readyState;return"complete"==t||"script"==n.tagName&&"loaded"==t},H=function(n){if(n=p(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=[],u(o,function(n){n.selected&&s(e,n.value)})):o&&(e=o[n.selectedIndex].value),e}},U=function(){var t=n.history||{};return u(["push","replace"],function(n){var e=t[n+"State"];t[n]=function(n){e&&e.apply(t,[null,null,n])}}),t},x=function(n){U().push(n)},k=function(n){U().replace(n)},B=function(t){O(n,"popstate",t)},W=function(){q("error",arguments)},j=function(){q("log",arguments)},q=function(t,e){var r=n.console;r&&r[t]&&r[t].apply(r,e)},M=function(n){return nt(n)?n:""+n},P=function(n,t){return M(n).indexOf(t)>-1},V=function(n,t){return 0==M(n).indexOf(t)},X=function(n){return M(n).replace(/^\s+|\s+$/g,"")},$=function(n){return M(n).split(",")},F=function(n){return M(n).split(" ")},J=function(n,t,e){var r=n.match(t);r&&e.apply(n,r)},K=function(n){return M(n).toLowerCase()},Q=function(n){return encodeURIComponent(n)},Y=function(n){return decodeURIComponent(n)},z=function(n,t){return typeof n==t},Z=function(n){return z(n,"number")},nt=function(n){return z(n,"string")},tt=function(n){return z(n,"function")},et=function(n,t){return n instanceof(t||Object)},rt=function(n){return et(n,Array)};!function(){var t=n.D6=function(n){a(e,n),o||c()},e=t._VIEWS={},r=t._CACHE={},o=(t._RENDER=function(n,r){return e[n].call(e,r||t._CONTEXT)},!1),c=function(){S("a","click",function(n,t){var e=l(n.href);if(e){var r=t.which,o=!r||1==r;f(e)&&o&&(G(t),_(e,0,n))}}),S("a","mouseover",function(n){if(!A(n,"_NOPREFETCH")){var t=l(n.href),e=t!=l(location);e&&f(t)&&m(t)}}),S("input,select,textarea","change",function(n){var t=n.form;t&&(t._LAST_CHANGED=getTime())}),S("input,button","click",function(n){if("submit"==n.type){var t=n.form;t&&t._CLICKED_BUTTON!=n&&(t._CLICKED_BUTTON=n,t._LAST_CHANGED=getTime())}}),S("form","submit",function(n,t){var e=l(n.action||location.href.replace(/\?.*$/,"")),r=h(n,"enctype"),o="get"==K(n.method);if(f(e)&&!/multipart/.test(r)){G(t);var i=n._VALIDATE?n._VALIDATE():!0;if(!i)return;var c=[];C(n,"input,select,textarea,button",function(t){var e=t.name,r=t.type,o=H(t),i=!e;i=i||"radio"==r&&!o,i=i||"submit"==r&&t!=n._CLICKED_BUTTON,i||(nt(o)?s(c,Q(e)+"="+Q(o)):u(o,function(n){s(c,Q(e)+"="+Q(n))}))}),o?(e+=(P(e,"?")?"&":"?")+c.join("&"),c=0):(e=v(e,n._LAST_CHANGED),c=c.join("&")),_(e,c,n)}});B(function(){_(location)}),o=!0},f=function(n){return V(n,location.protocol+"//"+location.host+"/")},l=function(n){return M(n).replace(/#.*$/,"")},p=function(n){return M(n).replace(/\?.*$/,"")},v=function(n,t){return n+(P(n,"?")?"&":"?")+"d6="+(t||1)},d=function(n){return M(n).replace(/[&\?]d6=[r\d]+/g,"")},m=function(n){r[n]||(j('[D6] Prefetching "'+n+'".'),r[n]=[function(t){j('[D6] Caching contents for prefetched URL "'+n+'".'),r[n]=t;var e=t.ttl||1e4;setTimeout(function(){rt(r[n])||(j('[D6] Removing "'+n+'" from prefetch cache.'),delete r[n])},e)}],g(n))},_=t._LOAD_URL=function(n,e,o){t._LOADING_URL=d(n),t._LOAD_STARTED=getTime();var i=N(o,"_D6_TARGET"),u=N(o,"_D6_VIEW");i&&C(i,function(n){L(n,"_D6_TARGET")}),j('[D6] Loading "'+n+'".'),C("._SPINNER",function(n){L(n,"_LOADING")});var c=function(n,t){T(n,t,i,u)},a=r[n];a?rt(a)?(j('[D6] Queueing callback for "'+n+'".'),s(a,c)):(j('[D6] Found precached response for "'+n+'".'),c(a,n)):(j('[D6] Creating callback queue for "'+n+'".'),r[n]=[c],g(n,e))},g=function(n,t){j('[D6] Fetching response for "'+n+'".');var e=v(n),o=function(t){var e=r[n];r[n]=t,j("[D6] Running "+e.length+' callback(s) for "'+n+'".'),u(e,function(e){e(t,n)})};i(e,t,o,o,1)},T=function(o,i,u,c){t._CONTEXT=o;var a,f=(o._ERROR,d(o.d6u||i)),s=c||o.d6||"error0",l=t._VIEW=e[s];if(i=d(i),i==t._LOADING_URL&&(C("._SPINNER,._D6_TARGET",function(n){I(n,"_LOADING")}),"<"==X(o)[0]?(a=o,j("[D6] Rendering HTML string")):l?(a=l.call(e,o),j('[D6] Rendering view "'+s+'".')):(W('[D6] View "'+s+'" not found. Changing location.'),n.location=f)),a){E(a,u);var v=p(f)==p(location.href),m=v?k:x;m(f),delete r[i]}},E=function(n,t){var e=document.body;J(n,/<title.*?>([\s\S]+)<\/title>/,function(n,t){document.title=t});var r=[];n=n.replace(/<script.*?>([\s\S]*?)<\/script>/g,function(n,t){return t&&(r.push(t),n=""),n}),t?(C(t,function(t){D(t,n)}),u(r,execute),C(t,function(n){onReady(n)})):(J(n,/<body.*?>([\s\S]+)<\/body>/,function(n,t){D(e,t),e.scrollTop=0}),u(r,execute),onReady(document))},R="";b("link,script",function(n){var t="?v=",e=M(n.src||n.href).split(t);e[1]&&(R=t+e[1])}),y("/d6.js"+R)}()}(window); |
@@ -7,3 +7,3 @@ { | ||
], | ||
"version": "0.1.3", | ||
"version": "0.1.4", | ||
"main": "d6.js", | ||
@@ -10,0 +10,0 @@ "homepage": "http://lighter.io/d6", |
@@ -370,15 +370,15 @@ /** | ||
/** | ||
* Insert a script to load D6 templates, using the cachebust from "/a.js". | ||
* Insert a script to load D6 templates. | ||
*/ | ||
var cacheBust; | ||
var scripts = getElementsByTagName('script'); | ||
forEach(scripts, function (script) { | ||
var pair = ensureString(script.src).split('?'); | ||
if (hasMany(pair)) { | ||
cacheBust = pair[1]; | ||
var cacheBust = ''; | ||
one('link,script', function (element) { | ||
var delimiter = '?v='; | ||
var pair = ensureString(element.src || element.href).split(delimiter); | ||
if (pair[1]) { | ||
cacheBust = delimiter + pair[1]; | ||
} | ||
}); | ||
insertScript('/d6.js?' + cacheBust); | ||
insertScript('/d6.js' + cacheBust); | ||
})(); |
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
76554