Skip to content

Commit

Permalink
Optimize full names selector (refined-github#983)
Browse files Browse the repository at this point in the history
  • Loading branch information
fregante authored Jan 12, 2018
1 parent 1caeacd commit 45877ee
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions source/features/show-names.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,8 @@ export default async () => {
const cache = await getCachedUsers();

// {sindresorhus: [a.author, a.author], otheruser: [a.author]}
const selector = `.js-discussion .author:not(.refined-github-fullname)`;
const usersOnPage = groupBy(select.all(selector)
.filter(el => !el.getAttribute('href').startsWith('/apps/')), el => el.textContent);
const selector = `.js-discussion .author:not(.refined-github-fullname):not([href^="/apps/"])`;
const usersOnPage = groupBy(select.all(selector), el => el.textContent);

const fetchAndAdd = async username => {
if (typeof cache[username] === 'undefined' && username !== myUsername) {
Expand Down

0 comments on commit 45877ee

Please sign in to comment.