luciopaiva / witchcraft

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

Improve installation documentation for Google Chrome (not ChromeOS) #63

Open fanis opened 2 months ago

fanis commented 2 months ago

I've read the documentation and it requires installing the Web Server Chrome app, which is supported only on ChromeOS.

My initial question was going to be wether this was indeed supported in Google Chrome itself on Windows, and I noticed it being answered in #60. I'm writing below what I ended up doing in case it's useful for anyone else, and I suggest improving the documentation to suggest using a web server.

I downloaded WinSW-x64.exe and x86_64-pc-windows-msvc-simple-http-server.exe, put everything in a directory, created an XML config for WinSW, renamed WinSW-x64.exe to witchcraft-server-service.exe, and ran witchcraft-server-service install and then witchcraft-server-service start.

This is the XML config for WinSW that I used:

<service>
  <id>witchcraft-server</id>
  <name>Witchcraft Server</name>
  <description>This service runs a simple HTTP Server on port 5743 to be used in Chrome for the Witchcraft extension to load javascript files</description>
  <executable>x86_64-pc-windows-msvc-simple-http-server.exe</executable>
  <arguments>--nocache "C:\install\witchcraft-scripts" -p 5743 --ip 127.0.0.1</arguments>
  <log mode="none"></log>
</service>