Browse Source

Add localStorage feature detection

pm2
Luke Childs 8 years ago
parent
commit
640639412c
  1. 12
      public/assets/enhancements.js

12
public/assets/enhancements.js

@ -1,5 +1,17 @@
(function() {
// Feature detection results
const supports = {};
// Detect localStorage support
try {
localStorage.setItem('test', 'test');
localStorage.removeItem('test');
supports.localStorage = true;
} catch (e) {
supports.localStorage = false;
}
// Add ios class to body on iOS devices
function iosBodyClass() {
if(

Loading…
Cancel
Save