Created
April 25, 2017 15:13
-
-
Save jcreamer898/a98d8acad6fbd8523e54515a4ce3fc42 to your computer and use it in GitHub Desktop.
Github Projects Helpers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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