Skip to content

Instantly share code, notes, and snippets.

View 0xF013's full-sized avatar

Mihail Maxacov 0xF013

View GitHub Profile
@harunsmrkovic
harunsmrkovic / hide-snapshots-in-diff.js
Created June 27, 2018 16:19
Hide all snapshot diffs in GitHub PR
(function() {
const FILES_TO_HIDE = 'snapshots'
if (window.location.href.includes('/pull/') && window.location.href.includes('/files')) {
Array.from(document.querySelectorAll('.file-header'))
.filter(node => node.querySelector('.file-info > a').outerText.includes(FILES_TO_HIDE))
.forEach(node => node.parentNode.querySelector('.file-actions .js-details-target').click())
}
})()