Created
March 4, 2023 01:03
-
-
Save andelink/cda7d769a1326af3adb03633af9307e0 to your computer and use it in GitHub Desktop.
Show all resolved PR comments
This file contains 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
// ==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