Open GoogleCodeExporter opened 8 years ago
I would propose the following patch:
### Eclipse Workspace Patch 1.0
#P HTML5 Security Cheatsheet
Index: html/scripts/import.js
===================================================================
--- html/scripts/import.js (Revision 532)
+++ html/scripts/import.js (Arbeitskopie)
@@ -18,13 +18,15 @@
payloads = store.payloads;
$('#offline').show();
};
- if(navigator.onLine) {
- localStorage[location.hostname]=JSON.stringify(
- {'items':items,'payloads':payloads,'categories':categories}
- );
- $(window).bind('offline', offline);
- $(window).bind('online', function(){$('#offline').hide()})
- $('#offline').hide();
+ if(navigator.onLine || typeof navigator.onLine === 'undefined') {
+ try {
+ localStorage[location.hostname]=JSON.stringify(
+
{'items':items,'payloads':payloads,'categories':categories}
+ );
+ $(window).bind('offline', offline);
+ $(window).bind('online', function(){$('#offline').hide()})
+ $('#offline').hide();
+ } catch(e){}
} else {
offline();
}
Could you please have a look if this works for you?
Original comment by Mario.He...@googlemail.com
on 26 Jun 2012 at 7:07
Original issue reported on code.google.com by
0xbadfca11
on 17 Feb 2012 at 3:39