StylishThemes / GitHub-Dark-Script

Archived - Please use https://github.com/StylishThemes/GitHub-Dark directly
https://greasyfork.org/en/scripts/15562
MIT License
550 stars 51 forks source link

Script settings button does not show #67

Closed silverwind closed 5 years ago

silverwind commented 5 years ago

Not sure when this broke but I can't see the settings menu in the user menu button in at least https://github.com/StylishThemes/GitHub-Dark-Script/commit/25d4c3f3e08fb73c7d79d393edddbd20ff8fdc0e or earlier:

Mottie commented 5 years ago

Hmm, I'm seeing the entry in Chrome.

silverwind commented 5 years ago

Hmm, something Firefox specific?

Mottie commented 5 years ago

It looks that way.

In my custom nav userscript, I use this selector to target the dropdown, and it works in both:

.Header .dropdown-item[href='/settings/profile'],
.Header .dropdown-item[data-ga-click*='go to profile'],
.js-header-wrapper .dropdown-item[href='/settings/profile'],
.js-header-wrapper .dropdown-item[data-ga-click*='go to profile']
Mottie commented 5 years ago

It wasn't the selector. It should be fixed now. I didn't bump the version in case you had other changes planned.

silverwind commented 5 years ago

Whoops, my bad. For some reason I assumed for .. of works just like for .. in without the guard for own properties, but this case proves it doesn't. Will bump the version.

silverwind commented 5 years ago

Today I learned:

> for (const k in {a: 1}) console.log(k)
a
> for (const k of {a: 1}) console.log(k)
Thrown:
TypeError: {(intermediate value)} is not iterable