0

I want to make a chrome extension that opens a popup that displays a website that has a game, but that also saves your progress in the game when the popup is closed. Everything works as far as having the popup display the website with the game, but when the popup closes, it reloads the page, hence getting rid of the game progress. How do I keep the website "open" even though the popup is closed? Here is my popup code:

<!DOCTYPE html>
<html><head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <title>Games4Fun</title>
                <style>
            body { overflow:hidden; margin:0px; }
        </style>
 </head>
 <body>

  <iframe src="https://jsnes.fir.sh/" frameborder="no" scrolling="yes" width="400" height="300"></iframe>
                
</body></html>

Here is My Manifest.json Code:

{
  "manifest_version": 2,
  "name": "Games4Fun",
  "version": "0.1",
  "browser_action": {
  "default_icon": "mario.png",
  "default_popup": "popup.html"
}
}
  • 1
    Your question seems to boil down to "how to store data locally in a chrome extension", you should [check out this question and its answers](https://stackoverflow.com/questions/5364062/how-can-i-save-information-locally-in-my-chrome-extension). From there on you can figure out some sort of save/load mechanism that suits your needs. :) – ppajer Sep 27 '17 at 18:13
  • I looked at that question, but I'm still confused. I don't really get what it's saying to do, and I am not very good at html. It would help if you could maybe explain a little better what I should do, because at the moment, I'm really not good at html. thanks for answering, though! – Curious about extensions Sep 29 '17 at 19:33

0 Answers0