GitHub now allows to expand/collapse all files in a PR diff at once (pressing
Alt while clicking one of the toggles). Unfortunately, there is no similar feature to mark all files as viewed. This is handy after having reviewed meaningful changes to file, and automatically modified/generated files can be ignored.
So here goes a one-liner for the JS console.
Array.from(document.getElementsByClassName('js-reviewed-toggle')).forEach(c => c.getElementsByTagName('input').checked || c.click())