Added Full Support for iOS, Kindle and BlackBerry Mobile Devices.#43
Added Full Support for iOS, Kindle and BlackBerry Mobile Devices.#43bhamodi wants to merge 8 commits intogabceb:masterfrom
Conversation
|
The script uses 2-space indentation throughout, can you restore that please? |
|
@le717 - Ok, I updated all indentation to be 2-spaces. |
|
Also, I just noticed that the README needs to be updated to reflect the new mobile browser detection. I'll send another PR to reflect that tonight. 👍 |
dist/jquery.browser.js
Outdated
There was a problem hiding this comment.
Could you alphabetize this list so it's easier to find the device key? I know it was not before, but now that there are much more in it, it would be best to sort it now.
|
Just some minor things there. As for the readme, it'd be better if you do that in this same PR. Also, can you update the tests with the UAs you used as well? |
|
@le717 - Does our definition of |
|
AppleWebKit is handled in #44. |
|
What is |
|
Just a few more comments, I'll be running the tests on my machine as soon as I can. :) |
|
Regarding the alphabetized UA matcher, it should work fine since they were all connected through |
|
That makes the library a tad fragmented, because if people didn't know that distinction, they would get confused as to why blackberry is not matching BB10. I think it be best to do the same that's been done for IE 11, reassign |
|
Sorry for my delay, I've been slammed with work. I will take a look at this tomorrow. |
|
Sounds good @gabceb 👍 if ( browser.bb ) {
browser["blackberry"] = true;
}What else would have to change? Also, since we're talking about combining similar UA together, it is important to note that |
|
@bhamodi Sorry, I was suddenly slammed the last part of the week. I'll try to get to your questions sometime tomorrow. :) |
|
@le717 I've added you as a collaborator for the project. You should be able to push and accept PRs |
|
@gabceb I was not expecting that. Thanks! However I would still like it if you would review my PR after I land this one. It's my thought that every PR should be reviewed by at least one other person who did not submit the patch. :) |
|
@bhamodi Let me break your comment down:
See if this works (borrowed from the if ( browser.bb ) {
var blackberry = "blackberry";
matched.browser = blackberry;
browser[blackberry] = true;
}I'll pull your changes and test this manually as well.
No, keep that separate. We can run Chome and Firefox on Win, Mac, and Linux. but do we lump them all under
I also say keep the PlayBook separate, but I feel like I need to explain that in reference to reassigning The PlayBook and Blackberry phone are two different devices. While they are both a Blackberry (if anything by solely name), they are considered two different devices. However, by the same logic, why merge if (jQuery.browser.versionNumber >= 10) {
// New Blackberry
}On the other hand, the PlayBook is a true tablet, a different device, not a phone like a Blackberry. Sure, there are those "phablet" phones that are borderline tablet, but the PlayBook is a true tablet because it does not have a cellular plan like phones that support voice. Additionally, and here again the "phablet" blurs these lines, but most people do not want to hold some 3 ounce, 7-8" touch screen to their face and talk on the phone with it. Thus it is a different device than the Blackberry "proper" and should be listed separately. |
|
@bhamodi Whoops, sorry. Hit the wrong key on my keyboard. Finished the comment. |
|
Just tested the code I gave, it works correctly, acting the same as the |
test/test.js
Outdated
There was a problem hiding this comment.
Why is casper.exit() added here and in the rest of the next tests when the original tests do not have this statement? Is it required by newer versions of Casper?
There was a problem hiding this comment.
I don't believe so. I took that from the Android test and used it for the tests I made. Good catch, I think it's only required for the last test case in the file. I'll fix that tonight when I get home. 👍
There was a problem hiding this comment.
These two lines still reference browser.bb.
There was a problem hiding this comment.
Yes, I left these intentionally. This is the test for BB10 phones. Are we going to be able to access the version number by using blackberry here? I thought we couldn't because v_10 is not defined for blackberry, only BB.
There was a problem hiding this comment.
You're right! Sorry, my bad. I got these references to the Casper .bb confused with the plugin .bb for moment.
|
I'm seeing some mega test failures with these changes, but I do not think they are caused by this. I'm getting failures also on |
|
Ah I see. Would it be ok to just merge this and then you can create a PR that addresses the failing tests? I can help you with that if you need some support! |
|
Unfortunately, merging this will only compound the errors. I'm getting four failures on |
|
Actually, because there's been a few other merges going in as well (not to mention fixing the indentation), I think it will be easier for you to start fresh with the detection code, tests, and readme and submit a new PR instead of rebasing this one once #49 has landed. |
|
@bhamodi Ping! The fixes have landed, and I'd like to merge your changes as well. :) |
|
@le717 Thanks! I'll get a new PR fired up ASAP. |
This PR updates the mobile browser detection along with some minor formatting updates.