Sha256: af8dcc371ca8f923154cfc9ce3e656c4fc484c40ee7071556e6e84d78252103b

Contents?: true

Size: 1.59 KB

Versions: 3

Compression:

Stored size: 1.59 KB

Contents

(function(a){function i(d,b,c){jQuery.isFunction(b)&&(c=b,b=null);var f=d+"?"+a.param(b||{});if(e[f])return!1;e[f]=!0;return jQuery.ajax({type:"GET",url:d,data:b,success:function(a,j){delete e[f];void 0===a?window.navigator.onLine||(g=function(){i(d,b,c)}):c(a,j)},error:function(){delete e[f]},dataType:"json",ifModified:!0})}var g=null,e={};if(typeof a.support.localStorage==="undefined")a.support.localStorage=!!window.localStorage;a.support.localStorage?(a(window).bind("online",function(){g&&g()}),
a(window).bind("offline",function(){jQuery.event.trigger("ajaxStop")}),a.retrieveJSON=function(d,b,c){function f(){for(var a=[],b=0;b<localStorage.length;++b){var c=localStorage.key(b);/:date$/.test(c)&&a.push(c)}a.sort(function(a,b){var c=localStorage[a],d=localStorage[b];return c<d?-1:c>d?1:0});for(b=0;b<a.length/2;++b)c=a[b],delete localStorage[c],delete localStorage[c.substr(0,c.length-5)]}function e(){i(d,b,function(a,b){if(b=="notmodified")return!1;for(;;)try{localStorage[h]=JSON.stringify(a);
localStorage[h+":date"]=new Date;break}catch(d){(d.name=="QUOTA_EXCEEDED_ERR"||d.name=="NS_ERROR_DOM_QUOTA_REACHED")&&f()}c(a,b,k&&{cachedAt:l,retrievedAt:j})})}a.isFunction(b)&&(c=b,b={});var j=new Date,m=a.param(b),h="offline.jquery:"+d+":"+m,k=localStorage[h],l=new Date(Date.parse(localStorage[h+":date"]));if(k&&c(a.parseJSON(k),"cached",{cachedAt:l})===!1)return!1;window.navigator.onLine?e():g=e;return!0},a.clearJSON=function(d,b){var c=a.param(b||{});delete localStorage["offline.jquery:"+d+":"+
c];delete localStorage["offline.jquery:"+d+":"+c+":date"]}):(a.retrieveJSON=i,a.clearJSON=a.noop)})(jQuery);

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
compass-jquery-plugin-0.3.3.1 templates/jquery/jquery.offline.min.js
compass-jquery-plugin-0.3.3.0 templates/jquery/jquery.offline.min.js
compass-jquery-plugin-0.3.2.8 templates/jquery/jquery.offline.min.js