ain / smartbanner.js

Customisable smart app banner for iOS and Android
https://npmjs.com/package/smartbanner.js
GNU General Public License v3.0
619 stars 178 forks source link

smartbanner is visible on windows tab when enabled-platforms is set to android,ios #687

Closed ramaces closed 7 months ago

ramaces commented 1 year ago

Steps to reproduce:

  1. <meta name="smartbanner:enabled-platforms" content="android,ios">

i suppose to change line 77 on smartbanner.js into } else if (!window.MSStream && !/X11|Linux|Windows/i.test(userAgent) && maxTouchPoints && maxTouchPoints > 0 || /iPhone|iPad|iPod/i.test(userAgent)) {

What happens: smartbanner shows on windows tab device

What should happen: should only show on android and ios devices

ain commented 1 year ago

Thank you!

@ramaces could you please post your User Agent string of the platform that you're seeing this problem on? This would be a good input for updating the specs.

ramaces commented 1 year ago

@ain

Edge Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36 Edg/118.0.2088.57

Chrome Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36

chriskim2311 commented 11 months ago

@ain Wanted to check in and see if we can merge this fix in. I am having this issue as well for windows touchscreen devices. Thank you so much!