add-to-homescreen icon indicating copy to clipboard operation
add-to-homescreen copied to clipboard

iOS 10 Support

Open ajl236 opened this issue 8 years ago • 6 comments

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

ajl236 avatar Jul 26 '16 21:07 ajl236

I'd replace that by (parseInt(ath.OSVersion) || ''),

dryabov avatar Jul 27 '16 13:07 dryabov

Maybe you can provide a pull request?

holtkamp avatar Jul 27 '16 13:07 holtkamp

Done.

dryabov avatar Jul 27 '16 13:07 dryabov

This is fixed in v3.2.3, but not yet working on iOS 10, not sure how can i debug and fix it

khanimdad avatar Oct 07 '16 14:10 khanimdad

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 avatar Dec 12 '16 14:12 sutee9

@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 😄

holtkamp avatar Dec 12 '16 21:12 holtkamp