Drag'n'drop botton or space on the toolbar

Hi guys. I would like to start with programming addon for uploading and sending data to server. For example I would like to make the add-on which make simple button (space) where I can drop any kind of data like files and text. I am new here so if someone could help me, please as simple as possible. I am programmer but more PHP & MySql. Many thanks for all answers. Cheers!

here are the APIs https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Browser_support_for_JavaScript_APIs

some examples https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Examples

and debugging intro https://vimeo.com/305614168

How would you build this addon if it were a web page? (html+js… no php) Your extension should be similar only that it would load some files from the browser, not from the web.

Hi Andrei,

Many thanks for the answers. It should be button but with drag n drop feature.
For example: I have already web application for storing users data.
I would like to create button like “bookmark it” but not for storing locally. It should be stored on the server also like dropped files, because button should be also “dragndrop” space. I would say, that there should be something like “wrapper” comunicating with some url and on that url will be server script recoginising type of data.

case 1: user has opened tab with some website and when he will click on that button, add-on will save current url to his account in the web application.

case 2: user will drag the file(s) from the desktop for example and drop the file(s) to the button.

Sorry for my en grammar :wink: Thank you

I think I understand now. You want to understand what UI features do WebExtensions offer you for this button. So… unfortunately the browser_action (what bookmark-it has) does not offer this possibility.

The most similar thing to bookmark-it for you is a browser_action + a popup like https://github.com/mdn/webextensions-examples/tree/master/beastify

Your second option is a sidebar https://github.com/mdn/webextensions-examples/tree/master/theme-integrated-sidebar

Your third option is an button injected in the content page. This is kind of ugly :frowning: https://addons.mozilla.org/en-US/firefox/addon/download-manager-for-firefox/ and