Coder Social home page Coder Social logo

Comments (12)

BigBlueHat avatar BigBlueHat commented on May 22, 2024 1

A great (small?) start would be an eslint config file for this repo that matches what's supported of ES6/7 now in Firefox (at least). It would add some "enforcement" on code quality too...which is probably not a bad thing. 😉

👍 for this!
🎩

from webextensions-examples.

kumar303 avatar kumar303 commented on May 22, 2024 1

@BigBlueHat good idea! That would be an easier example to create so I filed separately for it: #117

from webextensions-examples.

kumar303 avatar kumar303 commented on May 22, 2024

There could be some useful tools / examples to check out here: https://github.com/vitalets/awesome-browser-extensions-and-apps

from webextensions-examples.

kumar303 avatar kumar303 commented on May 22, 2024

Here is an example of how to set up webpack: https://github.com/mdn/webextensions-examples/tree/master/webpack-modules

from webextensions-examples.

kumar303 avatar kumar303 commented on May 22, 2024

Aha, I created this example but forgot I had filed a bug about it! #155

from webextensions-examples.

wesinator avatar wesinator commented on May 22, 2024

how do I import functions from one js script in my extension to another ?

Tried import but that doesn't seem to work, and even breaks the background menu from displaying.

This seems like a common enough construction that it should be documented.

from webextensions-examples.

chrisdavidmills avatar chrisdavidmills commented on May 22, 2024

@rebloor I know this one is closed, but fancy investigating @wesinator 's request?

from webextensions-examples.

kumar303 avatar kumar303 commented on May 22, 2024

All ES6/import examples have been removed and I explained why this was unhelpful in #398 (comment) . I hope that someone can reconsider that decision.

from webextensions-examples.

rebloor avatar rebloor commented on May 22, 2024

@chrisdavidmills I will add it to my backlog, and give it some consideration when I get the non urgent stuff.

from webextensions-examples.

wesinator avatar wesinator commented on May 22, 2024

@rebloor I know this one is closed, but fancy investigating @wesinator 's request?

it sounds like I may be looking for tabs.executeScript

This example executes a script from a file, packaged with the extension, called "content-script.js". The script is executed in the currently active tab. The script is executed in subframes as well as the main document:

(Trying to call function x() from script1.js in script2.js, both scripts in the extension)

from webextensions-examples.

wesinator avatar wesinator commented on May 22, 2024

@rebloor I know this one is closed, but fancy investigating @wesinator 's request?

it sounds like I may be looking for tabs.executeScript

This example executes a script from a file, packaged with the extension, called "content-script.js". The script is executed in the currently active tab. The script is executed in subframes as well as the main document:

(Trying to call function x() from script1.js in script2.js, both scripts in the extension)

https://stackoverflow.com/questions/59971909/how-to-call-load-function-from-separate-script-file-within-mozilla-webextension/60244276#60244276 is the answer I was looking for

from webextensions-examples.

rebloor avatar rebloor commented on May 22, 2024

@wesinator thanks for the update, I've created 2827 to investigate how we might improve the documentation.

from webextensions-examples.

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.