Merge branch 'staging' of github.com:xwiki-labs/cryptpad into staging

This commit is contained in:
yflory
2017-06-13 16:15:11 +02:00
13 changed files with 219 additions and 66 deletions

View File

@@ -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