Adding a toolbar button to a Thundebird Compose Message window - thunderbird-addon

Anyone had any luck adding a custom toolbar button to the Compose window of Thunderbird or know of an example plugin that does it? I'm new to Thunderbird development and haven't had any luck getting https://developer.mozilla.org/en/Custom_Toolbar_Button to work for the Compose window.

What Mr. Jonathan pointed out is a good tip, and that particular extension does have an example of what you are looking for.
Open up your own chrome manifest file and make sure your code is telling Thunderbird which of your own xul files to "align" with its own xul files. In these examples, we will assume that your xul file is named overlay.xul and it has the code for both the button in the toolbar, as well as anything you want to do in the message-compose window.
If you find that your button won't show in the "customize toolbar" dialogue, it is because the xul is mismatched in your chrome manifest.
Make sure this in your chrome.manifest:
#THIS will use your xul file for the message-composing window
overlay chrome://messenger/content/messengercompose/messengercompose.xul chrome://youraddon/content/overlay.xul
#If you want a button, too, make sure this is in your file, too.
overlay chrome://global/content/customizeToolbar.xul chrome://youraddon/content/overlay.xul

You should look at the code of addons that perform (succesfully) a similar task, e.g. https://addons.mozilla.org/en-US/thunderbird/addon/latex-it/. In particular, look at the chrome.manifest file and the overlay.css and overlay.xul files.
Please keep in mind that the toolbar button will not appear by default, you'll first have to right-click on the toolbar then hit "customize".

Related

How can I make SASS editing work in Chrome Devtools?

I just follow this tutplus tutorial for source map sass.
I cannot find Support for sass option in Experiment tab under the inspect element in chrome. Is it removed? Am I late to use this feature ?
My sass version is 3.3.8 (Maptastic Maple)
How can I make SASS editing work in Chrome Devtools?
I made it work. SASS support is no longer an experiment: It's now a standard.
I just follow simple steps to make it work.
1) Open your inspect element on chrome and click on gear icon which appears to the top right.
2) Enable the CSS source maps (which is I think its enabled by default. If not just check it. After enable the css source map don't close it.)
3) Click on Workspace tab on the left panel just below the General tab.
4) Add your source code folder by clicking the Add folder button (close the box.)
5) Go on Sources tab and find your scss file.
Now you can make changes and hit ctrl+s it will automatically change on your style.scss.
As of Chrome 75, here's how you turn on CSS source maps.
Open the browser's Developer Tools (Ctrl+Shift+I).
Open the dropdown menu in the top right corner, and click on "Settings."
Look for the checkbox that reads "Enable CSS source maps" and turn it on.
Just my 2 cents here. Kaspersky Chome extension was blocking my CSS mapping on Chrome Developer Tools. Didn't find anywhere how to add an exception to that...

What is the name of the stock Firefox tool to display HTML code for the part of the page under the mouse?

Less than month ago, by accident I discovered a nice tool in Firefox that was installed by default. I don't remember the name (probably code inspector or something like that) but I used Ctrl+Shift+I (Tools -> Webdeveloper -> Name of tool) shortcut to run it.
What was the tool? The tool worked such that when you positioned the mouse over some place in the webpage, in the tool's window you would see the HTML code for that place. Now, I my system is updated, and this tool has disappeared from my browser. I'm very disappointed. Anyone know what tool I'm looking for?
Thanks in advance,
Kuba
By the sound of what you are describing it was probably the Web Developer addon, might also have been Firebug (which in my opinion is better).
You can try right clicking on the page element and select "Inspect Element" which will enable element inspection. This will enable you to view the HTML contents of the elements under your mouse.
The name of this tool is: Page Inspector
https://developer.mozilla.org/en-US/docs/Tools/Page_Inspector

How can I create a page like Add-ons Manager with urlbar and toolbar hidden at Firefox 4 extension?

