ValerioLyndon / MyAnimeList-Tools

A modified version of MyAnimeList Tools by BurntJello.
5 stars 0 forks source link

Auto-uploading to file host #16

Closed ValerioLyndon closed 1 year ago

ValerioLyndon commented 1 year ago

There should be an option to upload the resultant CSS directly to a file host and automatically add that @import to MAL's Custom CSS section. This would provide obvious ease-of-use benefits. This would pair great with a userscript version that can auto-run on page load.

The best bet seems to be Dropbox as long as their OAuth API allows requests through MyAnimeList.net as a referrer.

ValerioLyndon commented 1 year ago

You may be able to use Catbox as well by storing the uploaded file names (assuming POST upload requests return a file name or can be discerned another way). https://catbox.moe/tools.php

ValerioLyndon commented 1 year ago

Every request from the animelist page gets blocked due to MAL's CORS header not allowing cross-origin requests. The only request I managed to get working was a file upload to Dropbox using the temporary dev token as the auth header, but any request to oauth2/token was blocked by CORS. Same with Catbox even on fileupload requests.

If anyone has experience with this and can get around it, great, otherwise this shit is impossible.

ValerioLyndon commented 1 year ago

For future reference, this is the exact error. It happens upon trying to exchange the temporary token for a real one.

ValerioLyndon commented 1 year ago

Unless?.... 23-08-27 00;23;05 firefox 389x145 - 19320

ValerioLyndon commented 1 year ago

I have never in my entire fucking life been so glad to see a green 200. We are back in business baby. 23-08-27 00;56;12 firefox 600x86 - 02938