Last active
July 27, 2024 13:42
-
-
Save EduVencovsky/bc7f472e0c56b8a975b17e2a38f8b86a to your computer and use it in GitHub Desktop.
Makes CapCut captions uppercase correctly even when there's accents
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
upperCaseCaptions = () => { | |
const items = document.querySelectorAll('.subtitle-list-item textarea') | |
const reactProp = Object.keys(items[0]).find(x => x.startsWith('__reactProps')) | |
items.forEach(item => { | |
const upperText = item.textContent.toUpperCase() | |
item[reactProp].onChange({target: {value: upperText}}) | |
}) | |
} | |
upperCaseCaptions() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment