@cardsjd/device 0.1.6 → 0.1.7
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 +6 -0
- package/package.json +1 -1
package/lib/device.js
CHANGED
|
@@ -74,7 +74,13 @@ export default class Device {
|
|
|
74
74
|
|
|
75
75
|
//Get override information
|
|
76
76
|
const searchParams = new URLSearchParams(window.location.search);
|
|
77
|
+
|
|
78
|
+
//discord has a platform in its url and messes up detection //detect first
|
|
79
|
+
if (window.location.host.includes('discord') || (window.location.href.includes("localhost") && window.location.href.includes("frame_id"))) {
|
|
80
|
+
return 'discord';
|
|
81
|
+
}
|
|
77
82
|
|
|
83
|
+
//override
|
|
78
84
|
if (searchParams.has('platform')) {
|
|
79
85
|
return searchParams.get('platform');
|
|
80
86
|
}
|