I am trying to change text in an input form using chrome extension, and i was able to do that! but when submitting the form it get submitted with the old saved value! because the page have an option to save information so you don't have to fill it out again. I am not sure why it does not change the text to new text and submit the form with new value.
I tried this, it changes the input value but it always back to original!
function changeText() {
const element = $("#title");
const textToReplace = element.val();
const newText = textToReplace.replace("Hi", "bye");
element.val(newText);
}