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

Use pjax:end #11

Closed
fregante opened this issue Jul 8, 2017 · 6 comments
Closed

Use pjax:end #11

fregante opened this issue Jul 8, 2017 · 6 comments

Comments

@fregante
Copy link
Contributor

fregante commented Jul 8, 2017

pjax:end seems to work just as well as the current code, if not faster and more efficiently:

pjax:end demo

Perhaps injection/index.js should just be this:

function gitHubInjection(cb) {
  document.addEventListener('pjax:end', cb);
  cb();
}
@stefanbuck
Copy link
Member

This looks interesting. Will review it in detail later today

@stefanbuck
Copy link
Member

This is awesome, great stuff 👍 How did you figured this out? Did you inspect GitHub's source code? Anyway, I'll update the package

@fregante
Copy link
Contributor Author

fregante commented Jul 9, 2017

Wait! Let's get #10 in first! 😃
If you want this I'll change the PR.

I just saw it here: https://github.com/sindresorhus/refined-github/blob/master/src/content.js#L519

@stefanbuck
Copy link
Member

I think many changes you made in #10 aren't needed anymore if we go with pjax:end. Therefore my idea was to close #10 and implement pjax:end straight away (see #12)

@fregante
Copy link
Contributor Author

👍

@stefanbuck
Copy link
Member

Merge and released

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

No branches or pull requests

2 participants