client.js 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. !(function () {
  2. var Sys = {};
  3. var ua = navigator.userAgent.toLowerCase();
  4. var regMap = {
  5. msie: '/msie ([\\d.]+)/',
  6. firefox: '/firefox\\/([\\d.]+)/',
  7. chrome: '/chrome\\/([\\d.]+)/',
  8. opera: '/opera.([\\d.]+)/',
  9. safari: '/version\\/([\\d.]+).*safari/'
  10. };
  11. var o;
  12. if (ua.match(eval(regMap.msie))) {
  13. o = ua.match(eval(regMap.msie));
  14. Sys = {
  15. appName: 'IE',
  16. version: o[1]
  17. }
  18. } else if (ua.match(eval(regMap.firefox))) {
  19. o = ua.match(eval(regMap.firefox));
  20. Sys = {
  21. appName: 'Firefox',
  22. version: o[1]
  23. }
  24. } else if (ua.match(eval(regMap.chrome))) {
  25. o = ua.match(eval(regMap.chrome));
  26. Sys = {
  27. appName: 'Chrome',
  28. version: o[1]
  29. }
  30. } else if (ua.match(eval(regMap.opera))) {
  31. o = ua.match(eval(regMap.opera));
  32. Sys = {
  33. appName: 'Opera',
  34. version: o[1]
  35. }
  36. } else if (ua.match(eval(regMap.safari))) {
  37. o = ua.match(eval(regMap.safari));
  38. Sys = {
  39. appName: 'Safari',
  40. version: o[1]
  41. }
  42. } else if (ua.indexOf('edge')) {
  43. Sys = {
  44. appName: 'Edge'
  45. }
  46. } else {
  47. if (navigator.appName === 'Microsoft Internet Explorer') {
  48. Sys = {
  49. appName: 'IE',
  50. version: '6.0'
  51. }
  52. }
  53. }
  54. if (Sys.appName === 'IE' && Number(Sys.version) < 10) {
  55. window.location.href = './static/index.html'
  56. }
  57. })();