when I'm writing extension for Google Chrome, I only create "manifest.json" file and JS file, which is my script. after installing , I can change anything in the code, I only refresh browser and I had changed version of extension.
1) Can I change some code after installing Firefox extension? Or should I reinstall it? Or should I need to reload it again - and how if its possible?
2) should I create install.rdf, chrome.manifest, *.xul files and so in by hand (whick folder structure and so on)? Or is there another simplest way to do this?
3) I don't understand, should i create extensions by "Add-on SDK" or write by hand with notepad? what is difference of them?
4) I'm writing simplest script, which invoke alert('hello world') when i open any page by browser. what is the best and fastest way to do this?
thanks a lot;
1) Can I change some code after installing Firefox extension? Or should I reinstall it? Or should I need to reload it again - and how if its possible?
Live updates are possible using <em:bootstrap>true</em:bootstrap> and bootstrap functions
2) should I create install.rdf, chrome.manifest, *.xul files and so in by hand (whick folder structure and so on)? Or is there another simplest way to do this?
Neither; modify an existing simple extension
3) I don't understand, should i create extensions by "Add-on SDK" or write by hand with notepad? what is difference of them?
Add-on SDK is an sdk; by hand is xul; depends on you
4) I'm writing simplest script, which invoke alert('hello world') when i open any page by browser. what is the best and fastest way to do this?
hello_world.xpi (chrome / content / hello.xul):
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
<window xmlns:html="http://www.w3.org/1999/xhtml"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<caption label="Hello World"/>
</window>
In addition, extension development tools should help.
References
Explore multithreaded programming in XUL
Related
I am trying to build my own version of Firefox with slight UI changes and by adding some addons(extensions) to the build.
I have downloaded the source code from repo. Where would I start to achieve this?
Which all codes hold the UI structuring? Where do I put my addon xpi files?
PS: I tried to read the Mozilla documentation. Its either kinda outdated or I am not really getting it? A detailed insight would be much appreciated.
Addons
To do this, simply place the extensions in the distribution/extensions
directory in the application's distribution directory.
Here are the extension
https://dxr.mozilla.org/aviary101branch/source/browser/extensions
Flags In firefox
https://dxr.mozilla.org/aviary101branch/source/browser/config/mozconfig
Do more with themes
https://dxr.mozilla.org/aviary101branch/source/themes/modern
https://dxr.mozilla.org/aviary101branch/source/browser/themes
For Editing you may need XUL
https://www.xul.fr/tutorial/
Components
Go here and customize every component you need
https://dxr.mozilla.org/aviary101branch/source/browser/components
I have created a Firefox Add-on using jpm and I have added a number of localization files such as:
locale/da.properties
locale/en-GB.properties
locale/en-US.properties
locale/fi.properties
And so on...
In my HTML files I use attributes to set these values, for example: data-l10n-id="ext_panel_heading_text".
I know the translations are working, because changes I make to values in en-GB.properties are reflected in my add-ons HTML page.
I've tried navigating to Options > Content > Choose... (under languages), removing English and adding another language (such as Finnish), however it doesn't seem to have an affect on the .properties file loaded by my extension. I also tried restarting Firefox after changing the language.
My question is: How do I test the different languages?
The language of Firefox is dependent on the activated language pack, or for Windows and Mac I believe it is hard coded into the build.
Language packs are available from https://addons.mozilla.org/en-US/firefox/language-tools/
The only way I know is to change general.useragent.locale to the locale you want to use (en-GB, da, en-US, fi) in about:configand then restarting your browser: that way your add-on should show localized texts.
As an alternative, you can use Quick Locale Switcher, which does the same but it's a little more friendly.
I have both dreamweaver CS5.5 and Visual Studio Ultimate 2010. Both programs I love, but I really want a way to complete all of my front end coding in Dreamweaver, and then work with the database in VS.Net.
I have been completing this by making all of the pages in VS.Net, and then clicking 'open with' Dreamweaver afterwards. Although each time I open the .master file with Dreamweaver it collapses into blank coding, propbably because it doesn't recognise it. I have researched this before,and tried to solve the problem by adding content to the documentType folder but nothing has happened. I really need some support in Dreamweaver because I am alsways changing the design of my pages, and each page uses a materpage file.
The other problem is the masterpage uses .swf files and javascript alot, which is a pain to use in VS.Net, as the code hinting doesn't work properly.
Does anyone have a solution to this problem?
I havent tested it yet, but take a look at this: http://alexle.net/archives/119
Go to **[Your_Drive_Here]:\Program Files\Macromedia\Dreamweaver MX 2004\Configuration**
Open the file Extensions.txt and add your custom extensions to the list.
...
Go to the DocumentTypes folder (still in the same path), edit the file MMDocumentTypes.xml\ (fullpath: [Your_Drive_Here]:\Program Files\Macromedia\Dreamweaver MX 2004\Configuration**DocumentTypes\MMDocumentTypes.xml**) with a Text Editor (i.e. Notepad or Notepad++). It’s not advisible to edit this particular xml file with Dreamweaver as the software may go crazy as it’s being used to edit itself.
Go to l*ine 67*, add the THTML extesion to the winfileextension and macfileextensionlist attributes. Here is the code exerpt
This instructions are for Dreamweaver MX 2004, but may work changing Macromedia\Dreamweaver MX 2004 for Adobe\Adobe Dreamweaver CS5.5 (I don't have CS5.5, but assuming this had not changed until CS4 (my version), it will be there.
I see this one time, and know that it not so hard, but can't find any solutions in internet.
Let say I have plugin, as you know it written by XUL. XUL like HTML has tags, js and etc. So I want to debug it with Firebug.
But in default plugin view firebug (as all other plugins disabled). So i need to open my plugin like Web page.
I remember that it's something like
chrome://address/to/my/plugin/page.xul
Does anyone face this problem?
There is no general rule by which you can build the addresses of extension pages. You have to open the extension's XPI file (it's a regular ZIP file, rename it if necessary) and have a look at chrome.manifest inside. E.g. in Firebug's chrome.manifest it says:
content firebug content/firebug/
Which means that the files in the content/firebug/ directory of the extension are accessible under chrome://firebug/content/. You can try opening them as web pages but they won't necessarily work.
A better approach would be using tools that are actually meant for extensions. For example Chromebug or DOM Inspector.
Do Chrome or Firefox make your extension's source code open to the host machine? And if yes where are the respective folder on Mac?
Yes, assuming some or all of your extension is written in an interpreted and un-obfuscated language. Plain Javascript is common for extensions in both browsers.
For any firefox extension, if you save the .xpi file instead of installing it, it is just a zip file and you can open it with any archive tool (e.g. 7zip or WinZip).
The same goes for the .crx files Chrome. As an test, I just downloaded and opened the .crx for Google Mail Checker Plus using 7zip, and it looks like this is entirely written in javascript and all the source can be read.
In either case, how much usable source code you can get from this depends on the language(s) that are used in the extension.
Google Chrome installs the extension into ~/Library/Application Support/Google/Chrome/Default/Extensions/<EXTENSION_ID>/ and registers it in its Preferences file (according to this).
As heb says, Firefox installs the extension to ~/Library/Application Support/Firefox/Profiles/PROFILE_ID/extensions/EXTENSION_ID/
For Firefox the path is:
/Users/YOUR_LOGIN/Library/Application Support/Firefox/Profiles/PROFILE_ID/extensions/EXTENSION_ID/
view online
View a Chrome/Firefox/Opera extension/addon’s source in browser (without downloading):
https://robwu.nl/crxviewer/
bookmarklets
bookmarklets usage
Click the bookmarklet when on an extension’s page in the Chrome Web Store, Firefox addon gallery or Opera addon gallery.
bookmarklets source code
load in same tab
javascript:location.href='https://robwu.nl/crxviewer/?crx='+location.href;
open in new tab
javascript:window.open('https://robwu.nl/crxviewer/?crx='+location.href,'_blank');
bookmarklets links
view extension source online (Chrome .crx) # https://robwu.nl/crxviewer/?crx= ← You can drag this link to your bookmark bar to create the bookmarklet, but you have to edit its URL afterwards: Delete everything before javascript, including the single slash: http://delete_me/
view extension source online in new tab (Chrome .crx) # https://robwu.nl/crxviewer/?crx=
I know it's an old topic but for future research.. it could be interesting..so following the link :
How to find extension code?
This article explains very well where are located extensions code for Firefox, Chrome (working on Chromium too of course) on Ubuntu and Windows!
Best,