Skip to content

Instantly share code, notes, and snippets.

@billmeyer
Last active November 9, 2022 19:07
Show Gist options
  • Save billmeyer/ada3d354186d939f5960dc90aac941a7 to your computer and use it in GitHub Desktop.
Save billmeyer/ada3d354186d939f5960dc90aac941a7 to your computer and use it in GitHub Desktop.
Replace a value in a read only HTML input using JS

Enter this in the Chrome DevTools console:

// Use the element selector to get the input field
elem = document.querySelector("input[name='ingestion_key']")
elem.value = elem.value.replace(/[0-9a-f]/g, 'x')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment