From 11f3ab51a3af0f5cb5ae74146e9ef5ed3bce1b62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Daubensch=C3=BCtz?= Date: Mon, 2 Nov 2015 09:55:53 +0100 Subject: [PATCH] Revert "Implement functionality for feature-detecting webStorage" This reverts commit c7ef23ee40496ce04e88d05f741f47e6ee4b5ecb. Conflicts: js/utils/feature_detection_utils.js --- js/utils/feature_detection_utils.js | 34 +---------------------------- 1 file changed, 1 insertion(+), 33 deletions(-) diff --git a/js/utils/feature_detection_utils.js b/js/utils/feature_detection_utils.js index 66e623d2..d086c68c 100644 --- a/js/utils/feature_detection_utils.js +++ b/js/utils/feature_detection_utils.js @@ -23,36 +23,4 @@ * @type {bool} Is drag and drop available on this browser */ export const dragAndDropAvailable = 'draggable' in document.createElement('div') && - !/Mobile|Android|Slick\/|Kindle|BlackBerry|Opera Mini|Opera Mobi/i.test(navigator.userAgent); - -/** - * Function that detects whether localStorage/sessionStorage is both supported - * and available. - * Taken from: - * https://developer.mozilla.org/en-US/docs/Web/API/Web_Storage_API/Using_the_Web_Storage_API - * - * We're explicitly NOT exporting this function, as we want for both localStorage, as well as - * sessionStorage proxy functions to be exported. - * - * @param {oneOfType(['localStorage', 'sessionStorage'])} - * @return {bool} Is localStorage or sessionStorage available on this browser - */ -function storageAvailable(type) { - try { - var storage = window[type], - x = '__storage_test__'; - storage.setItem(x, x); - storage.removeItem(x); - return true; - } - catch(e) { - return false; - } -} - -/** - * Const that detects whether sessionStorage is both supported - * and available. - */ -export const sessionStorageAvailable = storageAvailable('sessionStorage'); - + !/Mobile|Android|Slick\/|Kindle|BlackBerry|Opera Mini|Opera Mobi/i.test(navigator.userAgent); \ No newline at end of file