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 Toggle Issue Comments) Reference messages are not listed/hidden #28

Closed
darkred opened this issue Oct 20, 2017 · 2 comments
Closed
Labels

Comments

@darkred
Copy link
Collaborator

darkred commented Oct 20, 2017

Using 'GitHub Toggle Issue Comments' script version 1.1.2
with GM 3.17 in Firefox 56.01

Example link:
https://github.com/Microsoft/vscode/issues/11847
There are 3 such entries in that page (one is a group with 3 entries, the other two are single) .

I quote from the script code:

refs: {
	isHidden: false,
	name: "ghic-refs",
	selector: ".discussion-item-ref, .discussion-item-head_ref_deleted",
	label: "References"
},

Unfortunately the above selector .discussion-item-ref, .discussion-item-head_ref_deleted no longer works:
these entries now have a single class name instead, the plain: .discussion-item, as I noticed.
This class name is also given (among others) to other entries.
@Mottie, if that helps you, I think that a simple way to identify such entries is to check if their .className === 'discussion-item' && .classList.length === 1 .


PS. Btw, I've checked most other entry times (in other issue pages) and they all still work ok (I didn't find appropriate issue pages to check the: Integrations and the 'Diff current/outdated' entries)

@Mottie
Copy link
Owner

Mottie commented Oct 21, 2017

Hey @darkred!

Thanks for letting me know. That does appear to be a recent change in their layout.

I recently added the functionality to check if the .discussion-item contains a certain class, so I'll have it check for the h4 with a class of .discussion-item-ref-title, which appears to cover the two layouts I've seen in both the references from Feb 9 and Apr 4 (ref).

refs: {
  isHidden: false,
  name: "ghic-refs",
  selector: ".discussion-item",
  contains: ".discussion-item-ref-title",
  label: "References"
},

Sadly, I don't remember where I got the .discussion-item-head_ref_deleted selector from, or if it still exists.

@Mottie Mottie closed this as completed in c6f1840 Oct 21, 2017
@Mottie Mottie added the bug label Oct 21, 2017
@darkred
Copy link
Collaborator Author

darkred commented Oct 21, 2017

Thank you for the quick fix, @Mottie !

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

No branches or pull requests

2 participants