When browsing the Add-ons Manager, about:addons, in Firefox 4, the toolbars and urlbar are hidden when "Tabs on Top" has been set.
As I am writing an extension in bootstrapped method, how can I simulate that feature in my own created page?
It has already linked to a page on resource scheme (resource://app/page.html)
I am wonder if there are some "hidden" attributes that can easily do such kind of things.
Or, whether it must hide and show the urlbar and toolbars in listener of window-mediator.
Solutions in XUL method are also welcome :) , but it'd be better if it can easily handle in bootstrap.js. ;-)
Thank you for your help.
It looks like Firefox maintains a whitelist of URL locations that should hide the locationbar chrome. The whitelist is checked here:
http://mxr.mozilla.org/mozilla-central/source/browser/base/content/browser.js#4412
So, setting the "disablechrome" attribute on the window element should make the locationbar chrome go away. Removing the attribute will make the locationbar chrome come back.
Adding your location the the whitelist would probably be the easiest way to make this work:
http://mxr.mozilla.org/mozilla-central/source/browser/base/content/browser.js#4086
From your bootstrap.js code, once you get a window, try this:
if (window.XULBrowserWindow)
window.XULBrowserWindow.inContentWhitelist.push("my-url");

Ckeditor: Using Firefox built in spellchecker

I feel a little caught between a rock and a hard place here. I want to use Firefox's built in spell checking without disabling Ckeditor's context menu as this renders it impossible to work with tables. Is there a way of getting the best of both worlds here?
You could try setting the disableNativeSpellChecker property to false - it should then be possible to see the native spell checker markings within the editor - however for me I couldn't get this to work in Firefox, only Google chrome.
You can then hold the ctrl key down when you right click to show the browser context menu (provided browserContextMenuOnCtrl has not been set to false)
HTH.
Use the browser's default contextmenu for right click action, then you don't need to press Ctrl to shoe the browser's default context menu.
config.removePlugins = 'scayt,menubutton,contextmenu';
Enable the built-in spell checker if the browser provides one.
config.disableNativeSpellChecker = false;
hi there you can disable it by going to
Ckeditor>File Editor.then make sure you're editing the ckeditor.config.js file!
then add the two lines at the bottom (after the }; tag) add the two lines like below!...
**> CKEDITOR.config.disableNativeSpellChecker = false;
CKEDITOR.config.browserContextMenuOnCtrl = true;**
then save it..........
when writing in ckeditor a red dot underline will appear if your spell is incorrect!
when you right click the ckeditor's context menu appear.....but when you Ctrl+Right Click the browsers default menu appears....thanks..........
Use this plugin: http://martinezdelizarrondo.com/spellcheck/ and as it's stated, you have to install the WriteArea extension in Firefox.
Have you tried to enable SCAYT (SpellCheckAsYouType) in CKeditor? It is buit-in there and works as a plug-in.

Developing a Firefox addon that turns a file's URI into its filename when saving it

I've read some documentation and tutorials about developing Firefox Addons.
But never found how to do this.
I would like to make an addon that when you try to save a file (via left-click or right-click/save as) it automatically sets the to-be-created-file's name to be the same as the original file's URI. (but with some changes, like making slashes into hyphens, etc.)
Any hints on how to do this?
Thanks!
I don't believe Firefox Add-ons can change the default "save as" behavior. They could however add another option in the context menu (right click) perhaps named "save as file named with uri". You'd want to learn some JavaScript and such and look at a demo Add-on for the context menu.
Okay, so I looked at a starting point, which took me to these:
A pretty complete get up an developing guide from Mozilla. (No context menu stuff)
A XUL reference. It mentions there is a way to configure the context menu.
Some code snippets for various Mozilla developing.
A very comprehensive hello-world. Similar to #1, but it DOES cover adding actions in the context menu.
I think you can override any behaviour in Firefox - finding out the correct XPCOM call and location in the DOM tree is another matter. Have a look at Extending Firefox and Thunderbird

Resources