GithubHelp home page GithubHelp logo

simgus / chrome-extension-v3-starter Goto Github PK

View Code? Open in Web Editor NEW
319.0 319.0 217.0 30 KB

๐Ÿš€ Minimal Chrome extension template using manifest v3 ๐Ÿš€

License: MIT License

JavaScript 60.31% CSS 10.65% HTML 29.04%
addon chrome chrome-extension chromium extension

chrome-extension-v3-starter's Issues

Make the repository a template

In GitHub, you can mark a repository as "template" and let people build on their projects from there easily. This also gives credit to the template owner, which I do want to give.

Add TS support and Async/Await-like features

This starter is great and helped me bootstrap my extension quite fast, thanks!

I got slowed down due to the lack of Async/Await support, though.
I tried to use https://github.com/mozilla/webextension-polyfill#basic-setup but I'm getting stuck with the configuration.

Also, I saw it was possible to use TypeScript, and I wish this starter would support it by default, it's so much more comfortable to use than plain JS.

What's your opinion on those 2 features?

listen in content-script and change some elements in Dom

Thank you for your sample!
I have a problem with development chrome extension,
Let me explain that:
I have a popup.js and popup.html
also I have a content.js as a content-script
also I have a background.js as a background script

Now, I want to click on a button in popup.js and then listen it in content-script and change some elements in dom.

But I don't receive any data in content script

popup.js
chrome.tabs.query({active: true, currentWindow: true}, async (tabs) => { chrome.tabs.sendMessage(tabs[0].id, {message: 'changeDOM'}); });

content.js
chrome.runtime.onMessage.addListener((request, sender, sendResponse) => { console.log("request"); });

How can I solve it?
Should I use a background service?

Thank you for your response!

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.