Skip to content

GitHub table of contents not working in Firefox with Greasemonkey #69

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

Closed
hckr opened this issue Jan 16, 2019 · 4 comments
Closed

GitHub table of contents not working in Firefox with Greasemonkey #69

hckr opened this issue Jan 16, 2019 · 4 comments

Comments

@hckr
Copy link

hckr commented Jan 16, 2019

The following shows up in Firefox's developer console after installation of your "GitHub table of contents" userscript in Greasemonkey:
screenshot_20190116_014216

That's weird, because there is a @grant GM_addStyle in the code...

@Mottie
Copy link
Owner

Mottie commented Jan 16, 2019

Hi @hckr!

Greasemonkey changed its api and made it non-backwards compatible. You'd have to add a @grant GM.addStyle and use it as you would a promise. There is a polyfill, but the author wasn't very helpful so I decided to not bother making my userscripts compatible - see greasemonkey/greasemonkey#2787.

I guess I could look at it again, but adding two different @grant entries for each method is troublesome.

@hckr
Copy link
Author

hckr commented Jan 16, 2019

Wow, thanks for the quick reply.

Greasemonkey changed its api and made it non-backwards compatible.

😞

but adding two different @grant entries for each method is troublesome

If it solves the issue, it definetely will be helpful for people who'd like to use your userscripts. I don't think it's worth to fight with Greasemonkey developers 😝

@Mottie Mottie closed this as completed in aa6b296 Feb 17, 2019
@Mottie
Copy link
Owner

Mottie commented Feb 17, 2019

The TOC userscript is now compatible with GM4.

@hckr
Copy link
Author

hckr commented Feb 21, 2019

Great, thanks!

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

No branches or pull requests

2 participants