Skip to content

Instantly share code, notes, and snippets.

@JakeCoxon
Last active December 4, 2019 14:36
Show Gist options
  • Save JakeCoxon/88936dd0789c50439e6be13408be6948 to your computer and use it in GitHub Desktop.
Save JakeCoxon/88936dd0789c50439e6be13408be6948 to your computer and use it in GitHub Desktop.
Github PRs Highlight name
let username = document.querySelector('meta[name="user-login"]').getAttribute('content');
document.querySelectorAll('.js-issue-row').forEach(row => {
let userLink = row.querySelector('a[data-hovercard-url="/users/' + username + '/hovercard"]')
if (!userLink) return;
Object.assign(userLink.style, {
background: '#3940c3',
borderRadius: '5px',
padding: '4px',
})
userLink.style.setProperty("color", "white", "important");
row.parentElement.insertBefore(row, row.parentElement.firstChild);
})
@JakeCoxon
Copy link
Author

JakeCoxon commented Dec 4, 2019

You can use this extension to run it https://chrome.google.com/webstore/detail/user-javascript-and-css/nbhcbdghjpllgmfilhnhkllmkecfmpld that runs on the URL github.com/*/*/pulls or one of many other extensions that let you run JS on a page

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