Skip to content

Instantly share code, notes, and snippets.

@jcreamer898
Created April 25, 2017 15:13
Show Gist options
  • Save jcreamer898/a98d8acad6fbd8523e54515a4ce3fc42 to your computer and use it in GitHub Desktop.
Save jcreamer898/a98d8acad6fbd8523e54515a4ce3fc42 to your computer and use it in GitHub Desktop.
Github Projects Helpers
const toggleAssigned = (function () {
let showing = false;
return function (username) {
const $cards = $$(".issue-card");
Array.from($cards).forEach((el) => {
if (!showing) {
if (!el.querySelectorAll("img[alt='@" + username + "']").length) {
el.style = "display:none";
}
} else {
el.style = "display:block";
}
});
showing = !showing;
};
}());
// Now you can run the following to hide and show assigned cards.
toggleAssigned("jcreamer898");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment