aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2017-12-07README: Edit description for clarityHEADmasterTeddy Wing
After re-reading the description, I didn't like the sound of it. It didn't clearly distinguish the problem and existing behaviour.
2017-12-07Add READMETeddy Wing
Describe the script, and include installation instructions and license information.
2017-12-07Add license (GNU GPLv3+)Teddy Wing
2017-12-07Initial commit. Expands all hidden outdated comments on GitHub PRs.Teddy Wing
When visiting a GitHub pull request page, this script will expand all collapsed outdated comments. This facilitates seeing comment responses that may have been hidden by more recent changes. Originally this code was supposed to be a bookmarklet. Invoking it would toggle all the comments to be expanded or collapsed. I tried this, but it didn't work: javascript:(function() { var outdated_buttons = document.querySelectorAll('.js-comment-container.outdated-comment:not(.open) .show-outdated-button'); for (var i = 0; i < outdated_buttons.length; i++) { outdated_buttons[i].click(); } })() (Also tried with the characters converted to HTML entities.) The reason why it didn't work is that GitHub apparently has a Content Security Policy (CSP) in place that prevents the execution of bookmarklets. Yes, it's for anti-XSS security, but what kind of internet is this where bookmarlets don't work any more? Not the kind of internet I want. That makes one less fun thing about the web, how disappointing. Since a bookmarlet won't work, make it a Greasemonkey user script instead. And instead of toggling comments, just expand them by default all the time.