add-to-homescreen
add-to-homescreen copied to clipboard
iOS 10 Support
ios 10 is shown with classname ath-ios-1 rather than ath-ios-10
likely due to substr(0,1) on addtohomescreen.js line 514
I'd replace that by (parseInt(ath.OSVersion) || '')
,
Maybe you can provide a pull request?
Done.
This is fixed in v3.2.3, but not yet working on iOS 10, not sure how can i debug and fix it
I fixed it, unfortunately I have no push-access to this rep, so I'll just explain here:
In the addtohomescreen.js replace the statement
(ath.OSVersion + '').substr(0,1)
with
(ath.OSVersion + '').substr(0,(ath.OSVersion + '').indexOf('.'))
In addtohomescreen.css there are a few style declarations that are named according to the ios version, so they will stop working everytime a new iOS version is added. specifically, replace
.ath-ios7 .ath-action-icon,
.ath-ios8 .ath-action-icon,
.ath-ios9 .ath-action-icon{
with
.ath-ios7 .ath-action-icon,
.ath-ios8 .ath-action-icon,
.ath-ios9 .ath-action-icon,
.ath-ios10 .ath-action-icon{
and
.ath-ios8.ath-tablet,
.ath-ios9.ath-tablet{
with
.ath-ios8.ath-tablet,
.ath-ios9.ath-tablet,
.ath-ios10.ath-tablet,{
@sutee9 can you provide a pull request for this nice change? No need for push access, just fork the library, apply the changes and submit a pull request, so these changes can be merged 😄