Skip to content
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

Fix code.user.js userscript #49

Merged
merged 1 commit into from
Aug 23, 2024
Merged

Fix code.user.js userscript #49

merged 1 commit into from
Aug 23, 2024

Conversation

patschi
Copy link
Contributor

@patschi patschi commented Aug 23, 2024

For me this userscript hasn't been working since the beginning, showing following error in the devconsole:
image

In text:

{readyState: 4, responseHeaders: '', status: 408, statusText: "Failed to execute 'fetch' on 'WorkerGlobalScope': Request with GET/HEAD method cannot have body.", DONE: 4, …}

Upon further research, it looks like ajax requests are not allowed to have any body when using HTTP methods of either GET or HEAD.

By adding these minor changes, the payload will be set to null if either of those two HTTP methods are used. Now, the userscript is working (and also listing the bots as expected):
image

Edit: Probably noteworthy, I am using Google Chrome and this extension.

@Citrinate Citrinate merged commit 5fddd1f into Citrinate:main Aug 23, 2024
@Citrinate
Copy link
Owner

Thanks for this. The script was working in that environment as recently as Tampermonkey V5.1.1. No clue how long it's been broken for.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants