Browse Source

provide hints for running CryptPad

master
ansuz 3 years ago
parent
commit
2b8414ca78
2 changed files with 18 additions and 0 deletions
  1. 9
      www/common/boot2.js
  2. 9
      www/common/sframe-boot2.js

9
www/common/boot2.js

@ -37,6 +37,15 @@ define([
window.alert("CryptPad needs localStorage to work, try a different browser");
};
window.onerror = function (e) {
if (/requirejs\.org/.test(e)) {
console.log();
console.error("Require.js threw a Script Error. This probably means you're missing a dependency for CryptPad.\nIt is recommended that the admin of this server runs `bower install && bower update` to get the latest code, then modify their cache version.\nBest of luck,\nThe CryptPad Developers");
return void console.log();
}
throw e;
};
try {
var test_key = 'localStorage_test';
var testval = Math.random().toString();

9
www/common/sframe-boot2.js

@ -36,5 +36,14 @@ define([
// This test is completed in common-interface.js
Test(function (t) { Test.__ASYNC_BLOCKER__ = t; });
window.onerror = function (e) {
if (/requirejs\.org/.test(e)) {
console.log();
console.error("Require.js threw a Script Error. This probably means you're missing a dependency for CryptPad.\nIt is recommended that the admin of this server runs `bower install && bower update` to get the latest code, then modify their cache version.\nBest of luck,\nThe CryptPad Developers");
return void console.log();
}
throw e;
};
require([document.querySelector('script[data-bootload]').getAttribute('data-bootload')]);
});
Loading…
Cancel
Save