Created
July 21, 2020 07:38
-
-
Save haridsv/6b902e3d1a5eb4f4496ef517d56b1f93 to your computer and use it in GitHub Desktop.
Expand all the comments made by the current user (handles only those that are part of a review submission).
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
var currentUser = document.querySelector(".user-profile-link").href.replace(/.*\//, "") | |
document.querySelectorAll("div.js-comment.js-targetable-comment.js-updatable-content").forEach(function(n) { | |
var authorNode = n.parentNode.querySelector(".author"); | |
if (authorNode && authorNode.textContent == currentUser) { | |
n.parentNode.querySelectorAll(".js-toggle-outdated-comments").forEach(n => n.click()); | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment