Merge branch 'staging' of github.com:xwiki-labs/cryptpad into staging
This commit is contained in:
@@ -20,16 +20,25 @@ define([], function () {
|
||||
};
|
||||
}
|
||||
|
||||
if (!localStorage || typeof(localStorage.getItem) !== 'function') {
|
||||
require('jquery', function ($) {
|
||||
var failStore = function () {
|
||||
console.error(new Error('wut'));
|
||||
require(['jquery'], function ($) {
|
||||
$.ajax({
|
||||
type: 'HEAD',
|
||||
url: '/common/feedback.html?NO_LOCALSTORAGE=' + (+new Date()),
|
||||
});
|
||||
});
|
||||
window.alert("CryptPad needs localStorage to work, try a different browser");
|
||||
return;
|
||||
}
|
||||
};
|
||||
|
||||
try {
|
||||
var test_key = 'localStorage_test';
|
||||
var testval = Math.random().toString();
|
||||
localStorage.setItem(test_key, testval);
|
||||
if (localStorage.getItem(test_key) !== testval) {
|
||||
failStore();
|
||||
}
|
||||
} catch (e) { console.error(e); failStore(); }
|
||||
|
||||
require([document.querySelector('script[data-bootload]').getAttribute('data-bootload')]);
|
||||
});
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user