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

"GitHub Diff Filename" only work when reloading on the diff page #174

Closed
luzianscherrer opened this issue Sep 4, 2022 · 4 comments
Closed

Comments

@luzianscherrer
Copy link

I was trying out your "GitHub Diff Filename" userscript. It is only working when I explicitly reload the diff page in the browser once I have navigated there. Are you still maintaining this script and could you give me a hint how to modify it in order to apply the changes without having to manually reload on the diff page?

@Mottie
Copy link
Owner

Mottie commented Sep 5, 2022

Hi @luzianscherrer!

I am still maintaining it, but I've been distracted by so many other things.

I think the issue is effecting more than just this userscript. When I move to a different view, it "seems" like the page is reloading, but the document readyState doesn't change, and the mutation observer doesn't catch any changes even though the entire page reloaded. I feel like this might be a bug in Tampermonkey? Unless you're using a different userscript manager, then I need more time to investigate.

@luzianscherrer
Copy link
Author

It must have something to do with the fact that you are attaching the MutationObserver to document.querySelector("body") I think. That MutationObserver gets lost on certain pages. I'm not very well versed in web technology but maybe they are removing all observers on certain actions or something like that?

If I attach the MutationObserver to document then the mutuations are coming through.

@Mottie
Copy link
Owner

Mottie commented Oct 26, 2022

Hiya! Sorry for the delay, please check to verify that this userscript is now working as expected.

@luzianscherrer
Copy link
Author

Yes, I can confirm that with version 1.1.6 it is now working fine. Thanks a lot!

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