motzel / ScoreSaberCountryLeaderboard

ScoreSaber.com enhancements
https://scoresaber.com
MIT License
21 stars 2 forks source link

Firefox does not allow TamperMonkey to access local files #103

Closed Solaris9 closed 3 years ago

Solaris9 commented 3 years ago

Describe the bug Attempting to test a development version of the userscript causes TamperMonkey to not load it because of a Firefox issue. A possible fix may be alternate develop instructions specific for Firefox? Another simpler fix would to use Chrome for development.

To Reproduce Steps to reproduce the behavior:

  1. Use Firefox
  2. Follow the develop instructions
  3. Reload the page

Expected behavior The userscript should run as normal.

Please complete the following information:

motzel commented 3 years ago

Unfortunately there is a problem with Firefox, I use Edge Chromium for development. One possible solution is to run a local server and serve the js file using it.

Out of curiosity, what are you going to add/fix in my project? The code is a total mess, because I started it to quickly add some functionality, and over time it grew. I am now slowly currently rewriting this as a slightly different project using this project as an organ donor ;-)

Solaris9 commented 3 years ago

I decided to use chrome for this but I do see why TamperMonkey reads the load file for hot reloading so I don't believe there a easy solution other than using a local server to serve the js file. Manually adding the file would get annoying pretty quickly.

I'm attempting to add the friends dropdown since it's still a pet peeve of mine. The code is a bit hard to read but I can manage to find what I'm looking for. Also you're rewriting this so would this be in the end?

motzel commented 3 years ago

Great! Thank you for wanting to add your contribution ❤

If you have any questions I'm happy to help, best to catch me on discord: motzel#8017

As for the new project, I've come to the conclusion that Tampermonkey is a dead end. I also need to view scores on my phone, but Tampermonkey can't be installed on it. So I started rewriting it as a separate site. Ultimately I want to have most, if not all functionality from the plugin on it. The current status is: https://ssr.motzel.dev/ It still needs a lot of work, but something is already working 😁.

Solaris9 commented 3 years ago

I always try to help in any way I can and that sounds good if I do need anything. I'll make a PR for this soon.

That is one thing I hoped for because I'm often on my phone and can't filter/sort scores. I'll help if I can but I'm not the best with front-end, I prefer server side/applications stuff.

Since this issue is basically solved I'll be closing it with the fix if anyone wants to contribute for the mean time: Use edge or chrome as you probably already have one.