web-manager 3.2.8 → 3.2.10

Sign up to get free protection for your applications and to get access to all the features.
package/index.js CHANGED
@@ -414,7 +414,7 @@ function Manager() {
414
414
  auth: {
415
415
  state: 'default', // required, prohibited, default
416
416
  sends: {
417
- required: '/signup/',
417
+ required: '/signup',
418
418
  prohibited: '/',
419
419
  },
420
420
  },
package/lib/utilities.js CHANGED
@@ -95,4 +95,27 @@ Utilities.escapeHTML = function (str) {
95
95
  });
96
96
  }
97
97
 
98
+ Utilities.getContext = function () {
99
+ // Check mobile
100
+ function mobile() {
101
+ try {
102
+ var m = navigator.userAgentData.mobile;
103
+ return typeof m === 'undefined' ? _THROW : m === true;
104
+ } catch (e) {
105
+ try {
106
+ return window.matchMedia('only screen and (max-width: 760px)').matches
107
+ } catch (e) {
108
+ return false;
109
+ }
110
+ }
111
+ }
112
+
113
+ // Return findings
114
+ return {
115
+ client: {
116
+ mobile: mobile(),
117
+ },
118
+ }
119
+ }
120
+
98
121
  module.exports = Utilities;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "web-manager",
3
- "version": "3.2.8",
3
+ "version": "3.2.10",
4
4
  "description": "Easily access important variables such as the query string, current domain, and current page in a single object.",
5
5
  "main": "index.js",
6
6
  "scripts": {