Github Comment Enhancer doesn't work when making new issues #66

Closed
thenoncoder opened this Issue Jul 28, 2015 · 8 comments

Projects

None yet

3 participants

@thenoncoder

It only works in comments.
I understand that the name is comment enhancer, but couldn't you still make it work for all text input fields on Github?

@jerone
Owner
jerone commented Jul 28, 2015

It should work on comments, issues, pull requests, inline comments, the wiki and comments on Gist.

Can you provide in clear steps where it doesn't work for you.

@thenoncoder

It works now for some reason.

@jerone
Owner
jerone commented Jul 28, 2015

I noticed that in specific cases (particular sequence of steps) the script won't attach, but I haven't found a way to produce it yet 😞

The problem is that GitHub uses pjax for page navigation, making it very hard to attach this script. If it doesn't work, a refresh should always work.

@thenoncoder

It works for me now, not sure why it doesn't work for you.

@Tailszefox

I've just got the same issue when trying to make a new issue. Indeed, refreshing worked. Perhaps the script should force a reload in cases like this?

@jerone
Owner
jerone commented Aug 3, 2015

Again, I really would like to fix this issue too, but the way GitHub page navigation works (pjax) makes it really hard to detect real navigation actions.

Without clear and reproducible steps I can't fix this issue :(

@Tailszefox

I think I caught one of the causes of the issue. It happens when navigation starts on a page where the script isn't set to run. Note that I'm using Firefox, perhaps it works differently with other browsers.

For example, if I start navigation on https://github.com/jerone/UserScripts/issues , the script gets triggered and everything works well. However, if I start navigation on https://github.com/jerone/UserScripts , or on https://github.com/jerone/UserScripts/issues?q=is%3Aissue+is%3Aclosed , the script isn't run, and thus doesn't attach to the pjax event. Hence, going anywhere from there means the script never triggers on any comment box.

One way I've found to solve this is to include the script on every page on GitHub:
// @include https://github.com/*/*

Obviously, though, that may be a tad overkill, so it can probably be tweaked. In any case, with that, the script triggers consistently and is attaching every time.

@jerone
Owner
jerone commented Aug 3, 2015

if I start navigation on https://github.com/jerone/UserScripts , or on https://github.com/jerone/UserScripts/issues?q=is%3Aissue+is%3Aclosed , the script isn't run

Awesome, just confirmed. Will soon release a fix for this.

@jerone jerone reopened this Aug 3, 2015
@jerone jerone self-assigned this Aug 3, 2015
@jerone jerone closed this in f0192bf Aug 17, 2015
@jerone jerone removed their assignment Aug 17, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment