Opening a bar on top of the page with firefox sdk - firefox

I am making a firefox pluggin and I want to open a "topbar" on a few websites. Realy, it would be a few informations about the curent page a link back to my own website. What would be te best way to do that ?
My first idea was to use content script, but that seems to be a very bad practice. I also read about panels, here are my questions :
How can I add my pannel just under the adressbar ?
How can I only open in it on the website I need ?
thx.

Using content script is completely fine.
It is modern, simple, less-code, more compatible way
to add top-panel to some web pages.
Also, code of content script is not injected to the web page, it just uses the dom and context; page script has no access (if you do not provide it explicit) to content script.
The only possible disadvantage is that panel would not look like native part of the browser.
If I convienced you to use content script:
The module you really need in your plugin page-mod
Using Add-on Builder you make have your plugin in a day

Related

loading simple iframe from extension firefox

I have created a webpage that runs a script that I would like to be able to open from a button on the Firefox taskbar like an extension. If this looks something like this addon layout wise that would be fine. I was hoping to open an iframe in which the page is loaded. Does an extension exist for this or is it possible to create this for personal use myself?
I'm completely new at building Firefox extensions.
Turned out to be pretty simple. You basically create a file like this and add it to the addons website which can be set to personal or public use. Done.

How is this interactive website made?

I am trying to make a website similar to this and I'd like to know how this website was made. The website is also run on desktop and has a mobile app too so there's no HTML or anything in the back end.
Any ideas?
You can use Wappalyzer to identify the technologies used for this Website.
https://www.wappalyzer.com/
Result for https://realtimeboard.com/signup/
as mentioned you can use https://www.wappalyzer.com/ or http://builtwith.com to know the technologies used, further more you can view the webpage source or use the inspect element tool to have a better idea of what is going on. and ofcourse there is HTML used in that page whether it was automatically generated or manually

How to display popup with html in firefox bootstrapped extensions?

I developed a firefox bootstrapped extension (without add-on sdk). I need to display a popup with html content, something like panel in add-on sdk. Also, it is necessary that the extension could interact with content in the popup. Also, I need a way to display html content in separate tab and interact with this content. So what can I use to implement what I need?
You can append an iframe to that panel, and then load a page into that iframe. That's what I did in this simple addon here - https://github.com/Noitidart/AwesomeBar-Power-Tip/
Here's another gist that does something similar - https://gist.github.com/Noitidart/9445992
I think this is how the SDK does it as well.
but I can not understand how it is possible to implement the interaction between expansion and content inside the panel.
The panel or its frameLoader property should have a messageManager, which can be used to load frame scripts and pass messages to them.

how to show a preference page using mozilla Add-on SDK?

I am developing an extension using the Addon-SDK. I want to show a preference page in order to get some users' configuration.
simple-prefs is too simple to use as its supported data type is so limited.
In a XUL app, I can use the following
<em:optionsType>3</em:optionsType>
<em:optionsURL>chrome://myaddon/content/options.html</em:optionsURL>
to set my preference page.
I found
the XUL migration guide
which says:
This is provided only as a migration aid, and it's still a good idea to port XUL windows to HTML.
How then can I make an HTML preference page ?
Many thanks!
I solved it in the following way:
Use simple-prefs with the preference type set to control. On its click event, open a page using the tab module, then use simple-storage to store data.
That's it!

Functionality like "about:whatever" to display arbitrary data in Firefox

I'm writing a Greasemonkey script that has a fair few user settings (just using GM_getValue and GM_setValue).
What I'd like to be able to do is create a settings page for the script, and add that to the #include-d sites. So, for example, it'd run on:
#include http://www.greasemonkeyedsite.com/*
#include about:myScriptConfig
Then the script would check the URL of the site it's being called for. If it's the about: one it'd create and display a settings page, otherwise it'd just run the script as usual.
I came up with this under the impression that you could type about:(anything) and it'd show up fine, with just the text following the about: as the page content. I remember this working last time I checked it, but that was years ago.
Seems to be that you can't just display arbitrary data by use of about:x any more, though. Firefox just displays a "The URL is not valid and cannot be loaded" error.
I know about the data: URI protocol, but it's not suitable as entering it manually into the address bar doesn't lead to its own page.
Is there some equivalent behaviour? Or am I going to have to just have a "settings" button on the top corner of greasemonkeyedsite.com that hides and shows a settings div?
If you have a permanent web site, you could make a URL there that becomes the Greasemonkey script's settings page. That could even be a convenient URL that allows the user to download the script if he does not already have it installed, and you can, that way, also offer the user a software update when a new version of your script is released. (Just have the Greasemonkey script check some "current version" part of the settings page.)
As mentioned by jnpcl, it is possible to create a chrome:// URI within the browser, but as I understand it, that requires a full-fledged Firefox add-on rather than just a Greasemonkey script.
You could use a designated URL on the affected site if you do not have a permanent web site, like http://www.greasemonekyedsite.com/myGreasemonkeySettingsPage. Your script could then strip out the parts of their 404 page it does not need, and then it could insert its list of settings within.

Resources