remy / inliner

Node utility to inline images, CSS and JavaScript for a web page - useful for mobile sites
MIT License
1.1k stars 165 forks source link

Apple-touch-icon link not converted to data url #159

Open amv opened 6 years ago

amv commented 6 years ago

I am trying to convert an SPA for adding it to an iPhone's home screen, but inliner does not convert the icon href to a data URL:

<link rel="apple-touch-icon" href="....">

The code for converting would be similar to how the favicon task is handled, and I tested that it works perfectly if I just replace:

favicon: 'link[rel=icon],link[rel="shortcut icon"]',

with

favicon: 'link[rel=icon],link[rel="shortcut icon"],link[rel="apple-touch-icon"]',

Do you want a PR or is this small enough that you would just prefer to patch it yourself?

amv commented 6 years ago

There is also link[rel="apple-touch-startup-image"] which can be used by a home screen app, which is currently not converted.

remy commented 6 years ago

Sure, I'll take a PR, cheers.

On Sun, 24 Sep 2017, 03:11 Antti Vähäkotamäki notifications@github.com wrote:

There is also link[rel="apple-touch-startup-image"] which can be used by a home screen app, which is currently not converted.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/remy/inliner/issues/159#issuecomment-331681849, or mute the thread https://github.com/notifications/unsubscribe-auth/AAA1hOgxtMmyps-UAZjQi7MoCNepBgOOks5slbo3gaJpZM4PhvI0 .

amv commented 6 years ago

160

amv commented 6 years ago

Seems to be failing for code style errors. I will fix that ;)

amv commented 6 years ago

It is green now. Any requests for additions/modifications to the PR?

amv commented 6 years ago

I'm putting together a presentation where I would love to showcase some cool things you can do with inliner (among other tools), and this feature would be among them. @remy can you tell if there is anything I can do to the pull request #160 that would expedite it getting into the upstream release? The change is quite small and trivial so I did not make additional tests, but I would be happy to do that, or any other changes that you deem necessary.