diff --git a/src/_h5ai/public/js/lib/core/location.js b/src/_h5ai/public/js/lib/core/location.js index 779ae871..8c2f0d94 100644 --- a/src/_h5ai/public/js/lib/core/location.js +++ b/src/_h5ai/public/js/lib/core/location.js @@ -1,7 +1,6 @@ const {window: win, document: doc, _: lo} = require('../win'); const {request} = require('./server'); const allsettings = require('./settings'); -const modernizr = require('./modernizr'); const event = require('./event'); const notification = require('../view/notification'); @@ -11,7 +10,7 @@ const settings = lo.extend({ fastBrowsing: true, unmanagedInNewWindow: true }, allsettings.view); -const history = settings.fastBrowsing && modernizr.history ? win.history : null; +const history = settings.fastBrowsing ? win.history : null; const reUriToPathname = /^.*:\/\/[^\/]*|[^\/]*$/g; const reForceEncoding = [ [/\/+/g, '/'], diff --git a/src/_h5ai/public/js/lib/core/modernizr.js b/src/_h5ai/public/js/lib/core/modernizr.js deleted file mode 100644 index 1ce99cdd..00000000 --- a/src/_h5ai/public/js/lib/core/modernizr.js +++ /dev/null @@ -1,5 +0,0 @@ -module.exports = { - canvas: true, - history: true, - localstorage: true -}; diff --git a/src/_h5ai/public/js/lib/core/store.js b/src/_h5ai/public/js/lib/core/store.js index 74a5c551..be29705c 100644 --- a/src/_h5ai/public/js/lib/core/store.js +++ b/src/_h5ai/public/js/lib/core/store.js @@ -1,7 +1,6 @@ const win = require('../win'); -const modernizr = require('./modernizr'); -const store = modernizr.localstorage ? win.localStorage : {}; +const store = win.localStorage; const storekey = '_h5ai'; diff --git a/src/_h5ai/public/js/lib/ext/info.js b/src/_h5ai/public/js/lib/ext/info.js index c0098430..18c1c8d6 100644 --- a/src/_h5ai/public/js/lib/ext/info.js +++ b/src/_h5ai/public/js/lib/ext/info.js @@ -1,7 +1,6 @@ const {window: win, jQuery: jq, _: lo} = require('../win'); const event = require('../core/event'); const format = require('../core/format'); -const modernizr = require('../core/modernizr'); const resource = require('../core/resource'); const allsettings = require('../core/settings'); const store = require('../core/store'); @@ -96,7 +95,7 @@ function update(item) { if (settings.qrcode) { $qrcode.empty().qrcode({ - render: modernizr.canvas ? 'canvas' : 'div', + render: 'canvas', size: 200, fill: settings.qrColor, background: null,