title: Editing localStorage with a Chrome Extension?
body: <p>I'm working on a simple Chrome extension, that integrates with a certain web app. That app is built with React, and uses <code>localStorage</code> to store the state of the app, which is useful to me.</p>
  
  <p>Reading the data is not an issue, but writing it seems to be impossible using Javascript. Here's where I save the change:</p>
  
  <pre class="lang-js prettyprint-override"><code>replaceText(code, replacement) {
      const { text } = this.getActiveThread();
      const replacedText = text.replace(code, replacement);
      const lsItem = getSingleItem(this.activeThreadId);
      lsItem.someValue = replacedText;
      saveToStorage(this.activeThreadId, lsItem);
  }
  </code></pre>
  
  <p><code>getSingleItem</code> returns the parsed item from <code>localStorage</code>, and <code>saveToStorage</code> does the inverse of that. </p>
  
  <p>I have the Application tab open in Dev tools, and I can see the change is saved when I call <code>replaceText</code>, but it's reverted after a second or so. If I apply the change in dev tools manually, the change is saved.</p>
  
  <p>Is this a Chrome feature, or does the app I'm trying to modify change the value back? If so, how would I go about figuring out how to properly change the value?</p>