@cardsjd/device 0.1.6 → 0.1.8

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.
Files changed (2) hide show
  1. package/lib/device.js +6 -0
  2. 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
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cardsjd/device",
3
3
  "private": false,
4
- "version": "0.1.6",
4
+ "version": "0.1.8",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
7
7
  "files": [