Browse code

Refactor and rewrite as contao bundle

Benjamin Roth authored on04/11/2022 22:32:32
Showing1 changed files
1 1
deleted file mode 100644
... ...
@@ -1,47 +0,0 @@
1
-"use strict";
2
-
3
-exports.__esModule = true;
4
-exports.getSupport = getSupport;
5
-
6
-var _ssrWindow = require("ssr-window");
7
-
8
-var support;
9
-
10
-function calcSupport() {
11
-  var window = (0, _ssrWindow.getWindow)();
12
-  var document = (0, _ssrWindow.getDocument)();
13
-  return {
14
-    touch: !!('ontouchstart' in window || window.DocumentTouch && document instanceof window.DocumentTouch),
15
-    pointerEvents: !!window.PointerEvent && 'maxTouchPoints' in window.navigator && window.navigator.maxTouchPoints >= 0,
16
-    observer: function checkObserver() {
17
-      return 'MutationObserver' in window || 'WebkitMutationObserver' in window;
18
-    }(),
19
-    passiveListener: function checkPassiveListener() {
20
-      var supportsPassive = false;
21
-
22
-      try {
23
-        var opts = Object.defineProperty({}, 'passive', {
24
-          // eslint-disable-next-line
25
-          get: function get() {
26
-            supportsPassive = true;
27
-          }
28
-        });
29
-        window.addEventListener('testPassiveListener', null, opts);
30
-      } catch (e) {// No support
31
-      }
32
-
33
-      return supportsPassive;
34
-    }(),
35
-    gestures: function checkGestures() {
36
-      return 'ongesturestart' in window;
37
-    }()
38
-  };
39
-}
40
-
41
-function getSupport() {
42
-  if (!support) {
43
-    support = calcSupport();
44
-  }
45
-
46
-  return support;
47
-}
48 0
\ No newline at end of file
Browse code

swiper.js version 6.4.5

Benjamin Roth authored on17/01/2021 16:24:34
Showing1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,47 @@
1
+"use strict";
2
+
3
+exports.__esModule = true;
4
+exports.getSupport = getSupport;
5
+
6
+var _ssrWindow = require("ssr-window");
7
+
8
+var support;
9
+
10
+function calcSupport() {
11
+  var window = (0, _ssrWindow.getWindow)();
12
+  var document = (0, _ssrWindow.getDocument)();
13
+  return {
14
+    touch: !!('ontouchstart' in window || window.DocumentTouch && document instanceof window.DocumentTouch),
15
+    pointerEvents: !!window.PointerEvent && 'maxTouchPoints' in window.navigator && window.navigator.maxTouchPoints >= 0,
16
+    observer: function checkObserver() {
17
+      return 'MutationObserver' in window || 'WebkitMutationObserver' in window;
18
+    }(),
19
+    passiveListener: function checkPassiveListener() {
20
+      var supportsPassive = false;
21
+
22
+      try {
23
+        var opts = Object.defineProperty({}, 'passive', {
24
+          // eslint-disable-next-line
25
+          get: function get() {
26
+            supportsPassive = true;
27
+          }
28
+        });
29
+        window.addEventListener('testPassiveListener', null, opts);
30
+      } catch (e) {// No support
31
+      }
32
+
33
+      return supportsPassive;
34
+    }(),
35
+    gestures: function checkGestures() {
36
+      return 'ongesturestart' in window;
37
+    }()
38
+  };
39
+}
40
+
41
+function getSupport() {
42
+  if (!support) {
43
+    support = calcSupport();
44
+  }
45
+
46
+  return support;
47
+}
0 48
\ No newline at end of file