Created
January 24, 2024 05:16
-
-
Save 0x4007/750b849b60e27a93fc77a65a50403990 to your computer and use it in GitHub Desktop.
Max Permissions
This file contains hidden or 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
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