fj

filepicker-jetpack

Quick filepicker module for firefox jpm based add-ons.

Showing:

Popularity

Downloads/wk

2

GitHub Stars

0

Maintenance

Last Commit

7yrs ago

Contributors

0

Package

Dependencies

1

License

MPL-2.0

Type Definitions

Tree-Shakeable

No?

Categories

Readme

filepicker-jetpack

NPM

Quickly create filepicker in firefox add-ons (jpm based).

To use

  1. Install it:

    $ npm i filepicker-jetpack
    
  2. Import it and use:

    var FilePicker = require('filepicker-jetpack');
    var fp = new FilePicker({fileExtension: '.txt',
                             title: 'Text file picker'});
    var fileContent = fp.open('data');
    

FilePicker(opts)

opts should be an object with 3 optional properties.

fileFilter - Refer Filter constants

fileExtension - Extension of the file to pick, like '.txt'.

title - Title of the file picker dialog box.

open(resultType)

Open the filepicker.

resultType specifies the type of result to be returned.

'data' - would return file content of the selected file.

'path' - would return path of the selected file.

Test it

Clone the repo and run npm install inside the repo to install all the dependencies. Prepare for testing by running npm test. cd into jpmTest/ and run jpm run -b /path/to/firefox-nightly.

Example, on OS X

$ jpm run -b /Applications/Nightly.app

This works only in firefox nightly, like jpm.

LICENSE

MPL

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100
No reviews found
Be the first to rate

Alternatives

No alternatives found

Tutorials

No tutorials found
Add a tutorial