@cardsjd/device 0.1.5 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/device.js +9 -2
- package/package.json +1 -2
package/lib/device.js
CHANGED
|
@@ -71,6 +71,14 @@ export default class Device {
|
|
|
71
71
|
* @returns {PlatformType}
|
|
72
72
|
*/
|
|
73
73
|
getPlatform() {
|
|
74
|
+
|
|
75
|
+
//Get override information
|
|
76
|
+
const searchParams = new URLSearchParams(window.location.search);
|
|
77
|
+
|
|
78
|
+
if (searchParams.has('platform')) {
|
|
79
|
+
return searchParams.get('platform');
|
|
80
|
+
}
|
|
81
|
+
|
|
74
82
|
//facebook instant
|
|
75
83
|
if (typeof globalThis.FBInstant !== 'undefined') {
|
|
76
84
|
return 'FBInstant';
|
|
@@ -109,8 +117,7 @@ export default class Device {
|
|
|
109
117
|
return Capacitor.getPlatform();
|
|
110
118
|
}
|
|
111
119
|
|
|
112
|
-
//
|
|
113
|
-
const searchParams = new URLSearchParams(window.location.search);
|
|
120
|
+
//steam
|
|
114
121
|
if (searchParams.get('steamId')) {
|
|
115
122
|
return 'steam';
|
|
116
123
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cardsjd/device",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.6",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"files": [
|
|
@@ -15,7 +15,6 @@
|
|
|
15
15
|
"@capacitor/core": "^6.0.0"
|
|
16
16
|
},
|
|
17
17
|
"peerDependencies": {
|
|
18
|
-
"@cardsjd/device": "^0.1.4",
|
|
19
18
|
"@sagi.io/globalthis": "^0.0.2"
|
|
20
19
|
}
|
|
21
20
|
}
|