luciopaiva / witchcraft

Inject Javascript and CSS right from your file system. Think GreaseMonkey for more advanced users.
https://luciopaiva.com/witchcraft
MIT License
254 stars 18 forks source link

question: how can I include resourse, for example: image #34

Closed zhangaz1 closed 3 years ago

luciopaiva commented 3 years ago

That's a very nice question.

There is currently no way of directly including resource types other than JS and CSS. However, you could try one of these tricks:

I'd go with the last option, which seems to be the easiest. Please let me know if you were able to do it.

luciopaiva commented 3 years ago

Added this question to the FAQ. I am closing the issue, but please feel free to continue the discussion if you'd like to.

luciopaiva commented 3 years ago

Notice that you may have run into CORS issues when trying to fetch resources from http://127.0.0.1:5743. Configure your HTTP scripts server to set the proper CORS headers.

If using the recommended Web Server Chrome app, open its settings, click "Show Advanced Options" and then check the "Set CORS headers" option:

image