-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
False marker fixed #9
Comments
Thanks a lot @CeresF3b! Have you tried to test this code? and did it run consistently? if so, please open a pull request. I am actually too busy these days, and woll be for a few months. I too had written this script initially with help from AI, but soon realized that the solutions it gave were very bogus, but i did retain the ideas i got from it. I will also test this code if i get the time. You can open a pr by then. |
The main problem was that Geotastic had changed, while I had quit playing, and so could not update the script. When it did work, it worked beautifully. |
Also, please open a PR to |
the code as you said doesn't always work 100% it is very buggy I can't say no I will try to find an alternative solution in the next few days. |
Sure, take your time. People have waited months, they surely can wait a few more. Also, it would be easier and better for you to fork the repo and do the changes there itself. |
alright, I saw in general the code seems to work but the “fake marker” appears when he wants it I should figure out how to fix the bug but not being a professional in programming I will have to rely a lot on Copilot Chatgpt and in general Reddit with the help of others who surely know more than me anyway the general code works but the “fake marker” as I said before does not always appear it is definitely unstable |
It's alright, you can open a pull request with your current progress for now, it will be of great help. I will see if i can fix it. |
Sorry for the delay, but I had some issues in my life outside the internet. Anyway, I believe I have truly fixed the "problem" the script had with DeepSeek. I repeat, I am not a programmer at all, but I did some testing, and the script works. Below, I will provide everything DeepSeek wrote me, along with descriptions, etc.
Problem: The original code used setInterval to check for google.maps.Map, which could fail if the map initialized too quickly.
const observer = new MutationObserver((mutations, obs) => {
Problem: The original regex /-\d+.\d+,-\d+.\d+/g failed for positive coordinates (e.g., 48.8584,2.2945 for Paris).
const pattern = /[-+]?\d+.\d+,[-+]?\d+.\d+/g;
Problem: The original code only cleared the last marker, leaving multiple markers on the map during rapid updates.
let markerArray = [];
Problem: Overwriting XMLHttpRequest.prototype.open is detectable and leaves traces.
const originalXHR = XMLHttpRequest;
Problem: The original keybindings (keyCode 49 and 50) could conflict with Geotastic's shortcuts.
document.addEventListener('keydown', (e) => {
Problem: The original code lacked automation for submitting guesses.
const autoSubmitGuess = () => {
Full Code: // ==UserScript== (function() {
})(); |
Next time, write code surrounded with ```. Secondly, thanks for your work, but I really won't be able to test this for at least a month or so |
Hi, I saw your code and it looks extremely cool! I searched online and generally asked Copilot quite a bit to fix the “fake marker not appearing” bug. I was able to fix it with help mostly from Copilot. Below I have written a documentation and the corrected code, with also the errors I fixed. I hope it will be useful for you.
Detected Error:
The primary issue was that the "fake marker" did not appear on the Google map. This seemed to be caused by:
Applied Solution:
event listener
for theidle
event of the Google map, ensuring that the marker is created only after the map is fully initialized. This ensures that the map is ready to receive the marker.Corrected Code:
Here's the entire corrected code:
The text was updated successfully, but these errors were encountered: