Skip to content

Instantly share code, notes, and snippets.

@EduVencovsky
Last active July 27, 2024 13:42
Show Gist options
  • Save EduVencovsky/bc7f472e0c56b8a975b17e2a38f8b86a to your computer and use it in GitHub Desktop.
Save EduVencovsky/bc7f472e0c56b8a975b17e2a38f8b86a to your computer and use it in GitHub Desktop.
Makes CapCut captions uppercase correctly even when there's accents
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