Last active
December 6, 2017 08:52
-
-
Save mavimo/ecd2c345805b9d07b2d931cf051973be to your computer and use it in GitHub Desktop.
Delete author github comments on PR
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
const AUTHOR_NAME = 'mavimo'; | |
Array.prototype.forEach.call(document.querySelectorAll('.review-comment'), function (el, i) { | |
if (el.querySelector('.author').innerHTML == AUTHOR_NAME && el.querySelector('p sub') !== null && el.querySelector('p sub').innerHTML.startsWith('reported by')) { | |
el.querySelector('.js-comment-delete button').removeAttribute('data-confirm'); | |
el.querySelector('.js-comment-delete button').click(); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment