Giter Club home page Giter Club logo

Comments (2)

rjpeterson avatar rjpeterson commented on June 16, 2024

Goals:

  1. Inject background.js. Script listens for "open popup" message, changes in chrome storage, and hotkey messages. Injects content script and sends content objects.
  2. On popup open, check chrome storage. If empty set default values, otherwise send message to background
  3. On hotkey, check chrome storage. If empty set default values, otherwise send message to background
  4. On language or font size change, set in chrome storage where background.js can detect change

Steps to take:

  1. Leave only calls to chrome.storage set and get in app.js
  2. Add listener for changes in chrome storage in background.js
  3. Add send message when popup opened in app.js
  4. Add listener for popup in background.js
  5. Change storage.get calls to "set" default values when storage is empty

from hanzisize.

rjpeterson avatar rjpeterson commented on June 16, 2024

Actually app.js shouldn't have to send any messages. It should only update chrome.storage which background.js will listen to for changes.

from hanzisize.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.