pop.ua.js 812 B

12345678910111213141516171819202122232425262728293031323334
  1. POP.Ua = {
  2. agent: navigator.userAgent.toLowerCase(),
  3. android: false,
  4. ipad: false,
  5. ipod: false,
  6. iphone: false,
  7. appleMobile: false,
  8. hasTouch: false,
  9. action: '点击',
  10. orientation: 'portrait',
  11. maxW: null,
  12. maxH: null,
  13. init: function() {
  14. this.android = (this.agent.indexOf('android') > -1) ? true : false;
  15. this.ipad = (this.agent.indexOf('ipad') > -1) ? true : false;
  16. this.ipod = (this.agent.indexOf('ipod') > -1) ? true : false;
  17. this.iphone = (this.agent.indexOf('iphone') > -1) ? true : false;
  18. this.appleMobile = this.ipad || this.ipod || this.iphone;
  19. this.hasTouch = this.android || this.ipad || this.ipod || this.iphone;
  20. if (this.hasTouch) {
  21. this.action = '点击';
  22. }
  23. }
  24. };