Comments (4)
It's not clear what's the exact platform you're targeting and what's the User-Agent
, but your ^.Win$
regex would not work for the following Windows Mobile:
Mozilla/5.0 (Windows Phone 10.0; Android 4.2.1; ...) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Mobile Safari/537.36 Edge/..
For the above, the effective regular expression would be .*Windows Phone.*
.
from smartbanner.js.
thanks it's works fine with .Windows NT.
but Can I exclude all website frame work mac windows etc .... ?
from smartbanner.js.
@ahmedshalaby2018 smartbanner.js
is meant to be used on mobile. Promoting the app on desktop is usually not desired, it should not appear on desktop.
Nevertheless, you can indeed extend the exclusion regex by piping the platforms, e.g. .*(Windows NT|Intel Mac OS X).*
etc.
from smartbanner.js.
This might not be related to why the original creator of this issue was asking this, but for what it's worth, a website I use that I'm pretty sure is using this to promote their app on mobile recently updated from 1.17 to 1.19 (with no other changes I can find to the banner code or anything) and I pretty much immediately started seeing iOS app promotion on my Windows 10 laptop computer. All I can ascertain is that this is because between those two versions, catching iPad 13+ appears to have been added by checking if the browser has more than 0 maxTouchPoints (and because my computer is a touch screen, my browser tells it that it does in fact have more than 0 touch points and so I see the banner). I may be sniffing up the wrong tree but I saw this issue and felt like it was worth mentioning.
(And as a note, I've reported this to the website itself so they know about it; despite my report there being recent enough that I haven't heard back (and normally I would be very patient and wait), I'm mentioning it here too because I found this while trying to investigate the cause myself and didn't want to forget I found it.)
TL;DR: I think in trying to cover iOS devices with user agents that aren't clearly mobile user agents, it also resulted in unintended overlap with desktop/laptop devices that definitely aren't mobile but which happen to have touch points, so some desktop users (namely, ones with touchscreens) are seeing iOS banners.
from smartbanner.js.
Related Issues (20)
- Smartbanner for Huawei without Play Store HOT 1
- Smart Banner ios version displayed for touch screen enabled desktops HOT 1
- Angular 2+ compatibility HOT 1
- How to hide smartapp banner in webview apps HOT 1
- Why app banner is displaying in laptop screens, 1440 X 734 / 1366 X 768? HOT 8
- Is there a way to add two smart banners? HOT 1
- support for another language in content ? HOT 3
- min file no correctly exported? HOT 2
- Does it work in Angular? For me it is not showing HOT 1
- Unexpected token ')' when close banner HOT 1
- Invisible App Icon HOT 3
- Will view button be changed to open button if app is already installed in mobile(android or iOS ? HOT 1
- Windows Convertibles are recognized as iOS devices HOT 5
- Accessibility concern with tabbing to banner HOT 5
- smartbanner is visible on windows tab when enabled-platforms is set to android,ios HOT 3
- Error library when I use install with npm HOT 14
- Required content HOT 6
- Js and CSS files are throwing error HOT 5
- Value for enabled-platforms HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from smartbanner.js.