ppixiv / ppixiv

Better Pixiv image viewing
https://ppixiv.org/install
149 stars 9 forks source link

Downloading on mobile #97

Open neilyhy opened 2 weeks ago

neilyhy commented 2 weeks ago

I recently get to make this work on ios safari, and I can't find a way to download pictures in the mobile UI. I tried using desktop UI, and the download works, but that UI is miserable in another way. (it is way too small)

I would want to know if there is a way already that is no documented, or if not, request this feature. Also, long press does nothing in the mobile UI, if possible, returning the long press menu of browser would help too. Especially on ios, since safari handling downloading files and pictures differently.

ppixiv commented 2 weeks ago

On desktop the best way to download is from the right-click context menu's "More" menu. The overlay menu in the corner is an older UI that made less sense over time as more stuff got added to it.

Long-press doesn't get along with the main image view, since it already uses long-press-like inputs. The desktop version's download features were disabled on mobile since mobile browsers don't allow the script manager APIs that are needed to make it work.

I played around with this for a while trying to find a workaround, but I haven't had much luck. I tried adding a link to the underlying image in the info page, hoping you could long press that, but it didn't work since Safari doesn't send a referer and Pixiv returns an error. I also tried a link to the image with , but that only works same-origin.

Unfortunately it's just hard to implement image downloading for Pixiv in a nice way within a browser due to their CORS setup and browser limitations. It's the reason I haven't expanded on this feature very much.