Select Language:
If you’re trying to delete a GitHub comment and find that the delete option isn’t available, you can resolve this by adjusting the permissions on your browser. Here’s a simple step-by-step guide to help you do it:
First, open your browser’s settings or developer tools. This is usually done by right-clicking on the page and selecting “Inspect” or “Inspect Element.” Once you’re in the developer tools, look for the “Console” tab.
Next, type in this command:
javascript
document.querySelectorAll(‘.js-comment-delete-button’).forEach(button => button.style.display=’block’);
and press enter. This command makes hidden delete buttons visible on the page.
Now, take a look at your comment again. You should see the delete option appear where it was missing before. Click on it, and confirm if prompted by GitHub. This should allow you to delete the comment successfully.
Remember, this change only affects your current browser session and doesn’t alter GitHub’s actual permissions or the status of the comment. If you’re unable to delete the comment after trying this, it might be because your user permissions don’t allow deletion, and you’ll need to reach out to someone with admin access.
This quick hack helps when the delete button isn’t showing up due to permission issues or webpage glitches. Just keep in mind that such tweaks are temporary and specific to your current browsing session.




