Skip to content

Instantly share code, notes, and snippets.

@andelink
Created March 4, 2023 01:03
Show Gist options
  • Save andelink/cda7d769a1326af3adb03633af9307e0 to your computer and use it in GitHub Desktop.
Save andelink/cda7d769a1326af3adb03633af9307e0 to your computer and use it in GitHub Desktop.
Show all resolved PR comments
// ==UserScript==
// @name Show all resolved PR comments
// @namespace http://tampermonkey.net/
// @version 0.3
// @description try to take over the world!
// @author You
// @match https://github.com/*/*/pull/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=github.com
// @grant none
// ==/UserScript==
function showResolvedComments() {
document.querySelectorAll('span.Details-content--closed').forEach((e)=>{e.click()});
}
function doc_keyUp(e) {
if (e.ctrlKey && e.key === 'd') {
showResolvedComments();
}
}
// immediately open resolved comments already within view
showResolvedComments();
// add ctrl+d keyboard shortcut
document.addEventListener('keyup', doc_keyUp, false);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment