Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix delayed link + improve PJAX handling
the addition of the "First commit" link is delayed for a minute or so in many (easy to reproduce) cases. this appears to be due to a bug in jQuery-onMutate. switching to another MutationObserver (jquery.initialize) wrapper fixes it. also: register the commit-bar observer on *all* GitHub pages to ensure it's always registered on the page *before* a PJAX transition to a repo page. PJAX transitions don't cause the userscript to be reloaded, so we need to make sure the observer is in place on a page *before* the transition, which is not the case if we restrict the matched URLs to repo pages.
- Loading branch information