Skip to content

Instantly share code, notes, and snippets.

@0x4007
Created January 24, 2024 05:16
Show Gist options
  • Save 0x4007/750b849b60e27a93fc77a65a50403990 to your computer and use it in GitHub Desktop.
Save 0x4007/750b849b60e27a93fc77a65a50403990 to your computer and use it in GitHub Desktop.
Max Permissions
document.querySelectorAll('.SelectMenu-item').forEach(item => {
if (item.textContent.includes('Read and write')) {
item.click();
}
});
// Sometimes you might need to trigger a change event for the clicks to take effect
// This part is optional and depends on how GitHub's front-end is implemented
document.querySelectorAll('input[type=radio]').forEach(radio => {
if (radio.value === 'write') {
radio.dispatchEvent(new Event('change'));
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment