@sswroom/sswr 1.6.9 → 1.6.10

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 (3) hide show
  1. package/Changelog +3 -0
  2. package/package.json +1 -1
  3. package/web.js +10 -2
package/Changelog CHANGED
@@ -1,3 +1,6 @@
1
+ 1.6.10
2
+ -web.getBrowserInfo enhance iPad Pro detection
3
+
1
4
  1.6.9
2
5
  -Enhance web.getBrowserInfo
3
6
  -web.parseUserAgent support FxiOS (Firefox in iOS)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sswroom/sswr",
3
- "version": "1.6.9",
3
+ "version": "1.6.10",
4
4
  "description": "Libraries made by sswroom",
5
5
  "main": "sswr.js",
6
6
  "scripts": {
package/web.js CHANGED
@@ -1006,6 +1006,14 @@ export async function getBrowserInfo()
1006
1006
  }
1007
1007
  }
1008
1008
  }
1009
+ if (ret.os == OSType.MacOS)
1010
+ {
1011
+ if (navigator.platform === "MacIntel" && navigator.maxTouchPoints && navigator.maxTouchPoints > 2)
1012
+ {
1013
+ ret.os = OSType.iPad;
1014
+ ret.osVer = ret.browserVer;
1015
+ }
1016
+ }
1009
1017
  return ret;
1010
1018
  }
1011
1019
 
@@ -1048,11 +1056,11 @@ export function parseUserAgent(userAgent)
1048
1056
  i = userAgent.indexOf('(');
1049
1057
  if (i >= 0)
1050
1058
  {
1051
- ent.browserVer = ent.userAgent.substring(17, i);
1059
+ ent.browserVer = userAgent.substring(17, i);
1052
1060
  }
1053
1061
  else
1054
1062
  {
1055
- ent.browserVer = ent.userAgent.substring(17);
1063
+ ent.browserVer = userAgent.substring(17);
1056
1064
  }
1057
1065
  return ent;
1058
1066
  }