Skip to content

[Toggle Expanders] Cannot read property 'querySelectorAll' of null #101

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
aspiers opened this issue Aug 29, 2019 · 4 comments
Closed

[Toggle Expanders] Cannot read property 'querySelectorAll' of null #101

aspiers opened this issue Aug 29, 2019 · 4 comments
Labels

Comments

@aspiers
Copy link

aspiers commented Aug 29, 2019

When following the link from https://github.com/Mottie/GitHub-userscripts/wiki/GitHub-toggle-expanders to https://github.com/torvalds/linux/commits/master, if I Control+Shift+click on a commit, nothing expands, and in my Javascript console I see:

userscript.html?id=0fae92d5-5b1e-4dfe-b375-9b8c648189cd:30 Uncaught TypeError: Cannot read property 'querySelectorAll' of null
    at toggle (userscript.html?id=0fae92d5-5b1e-4dfe-b375-9b8c648189cd:30)
    at Window.eval (userscript.html?id=0fae92d5-5b1e-4dfe-b375-9b8c648189cd:52)
    at <anonymous>:2:494
    at c.<computed> (eval at exec_fn (master:1), <anonymous>:55:182)
@Mottie
Copy link
Owner

Mottie commented Sep 2, 2019

Hi @aspiers!

I was just working on this fix.

I was thinking about changing it so that Shift+Click only toggle the expanders of the current date. Then Shift+Ctrl+Click would toggle all expanders on the page. This is different that the previous behavior where Shift+Click would toggle all the expanders and including the Ctrl did nothing different (except for the outdated blocks). What do you think of this change?

@Mottie Mottie added the bug label Sep 2, 2019
@aspiers
Copy link
Author

aspiers commented Sep 2, 2019

Thanks @Mottie! Yes, this sounds exactly right to me.

Mottie added a commit that referenced this issue Sep 2, 2019
* Changed commit, release & pull request behavior:
  * Using Shift + Click on an expander only toggles the other
    expanders within a date block.
  * Using (Ctrl or &#x2318;) + Shift + Click on an expander
    now toggles all expanders.
* Fixes issues #100, #101 & #87.
@Mottie
Copy link
Owner

Mottie commented Sep 2, 2019

This has been fixed in the latest version!

@Mottie Mottie closed this as completed Sep 2, 2019
@aspiers
Copy link
Author

aspiers commented Sep 3, 2019

Works perfectly, thanks again :-)

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

No branches or pull requests

2 participants