Closed radiovisual closed 8 years ago
You can recreate this problem by loading any github page, clicking the Toggle Button to say "Hide dotfiles", then clicking any of the tabs at the top (e.g., "Issues", "Pull Requests", etc) and then clicking back to the "Code" tab, then you will notice that the dotfiles are still showing, but the button now says "Show dotfiles"
Yeah, looks like a bug. A pull request would be much appreciated :)
Every time the
addToggleBtn()
function is called, and the Toggle Button is not loaded (and it never is after the Mutation occurred, which is why it needs to be continuously added), this line of code is run:Which indiscriminately sets the button.textContent to "Show dotfiles", ignoring the application state before the Mutation occurred.
I am happy to help with a PR if you agree this is a problem.