diff --git a/js/components/ascribe_uploader/ascribe_file_drag_and_drop/file_drag_and_drop_dialog.js b/js/components/ascribe_uploader/ascribe_file_drag_and_drop/file_drag_and_drop_dialog.js index 304ae146..f86cabfc 100644 --- a/js/components/ascribe_uploader/ascribe_file_drag_and_drop/file_drag_and_drop_dialog.js +++ b/js/components/ascribe_uploader/ascribe_file_drag_and_drop/file_drag_and_drop_dialog.js @@ -3,7 +3,8 @@ import React from 'react'; import { Link } from 'react-router'; -import { dragAndDropAvailable } from '../../../utils/feature_detection'; +import { dragAndDropAvailable } from 'js-utility-belt/es6/feature_detection'; + import { getLangText } from '../../../utils/lang'; import { getCurrentQueryParams } from '../../../utils/url'; diff --git a/js/utils/feature_detection.js b/js/utils/feature_detection.js deleted file mode 100644 index 6cbd533d..00000000 --- a/js/utils/feature_detection.js +++ /dev/null @@ -1,26 +0,0 @@ -'use strict'; - -/** - * PLEASE - * - * postfix your function with '-Available'. - * - * Like this: - * - * featureNameAvailable - * - */ - - -/** - * Even though it is not recommended to check (and maintain) the used browser, - * we're checking the browser's ability to drag and drop with this statement as - * there is no other way of detecting it another way. - * - * See this discussion for clarity: - * - https://github.com/Modernizr/Modernizr/issues/57#issuecomment-35831605 - * - * @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);