Skip to content

Instantly share code, notes, and snippets.

@standaniels
Created January 24, 2018 09:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save standaniels/fd387d8f2d7bc92106c96769ccec152b to your computer and use it in GitHub Desktop.
Save standaniels/fd387d8f2d7bc92106c96769ccec152b to your computer and use it in GitHub Desktop.
Show only my issues in milestone
(()=>{function e(){Array.from(document.querySelectorAll("[id^=issue_")).forEach(e=>{0===Array.from(e.querySelectorAll("img.from-avatar")).filter(e=>e.alt==="@"+document.querySelector('meta[name="user-login"]').getAttribute("content")).length&&(e.style.display="none")})}new MutationObserver(e).observe(document.querySelector(".issues-listing"),{subtree:!0,childList:!0}),e()})();
(() => {
function init() {
Array.from(document.querySelectorAll('[id^=issue_')).forEach(issue => {
if (Array.from(issue.querySelectorAll('img.from-avatar')).filter(img => img.alt === '@' + document.querySelector('meta[name="user-login"]').getAttribute('content')).length === 0) {
issue.style.display = 'none';
}
});
}
let observer = new MutationObserver(init);
observer.observe(document.querySelector('.issues-listing'), {subtree:true, childList: true})
init();
})();
@pauldenotter
Copy link

Awesome! 👍

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