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

File path resolution? #46

Closed earthsuit0 closed 2 years ago

earthsuit0 commented 2 years ago

Just a simple user here. I'm trying to get a script to load for "http://trisphere.net/inventory.php". My script folder is "trisphere" and the scripts are "inventory.user.js" and the same script renamed as "inventory.js". Neither of them will load. Help?

mjuksel commented 2 years ago

It needs at least the .net in the folders name, or you can try www.trisphere.net as folder name. I had to add www. to a couple of domains.

earthsuit0 commented 2 years ago

Thank you for the reply. There was no joy with this. Could it be my folder location?

users/ron/documents/my games/www.trisphere.net

I'd think that would be resolved while navigating to the folder via the webserver. When the page is loaded, the icon shows there are no scripts loaded though it has access to the site.

luciopaiva commented 2 years ago

Hey @earthsuit0,

I just had the chance to test it here. I tried a folder called trisphere.net with a script inside called index.php.js and it worked fine when I tried trisphere.net/index.php. I couldn't try inventory.php because it looks like I need an account and the page just redirects me to index.php.

Does your local web server root correctly point to users/ron/documents/my games?

earthsuit0 commented 2 years ago

The local server does point to users/ron/documents/my games/www.trisphere.net. The correct .js files list when I click on the ip address 127.0.0.1:5743. I tried renaming the script inventory.php.js, instead of inventory.user.js, but it still does not work.

I'm sorry for taking up so much of your time. I'm sure I'm just making some silly mistake.

luciopaiva commented 2 years ago

This might be your problem: the server folder should be users/ron/documents/my games/, not users/ron/documents/my games/www.trisphere.net. Also, you probably also need to drop the www as it looks the page you're trying to access does not have it.

earthsuit0 commented 2 years ago

Unfortunately, neither of these recommendations resolved the issue. It's not really a big deal; just a very old game to spend some time on. Please don't give it another thought. Thank you for your time though.

luciopaiva commented 2 years ago

No problem! Please let me know if you find out what is wrong.

ghost commented 1 year ago

user:defunkt ubuntu