diff options
author | Ferdinand Thiessen <opensource@fthiessen.de> | 2024-09-20 13:46:39 +0200 |
---|---|---|
committer | Ferdinand Thiessen <opensource@fthiessen.de> | 2024-09-20 13:46:39 +0200 |
commit | 311910865444860194a6f8b7ff85d554f348ace2 (patch) | |
tree | 773784b71d060390832d466f59fe2166616b8078 /apps/files/js/jquery-visibility.js | |
parent | 7ff911665e7507a800e05fe9cd80e0304cd11dbc (diff) | |
download | nextcloud-server-311910865444860194a6f8b7ff85d554f348ace2.tar.gz nextcloud-server-311910865444860194a6f8b7ff85d554f348ace2.zip |
chore(files): Remove legacy UI scripts now that everything is migrated to Vue
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Diffstat (limited to 'apps/files/js/jquery-visibility.js')
-rw-r--r-- | apps/files/js/jquery-visibility.js | 91 |
1 files changed, 0 insertions, 91 deletions
diff --git a/apps/files/js/jquery-visibility.js b/apps/files/js/jquery-visibility.js deleted file mode 100644 index 67d96e5e0e7..00000000000 --- a/apps/files/js/jquery-visibility.js +++ /dev/null @@ -1,91 +0,0 @@ -/*! - * jquery-visibility v1.0.11 - * Page visibility shim for jQuery. - * - * Project Website: http://mths.be/visibility - * - * @version 1.0.11 - * - * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors - * SPDX-FileCopyrightText: 2015 ownCloud, Inc. - * SPDX-FileCopyrightText: Mathias Bynens - * SPDX-FileCopyrightText: Jan Paepke - * SPDX-License-Identifier: MIT - */ -;(function (root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. Register as an anonymous module. - define(['jquery'], function ($) { - return factory(root, $); - }); - } else if (typeof exports === 'object') { - // Node/CommonJS - module.exports = factory(root, require('jquery')); - } else { - // Browser globals - factory(root, jQuery); - } -}(this, function(window, $, undefined) { - "use strict"; - - var - document = window.document, - property, // property name of document, that stores page visibility - vendorPrefixes = ['webkit', 'o', 'ms', 'moz', ''], - $support = $.support || {}, - // In Opera, `'onfocusin' in document == true`, hence the extra `hasFocus` check to detect IE-like behavior - eventName = 'onfocusin' in document && 'hasFocus' in document ? - 'focusin focusout' : - 'focus blur'; - - var prefix; - while ((prefix = vendorPrefixes.pop()) !== undefined) { - property = (prefix ? prefix + 'H': 'h') + 'idden'; - $support.pageVisibility = document[property] !== undefined; - if ($support.pageVisibility) { - eventName = prefix + 'visibilitychange'; - break; - } - } - - // normalize to and update document hidden property - function updateState() { - if (property !== 'hidden') { - document.hidden = $support.pageVisibility ? document[property] : undefined; - } - } - updateState(); - - $(/blur$/.test(eventName) ? window : document).on(eventName, function(event) { - var type = event.type; - var originalEvent = event.originalEvent; - - // Avoid errors from triggered native events for which `originalEvent` is - // not available. - if (!originalEvent) { - return; - } - - var toElement = originalEvent.toElement; - - // If it’s a `{focusin,focusout}` event (IE), `fromElement` and `toElement` - // should both be `null` or `undefined`; else, the page visibility hasn’t - // changed, but the user just clicked somewhere in the doc. In IE9, we need - // to check the `relatedTarget` property instead. - if ( - !/^focus./.test(type) || ( - toElement === undefined && - originalEvent.fromElement === undefined && - originalEvent.relatedTarget === undefined - ) - ) { - $(document).triggerHandler( - property && document[property] || /^(?:blur|focusout)$/.test(type) ? - 'hide' : - 'show' - ); - } - // and update the current state - updateState(); - }); -})); |