After adding some in-line options as described in https://developer.mozilla.org/en-US/Add-ons/Inline_Options I'm curious if there is a way to hide only one such option from the addon preferences. I'd like to manage the preference contents through other chrome.
Ideally I'd like to keep the other preferences as they are without resorting to a custom preferences window.
Yes you set or remove the hidden attribute on the setting tag.
See here for examples of how to play with inline options dom on run time:
https://github.com/Noitidart/WorkspaceHopper/blob/92a3e494cebb72518736e93ab0a20c2fdeb76df7/resources/workspacehopper/lib/main.js#L42
https://github.com/Noitidart/Throbber-Restored/blob/442c8642a5ba9281357ec34ed687c616bf942d1e/bootstrap.js#L97
Related
Why am I seeing these characters instead of text in Firefox ?
It's a public site https://www.ratemds.com/
The reason why there those icons are not displayed is related to the FontAwesome that is used in CSS.
Firefox don't allow use of cross domain fonts.
Solution: change the location (hosting) for those external fonts.
It's possible your firefox isn't set up to let sites use their own custom fonts.
This can become more and more prevalent these days with sites using many custom fonts for button icons. (See: "font awesome", or "bootstrap glyphicons")
You can try opening a blank firefox -> Settings -> Content -> "Fonts & Colors" -> Advanced -> Then look for the checkbox that reads "Allow pages to choose their own fonts, instead of my selections above."
Once you've check that box, Firefox will allow the sites you visit to use their own custom fonts. This should fix your issue, if it does not I did some additional research and was able to find a configuration setting that also causes this which I'll demonstrate as "Advanded Solution" below.
ADVANCED SOLUTION:
In the firefox address bar type "about:config" without the quotes
Select the button promising to be careful (and truly please do)
In the search type in "gfx" without the quotes
Find the item "gfx.downloadable_fonts.enabled" without the quotes
If the status is set to "user set" and the value is "false" then follow step 6
Right click the line item, and select "toggle" from the drop down options
If the first fix didn't work, the second fix should work. Hope it helps!
I am developing a Firefox extension and want to open a custom html page where the user can adjust the settings. I am able to do it in different ways, but would like to use the standard Options button that is shown in the add-on manager of Firefox.
I have seen some documentation about it, but I am having problems on finding proper documentation for this function using the online Add-on Builder:
Preferences system,
Inline options,
Simple prefs.
Does anybody know how to just add that standard Options button that is shown in the add-on manager and handle its click event to show a custom options page? (just like it's possible in Google Chrome)
Builder projects have an 'Properties' dialog that has a field you can paste the extra JSON in that you need to create preferences:
https://www.evernote.com/shard/s1/sh/cdb97850-935d-4cf1-95f1-a25c130d1498/4b0b2553f3aa85e4d6489c1d50492c97
( fixed the link, sorry )
Here's an example in builder that implements all the different types, and contains documentation as well:
https://builder.addons.mozilla.org/package/60337/latest/
You'll notice that one of the type of prefs you can define is a 'control' pref, essentially a button that emits a custom event you can listen of and react to from main.js. You could then open a new tab or addon-page with additional preferences?
https://addons.mozilla.org/en-US/developers/docs/sdk/latest/packages/addon-kit/simple-prefs.html#prefs
I would like to allow one website to use the window.resizeTo(); function but disallow all the other websites from doing that... I wonder if there is any way to do that even if its difficult.
even if its not in the firefox original settings maybe there is an addon that will allow for it??
You can create a file called user.js in your profile directory. Most Firefox preferences are kept in a file called prefs.js - but the browser can write to this file, and often overwrite any changes.
If user.js can accept if-else logic and access the current URL, you could very easily establish logic to turn preferences on and off depending upon the URL.
I found this information here.
Update
As far as I can see, user.js is only read when the browser loads - so the method described above won't work :( The best way to achieve required functionality would be to use/write/invent a Firefox addon.
It doesn't appear that the about:config preferences are that granular. You can either set a preference value to true for the entire browser, or false for the entire browser. But you cannot define case-by-case values.
Source: http://kb.mozillazine.org/Firefox...config_Entries#DOM.
This limitation is illustrated through the options of the browser as well (all or none):
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");
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.