Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve Atoms.device #9

Open
Kikobeats opened this issue Oct 22, 2014 · 2 comments
Open

improve Atoms.device #9

Kikobeats opened this issue Oct 22, 2014 · 2 comments

Comments

@Kikobeats
Copy link

At this moment I'm working in MacOSX with chrome and atoms doesn't detect anything.

Atoms.device return:

Object {os: undefined, width: 1280, height: 424, screen: "small"}

note also that it detects the browser as small. wtf.

but is possible to know this information with navigator.appVersion:

"5.0 (Macintosh; Intel Mac OS X 10_10_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.104 Safari/537.36"

link related: http://stackoverflow.com/a/11219680/1656676

Another thing is that can be useful a function like isMobile() that return a simple boolean (for example, to use tap or click event)

@soyjavi
Copy link
Member

soyjavi commented Oct 22, 2014

Try to set a array of regexps for desktop OS and I will accept your pull :)

@Kikobeats
Copy link
Author

ER are a little complicated, but we could use a better code than we could write!

https://github.com/madrobby/zepto/blob/master/src/detect.js#files
http://faisalman.github.io/ua-parser-js/
http://matthewhudson.me/projects/device.js/

I feel that the good approach for this would be write a new module for device support in QuoJS and use the Atoms Facade for the device detection. I don't know if jQuery have device detection, but would be a good way to have the minimal implementation in Atoms and delegate in the facade. What do you think?

I feel that the correct

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants