[Pkg-mozext-commits] [automatic-save-folder] 02/133: Automatic Save Folder Version 0.9.3
David Prévot
taffit at moszumanska.debian.org
Mon Apr 27 20:33:47 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch wip
in repository automatic-save-folder.
commit b59905ad5c7208e3b1c7179d8e3c404fa87bf5df
Author: Cyan <Cyan at d0063192-6b2e-11de-89a9-0b20f3e2dceb>
Date: Tue Jul 7 21:56:53 2009 +0000
Automatic Save Folder Version 0.9.3
git-svn-id: http://automatic-save-folder.googlecode.com/svn/trunk@2 d0063192-6b2e-11de-89a9-0b20f3e2dceb
---
GPL | 339 ++++++++++++++++
LICENSE | 32 ++
chrome.manifest | 7 +
content/about.xul | 45 +++
content/add.xul | 72 ++++
content/asf.js | 509 ++++++++++++++++++++++++
content/asf_addedit.js | 505 ++++++++++++++++++++++++
content/asf_download.js | 679 +++++++++++++++++++++++++++++++++
content/edit.xul | 73 ++++
content/options.xul | 133 +++++++
content/overlay_preferences.xul | 18 +
content/overlay_unknownContentType.xul | 41 ++
content/regexp.xul | 25 ++
defaults/preferences/asf.js | 16 +
install.rdf | 56 +++
locale/en-US/about.dtd | 8 +
locale/en-US/asf.dtd | 81 ++++
locale/en-US/asf.properties | 1 +
locale/en-US/info.html | 300 +++++++++++++++
locale/en-US/regexp.html | 144 +++++++
locale/en-US/variables.html | 82 ++++
locale/fr-FR/about.dtd | 8 +
locale/fr-FR/asf.dtd | 81 ++++
locale/fr-FR/asf.properties | 1 +
locale/fr-FR/info.html | 300 +++++++++++++++
locale/fr-FR/regexp.html | 172 +++++++++
locale/fr-FR/variables.html | 82 ++++
locale/it-IT/about.dtd | 8 +
locale/it-IT/asf.dtd | 81 ++++
locale/it-IT/asf.properties | 1 +
locale/it-IT/info.html | 300 +++++++++++++++
locale/it-IT/regexp.html | 128 +++++++
locale/it-IT/variables.html | 75 ++++
skin/add.png | Bin 0 -> 259 bytes
skin/asf-icon.png | Bin 0 -> 1686 bytes
skin/delete.png | Bin 0 -> 234 bytes
skin/delete_disabled.png | Bin 0 -> 236 bytes
skin/down.png | Bin 0 -> 274 bytes
skin/down_disabled.png | Bin 0 -> 280 bytes
skin/off.png | Bin 0 -> 283 bytes
skin/on.png | Bin 0 -> 309 bytes
skin/screen_apps_fr.png | Bin 0 -> 35697 bytes
skin/screen_save_50fr.png | Bin 0 -> 23761 bytes
skin/screen_save_80fr.png | Bin 0 -> 44580 bytes
skin/screen_save_fr.png | Bin 0 -> 15665 bytes
skin/style.css | 16 +
skin/up.png | Bin 0 -> 264 bytes
skin/up_disabled.png | Bin 0 -> 269 bytes
48 files changed, 4419 insertions(+)
diff --git a/GPL b/GPL
new file mode 100644
index 0000000..d511905
--- /dev/null
+++ b/GPL
@@ -0,0 +1,339 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Lesser General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..fa7a0c6
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,32 @@
+Automatic Save Folder
+http://asf.mangaheart.org
+Copyright (C) 2007-2009 Eric Cassar (cyan at mangaheart.org)
+Contributor(s): 2009 Ted Gifford
+
+
+ "Automatic Save Folder" is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 2 of the License, or
+ (at your option) any later version.
+
+ "Automatic Save Folder" is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with "Automatic Save Folder". If not, see <http://www.gnu.org/licenses/>.
+
+ This applies to all source code files.
+
+
+
+
+"Automatic Save Folder" contains pieces of code taken or inspired from:
+
+- Folder pickup:
+DownThemAll! Copyright (C) 2007-2008 Federico Parodi, Stefano Verna and Nils Maier.
+
+- Moving filters:
+http://captain.at
+
diff --git a/chrome.manifest b/chrome.manifest
new file mode 100644
index 0000000..ba7c2fd
--- /dev/null
+++ b/chrome.manifest
@@ -0,0 +1,7 @@
+content asf content/
+locale asf en-US locale/en-US/
+locale asf fr-FR locale/fr-FR/
+locale asf it-IT locale/it-IT/
+skin asf classic/1.0 skin/
+overlay chrome://browser/content/browser.xul chrome://asf/content/overlay_preferences.xul
+overlay chrome://mozapps/content/downloads/unknownContentType.xul chrome://asf/content/overlay_unknownContentType.xul
\ No newline at end of file
diff --git a/content/about.xul b/content/about.xul
new file mode 100644
index 0000000..e476a42
--- /dev/null
+++ b/content/about.xul
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- ***** BEGIN LICENSE BLOCK *****
+ Copyright 2007-2009 Eric Cassar (Cyan)
+
+ This file is part of "Automatic Save Folder".
+ You may find the license in the LICENSE file
+
+ ***** END LICENSE BLOCK ***** -->
+<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
+<!DOCTYPE dialog SYSTEM "chrome://asf/locale/about.dtd">
+<dialog title="&about;"
+ orient="vertical"
+ autostretch="always"
+ onload="sizeToContent()"
+ buttons="accept"
+ xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+<script type="application/javascript" src="chrome://global/content/contentAreaUtils.js"/>
+<groupbox align="center" orient="horizontal">
+ <vbox>
+ <hbox flex="1">
+ <image src="chrome://asf/skin/asf-icon.png"/>
+ <text value="Automatic save folder" style="font-weight: bold; font-size: x-large;"/>
+ </hbox>
+ <text value="&version;"/>
+
+ <separator/>
+ <vbox flex="1">
+ <text value="&createdBy;" style="font-weight: bold;"/>
+ <text value="&createdBy.name;"/>
+ </vbox>
+ <separator/>
+ <vbox flex="1">
+ <text value="&contributor;" style="font-weight: bold;"/>
+ <text value="&contributor.name;"/>
+ <text value="&contributor2.name;"/>
+ </vbox>
+
+ <separator/>
+ <text value="&homepage;" style="font-weight: bold;"/>
+ <text value="Automatic Save Folder" class="text-link" onclick="window.close(); openURL('http://asf.mangaheart.org');"/>
+ <text value="http://mozilla.org" class="text-link" onclick="window.close(); openURL('https://addons.mozilla.org/fr/firefox/addon/4781');"/>
+ <separator class="thin"/>
+ </vbox>
+</groupbox>
+</dialog>
diff --git a/content/add.xul b/content/add.xul
new file mode 100644
index 0000000..fccfd5f
--- /dev/null
+++ b/content/add.xul
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- ***** BEGIN LICENSE BLOCK *****
+ Copyright 2007-2009 Eric Cassar (Cyan)
+
+ This file is part of "Automatic Save Folder".
+ You may find the license in the LICENSE file
+
+ ***** END LICENSE BLOCK ***** -->
+<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
+<!DOCTYPE dialog SYSTEM "chrome://asf/locale/asf.dtd">
+
+<dialog title="&asf.add.title;"
+ orient="vertical" autostretch="always"
+ onload="automatic_save_folder.add_load();"
+ buttons="extra1, extra2, cancel"
+ defaultButton="extra1"
+ buttonlabelextra1="&buttonlabelextra1;"
+ ondialogextra1="automatic_save_folder.asf_add()"
+ ondialogcancel="window.opener.focus;window.close();"
+ buttonlabelextra2="&asf.addedit.regexphelp.label;"
+ ondialogextra2="window.openDialog('chrome://asf/content/regexp.xul','asf_regexp_help','chrome, centerscreen, resizable=yes, dialog=no');"
+ xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+<script type="application/x-javascript" src="chrome://asf/content/asf_addedit.js"/>
+<groupbox align="center" orient="horizontal">
+ <caption label="&asf.addedit.filter.label;" />
+ <vbox>
+ <description value="&asf.addedit.domain.label;" />
+ <radiogroup id="radio-addedit-domain" align="left">
+ <radio id="asf-addedit-radio-domain-all" value="0" label="&asf.addedit.all;" oncommand="automatic_save_folder.asf_toggleradio_domain()"/>
+ <hbox>
+ <radio id="asf-addedit-radio-domain" value="1" label="=" oncommand="automatic_save_folder.asf_toggleradio_domain()"/>
+ <textbox id="asf-addedit-domain" width="200" onchange="automatic_save_folder.testRegexp('asf-addedit-domain-regexp', 'asf-addedit-domain');"/>
+ <checkbox id="asf-addedit-domain-regexp" label="&asf.addedit.regexp;" oncommand="automatic_save_folder.makeRegexp('asf-addedit-domain-regexp', 'asf-addedit-domain');"/>
+ </hbox>
+ </radiogroup>
+ <separator class="thin"/>
+
+ <description value="&asf.addedit.filename.label;"/>
+ <radiogroup id="radio-addedit-filename" align="left">
+ <radio id="asf-addedit-radio-filename-all" value="0" label="&asf.addedit.all;" oncommand="automatic_save_folder.asf_toggleradio_filename()"/>
+ <hbox>
+ <radio id="asf-addedit-radio-filename" value="1" label="=" oncommand="automatic_save_folder.asf_toggleradio_filename()"/>
+ <textbox id="asf-addedit-filename" width="200" onchange="automatic_save_folder.testRegexp('asf-addedit-filename-regexp', 'asf-addedit-filename')"/>
+ <checkbox id="asf-addedit-filename-regexp" label="&asf.addedit.regexp;" oncommand="automatic_save_folder.makeRegexp('asf-addedit-filename-regexp', 'asf-addedit-filename');"/>
+ </hbox>
+ </radiogroup>
+ <separator class="thin"/>
+
+ <description value="&asf.addedit.folder.label;"/>
+ <hbox>
+ <textbox id="asf-addedit-folder" readonly="true" width="240" ondblclick="automatic_save_folder.browsedir_addedit()"/>
+ <button id="asf-addedit-select-folder" label="&asf.selectfolder.label;" oncommand="automatic_save_folder.browsedir_addedit()"/>
+ </hbox>
+
+ </vbox>
+</groupbox>
+
+<groupbox align="center" orient="horizontal">
+ <caption label="&asf.addedit.help.label;"/>
+ <vbox>
+ <description value="&asf.addedit.inforegexp1;"/>
+ <description value="&asf.addedit.inforegexp2;"/>
+ <description value="&asf.addedit.inforegexp3;"/>
+ <description value="&asf.addedit.inforegexp4;"/>
+ </vbox>
+</groupbox>
+
+<description id="popup-nodata-domain" style="display:none" value="&asf.addedit.nodata.domain;"/>
+<description id="popup-nodata-filename" style="display:none" value="&asf.addedit.nodata.filename;"/>
+<description id="popup-nodata-folder" style="display:none" value="&asf.addedit.nodata.folder;"/>
+
+</dialog>
\ No newline at end of file
diff --git a/content/asf.js b/content/asf.js
new file mode 100644
index 0000000..4b8aad9
--- /dev/null
+++ b/content/asf.js
@@ -0,0 +1,509 @@
+/* ***** BEGIN LICENSE BLOCK *****
+Automatic Save Folder
+Copyright (C) 2007-2009 Eric Cassar (Cyan).
+
+ "Automatic Save Folder" is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 2 of the License, or
+ (at your option) any later version.
+
+ "Automatic Save Folder" is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with "Automatic Save Folder". If not, see <http://www.gnu.org/licenses/>.
+
+ * ***** END LICENSE BLOCK ***** */
+var automatic_save_folder = {
+ prefManager: Components.classes["@mozilla.org/preferences-service;1"]
+ .getService(Components.interfaces.nsIPrefBranch),
+
+ appInfo: Components.classes["@mozilla.org/xre/app-info;1"]
+ .getService(Components.interfaces.nsIXULAppInfo),
+
+ versionChecker: Components.classes["@mozilla.org/xpcom/version-comparator;1"]
+ .getService(Components.interfaces.nsIVersionComparator),
+
+
+ asf_load: function () {
+
+ var firefoxversion = "";
+ if(this.versionChecker.compare(this.appInfo.version, "3.0") >= 0)
+ {
+ firefoxversion = "3";
+ }
+ else
+ {
+ firefoxversion = "2";
+ }
+
+
+ // init the preference for firefox 3
+ if (firefoxversion == "3")
+ {
+ // set lastdir to "enable" if the user just updated from previous version and had it disabled
+ var lastdir = document.getElementById("asf-lasdir");
+ lastdir.checked = true;
+ lastdir.hidden = true; // hidden on FF3, as lastdir must always be true, don't allow the user to disable it.
+ this.prefManager.setBoolPref("extensions.asf.lastdir", true);
+
+ // set the browser.download.folderList to 2, needed for vista users to enable ASF to change the saving folder when FF download option is set to "Save the file in the folder ...".
+ // 0 = desktop ; 1 = system donwload directory ; 2 = user defined
+ this.prefManager.setIntPref("browser.download.folderList", "2");
+ }
+
+
+ this.asf_loadpref(); // Load the preferences and the filter's array content
+ this.asf_treeSelected(); // set the button to disabled state because no filter is selected when openning
+ this.asf_toggleradio(); // set the radio choice to the right place
+ this.asf_variablemode(); // check if variable mode is on or off, and change mode if needed
+ this.asf_getdomain(); // Run this to get the current domain and filename from the download window to pre-fill the fields in "add filter".
+
+
+ //Detect OS
+ // var OSName="Unknown OS";
+ // if (navigator.appVersion.indexOf("Win")!=-1) OSName="Windows";
+ // if (navigator.appVersion.indexOf("Mac")!=-1) OSName="MacOS";
+ // if (navigator.appVersion.indexOf("X11")!=-1) OSName="UNIX";
+ // if (navigator.appVersion.indexOf("Linux")!=-1) OSName="Linux";
+
+ // alert('Your OS: '+OSName);
+ // alert(navigator.appVersion.indexOf("Win"));
+
+ },
+
+
+ asf_loadpref: function () {
+ var nbrRow = this.prefManager.getIntPref("extensions.asf.filtersNumber", 0);
+
+ //load the default folder (I removed the preference in options.xul, unicode folder's name didn't saved at all with automatic preference management.
+ // Manual saving is working, but not saving in the right encoding type in prefs.js, so we need to use get/setComplexValue)
+ var default_folder = document.getElementById("asf-default-folder");
+ default_folder.value = this.loadUnicodeString("extensions.asf.defaultfolder");
+
+ for ( var i = 0 ; i < nbrRow ; i++)
+ {
+ var domain = this.loadUnicodeString("extensions.asf.filters"+ i +".domain");
+ var filename = this.loadUnicodeString("extensions.asf.filters"+ i +".filename");
+ var folder = this.loadUnicodeString("extensions.asf.filters"+ i +".folder");
+ var active = this.prefManager.getBoolPref("extensions.asf.filters"+ i +".active");
+
+ // adding into the tree
+ var filter = document.getElementById('asf-filterList');
+ var rules = document.getElementById('asf-filterChilds');
+ var item = document.createElement('treeitem');
+ var row = document.createElement('treerow');
+ var c1 = document.createElement('treecell');
+ var c2 = document.createElement('treecell');
+ var c3 = document.createElement('treecell');
+ var c4 = document.createElement('treecell');
+ c1.setAttribute('label', domain);
+ c2.setAttribute('label', filename);
+ c3.setAttribute('label', folder);
+ c4.setAttribute('value', active);
+ c1.setAttribute('editable', false);
+ c2.setAttribute('editable', false);
+ c3.setAttribute('editable', false);
+ row.appendChild(c1);
+ row.appendChild(c2);
+ row.appendChild(c3);
+ row.appendChild(c4);
+ item.appendChild(row);
+ rules.appendChild(item);
+
+ }
+ },
+
+
+ // Called whenever a list box is selected
+ asf_treeSelected: function () {
+ var deleteButton = document.getElementById("asf-delete");
+ var editButton = document.getElementById("asf-edit");
+ var listBox = document.getElementById("asf-filterList");
+ var listchilds = document.getElementById("asf-filterChilds");
+ var moveDownButton = document.getElementById("asf-move-down");
+ var moveUpButton = document.getElementById("asf-move-up");
+ var selectedIndex = listBox.currentIndex ; //number of the selected line in tree
+
+ var nbrRow = listBox.view.rowCount;
+
+
+ // If an item is selected
+ if(selectedIndex >= 0)
+ {
+ deleteButton.disabled = false;
+ deleteButton.image = "chrome://asf/skin/delete.png";
+ editButton.disabled = false;
+
+ // If this is the first item
+ if(selectedIndex == 0)
+ {
+ moveUpButton.disabled = true;
+ moveUpButton.image = "chrome://asf/skin/up_disabled.png";
+ }
+ else
+ {
+ moveUpButton.disabled = false;
+ moveUpButton.image = "chrome://asf/skin/up.png";
+ }
+
+ // If this is the last item
+ if(selectedIndex == nbrRow - 1)
+ {
+ moveDownButton.disabled = true;
+ moveDownButton.image = "chrome://asf/skin/down_disabled.png";
+ }
+ else
+ {
+ moveDownButton.disabled = false;
+ moveDownButton.image = "chrome://asf/skin/down.png";
+ }
+ }
+ else
+ {
+ editButton.disabled = true;
+ deleteButton.disabled = true;
+ deleteButton.image = "chrome://asf/skin/delete_disabled.png";
+ moveDownButton.disabled = true;
+ moveDownButton.image = "chrome://asf/skin/down_disabled.png";
+ moveUpButton.disabled = true;
+ moveUpButton.image = "chrome://asf/skin/up_disabled.png";
+ }
+ },
+
+
+ asf_toggleradio: function () {
+ var select_last_radio = document.getElementById("asf-last-radio");
+ var select_choose_radio = document.getElementById("asf-choose-radio");
+ var select_folder_input = document.getElementById("asf-default-folder");
+ var select_folder_btn = document.getElementById("asf-select-folder");
+ var select_keeptemp_chk = document.getElementById("asf-keeptemp-check");
+ var variable_mode = document.getElementById("asf-variablemode");
+
+ if(select_last_radio.selected == true)
+ {
+ select_folder_input.disabled = true;
+ select_folder_btn.disabled = true;
+ select_keeptemp_chk.disabled = true;
+ }
+
+ if(select_choose_radio.selected == true)
+ {
+ select_folder_input.disabled = false;
+ this.asf_variablemode();
+ select_folder_btn.disabled = false;
+ select_keeptemp_chk.disabled = false;
+ }
+ },
+
+
+ toggle_options: function () {
+ var select_option = document.getElementById("asf-viewdloption");
+ var select_list = document.getElementById("asf-viewpathselect");
+
+ if (select_option.checked == false)
+ {
+ select_list.checked = false;
+ select_list.disabled = true;
+ this.prefManager.setBoolPref("extensions.asf.viewpathselect",false)
+ }
+ if (select_option.checked == true)
+ {
+ select_list.disabled = false;
+ }
+
+ },
+
+ asf_selecttab: function(tabID) {
+
+ // Use this system for tab, because css for tab is not the same color as config window color, and I don't want to force any color by default so user can use new firefox theme's colors.
+ document.getElementById("asf-tab-filters").hidden = true;
+ document.getElementById("asf-tab-options").hidden = true;
+ document.getElementById("asf-tab-informations").hidden = true;
+
+
+ document.getElementById(tabID).hidden = false;
+ if(tabID == "asf-tab-options") this.toggle_options();
+ window.sizeToContent();
+ },
+
+
+ asf_variablemode: function() {
+ var select_variable_mode = document.getElementById("asf-variablemode");
+ var select_folder_input = document.getElementById("asf-default-folder");
+
+ if(select_variable_mode.checked == true)
+ {
+ select_folder_input.readOnly = false;
+ }
+ if(select_variable_mode.checked == false)
+ {
+ select_folder_input.readOnly = true;
+ }
+
+
+ },
+
+
+ asf_getdomain: function () { // Save the domain and filename in a hidden field, to be used by the "add" button for auto-complete field.
+ if (window.opener.location == "chrome://mozapps/content/downloads/unknownContentType.xul") // if the option is opened from the saving window
+ {
+ var currentdomain = window.opener.document.getElementById("source").value;
+ var currentfilename = window.opener.document.getElementById("location").value ;
+
+ var domain = document.getElementById("asf-current-domain");
+ var filename = document.getElementById("asf-current-filename");
+
+ domain.value = currentdomain ;
+ filename.value = currentfilename ;
+ }
+ },
+
+
+ // Code from captain.at, modified by Cyan (CASSAR Eric)
+ move: function (direction) {
+ var treename = "asf-filterList";
+
+ var tree = document.getElementById(treename);
+ var idx = tree.currentIndex;
+ if (idx == -1) return false;
+ var maxidx = this.prefManager.getIntPref("extensions.asf.filtersNumber");
+
+ var dir = 1;
+ if ((direction == "up") || (direction == "top"))
+ {
+ dir = -1;
+ }
+ var currentitem = tree.treeBoxObject.view.getItemAtIndex(idx);
+ var parent = currentitem.parentNode;
+ if ((direction == "up") || (direction == "down")) // read the next or previous entry only if function is called from the button clic (not from the popup choice)
+ {
+ var previousitem = tree.treeBoxObject.view.getItemAtIndex(idx + dir);
+ }
+
+
+ if (direction == "up")
+ {
+ parent.insertBefore(currentitem, previousitem);
+ tree.view.selection.select(idx-1); // reselect the last
+ }
+ else if (direction == "down")
+ {
+ parent.insertBefore(previousitem, currentitem);
+ }
+
+ if (direction == "top")
+ {
+ while (currentitem.previousSibling)
+ {
+ this.move("up");
+ }
+ }
+ else if (direction == "bottom")
+ {
+ while (currentitem.nextSibling)
+ {
+ this.move("down");
+ }
+ }
+
+
+ //needed for linux (and Mac ?): autosaved when moving filters
+ if (navigator.appVersion.indexOf("Win")!=-1) { } // = Windows
+ else
+ {
+ //save the filters
+ this.asf_savefilters();
+ }
+ return false;
+ },
+
+
+ asf_duplicate: function () {
+ var treename = "asf-filterList";
+
+ var tree = document.getElementById(treename);
+ var idx = tree.currentIndex;
+ if (idx == -1) return false;
+ var originidx = idx;
+ var currentitem = tree.treeBoxObject.view.getItemAtIndex(idx);
+ var parent = currentitem.parentNode;
+ {
+ parent.appendChild(currentitem.cloneNode(true))
+ }
+ //select the new filter
+ idx = parent.childNodes.length-1;
+ tree.view.selection.select(idx);
+ for (var i = idx ; i > originidx ; i--) // move the new copy 1 line above the original item
+ { // so the filter auto-saving process for linux (present in the move() function) works
+ this.move("up"); // even if the user duplicate the bottom filter, it will move from 1 step
+ }
+ return false;
+ },
+
+
+ asf_delete: function () {
+ var filter = document.getElementById('asf-filterList');
+ var rules = document.getElementById('asf-filterChilds');
+ if (filter.view.selection.count > 0)
+ {
+ for (var i=rules.childNodes.length-1 ; i>=0 ; i--)
+ {
+ if (filter.view.selection.isSelected(i))
+ rules.removeChild(rules.childNodes[i]);
+ }
+ }
+ //needed for linux (and Mac ?): autosaved when moving filters
+ if (navigator.appVersion.indexOf("Win")!=-1) { } // = Windows
+ else
+ {
+ //save the filters
+ this.asf_savefilters();
+ }
+
+ //detect remaining filters, unhighlight, and change right buttons states
+ this.asf_treeSelected();
+ },
+
+
+ // next 2 functions : Code inspired from DTA (browsedir & createValidDestination)
+ browsedir: function () {
+ var current_folder_input = document.getElementById("asf-default-folder").value;
+
+ const nsIFilePicker = Components.interfaces.nsIFilePicker;
+ var fp = Components.classes["@mozilla.org/filepicker;1"].createInstance(nsIFilePicker);
+
+ var filepickerdescription = document.getElementById("asf-pickup").value;
+ fp.init(window, filepickerdescription, nsIFilePicker.modeGetFolder);
+ //fp.appendFilters(nsIFilePicker.filterAll | nsIFilePicker.filterText);
+
+ // locate current directory
+ current_folder_input = this.createValidDestination(current_folder_input);
+ if (current_folder_input != false) fp.displayDirectory = current_folder_input;
+
+ var rv = fp.show();
+ if (rv == nsIFilePicker.returnOK)
+ {
+ var asf_url = fp.file.path;
+ // Set the data into the input box
+ document.getElementById("asf-default-folder").value = asf_url;
+ }
+
+ //needed for linux (and Mac ?): autosaved when changing folder
+ if (navigator.appVersion.indexOf("Win")!=-1) { } // = Windows, then do nothing
+ else
+ {
+ //save the default folder right after editing, no need to click the accept button.
+ var default_folder = document.getElementById("asf-default-folder").value;
+ this.saveUnicodeString("extensions.asf.defaultfolder", default_folder);
+ }
+ },
+
+
+ createValidDestination: function (path) {
+ if (!path) return false;
+ if (this.trim(path).length==0) return false;
+ var directory = Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);
+
+ try {
+ directory.initWithPath(path);
+ if (directory.exists())
+ return directory;
+ } catch(e) {return false;}
+ return directory;
+ },
+
+ // removed unicodepath, unicodestring is working fine.
+/*
+ loadUnicodeFolder: function (pref_place) {
+ return this.prefManager.getComplexValue(pref_place, Components.interfaces.nsILocalFile).path;
+ },
+
+ saveUnicodeFolder: function (pref_place,path) {
+ if (!path) return false;
+ if (this.trim(path).length==0) return false;
+ var directory = Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);
+ directory.initWithPath(path);
+ this.prefManager.setComplexValue(pref_place, Components.interfaces.nsILocalFile, directory);
+ },
+*/
+
+
+ loadUnicodeString: function (pref_place) {
+
+ return this.prefManager.getComplexValue(pref_place, Components.interfaces.nsISupportsString).data;
+ },
+
+
+ saveUnicodeString: function (pref_place,pref_data) {
+ if (this.trim(pref_data).length==0) return false;
+ var str = Components.classes["@mozilla.org/supports-string;1"]
+ .createInstance(Components.interfaces.nsISupportsString);
+ str.data = this.trim(pref_data);
+ this.prefManager.setComplexValue(pref_place, Components.interfaces.nsISupportsString, str);
+ return false ;
+ },
+
+
+ trim: function (string) {
+ return string.replace(/(^\s*)|(\s*$)/g,'');
+ },
+
+
+ asf_savefilters: function () {
+ //save the filters list
+ var tree = document.getElementById("asf-filterList");
+ var listBox = document.getElementById("asf-filterList");
+
+ this.asf_selecttab("asf-tab-filters"); // Go back to the Filters tabs in order to read and save the Tree data (it doesn't work it it's hidden)
+
+ var nbrRow = listBox.view.rowCount;
+
+ // set the number of filter in the tree
+ this.prefManager.setIntPref("extensions.asf.filtersNumber", nbrRow);
+
+
+ for (var i=0; i < nbrRow ; i++)
+ {
+ var domain = tree.view.getCellText(i,tree.columns.getColumnAt("0"));
+ var filename = tree.view.getCellText(i,tree.columns.getColumnAt("1"));
+ var folder = tree.view.getCellText(i,tree.columns.getColumnAt("2"));
+ var active = tree.view.getCellValue(i,tree.columns.getColumnAt("3"));
+ active = (active == "true" ? true : false) ;
+
+ this.saveUnicodeString("extensions.asf.filters"+ i +".domain", domain);
+ this.saveUnicodeString("extensions.asf.filters"+ i +".filename", filename);
+ this.saveUnicodeString("extensions.asf.filters"+ i +".folder", folder);
+ this.prefManager.setBoolPref("extensions.asf.filters"+ i +".active", active);
+
+ }
+ },
+
+
+ asf_savepref: function () {
+ //save the filters
+ this.asf_savefilters();
+
+ //save the default folder
+ var default_folder = document.getElementById("asf-default-folder").value;
+ this.saveUnicodeString("extensions.asf.defaultfolder", default_folder);
+
+ //rescan filters data to update the unknownContentType.xul if it was openned with it.
+ if (window.opener.location == "chrome://mozapps/content/downloads/unknownContentType.xul") // if the option is opened from the saving window
+ {
+ window.opener.automatic_save_folder.asf_setdir(); // rescan the filters to set the good folder
+ }
+
+ //close the options
+ window.close();
+ if (window.opener.location == "chrome://mozapps/content/downloads/unknownContentType.xul") // if the option is opened from the saving window
+ {
+ window.opener.sizeToContent();
+ }
+ window.opener.focus;
+
+ }
+
+};
\ No newline at end of file
diff --git a/content/asf_addedit.js b/content/asf_addedit.js
new file mode 100644
index 0000000..4188c75
--- /dev/null
+++ b/content/asf_addedit.js
@@ -0,0 +1,505 @@
+/* ***** BEGIN LICENSE BLOCK *****
+Automatic Save Folder
+Copyright (C) 2007-2009 Eric Cassar (Cyan).
+
+ "Automatic Save Folder" is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 2 of the License, or
+ (at your option) any later version.
+
+ "Automatic Save Folder" is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with "Automatic Save Folder". If not, see <http://www.gnu.org/licenses/>.
+
+ * ***** END LICENSE BLOCK ***** */
+ var automatic_save_folder = {
+ prefManager: Components.classes["@mozilla.org/preferences-service;1"]
+ .getService(Components.interfaces.nsIPrefBranch),
+
+
+ add_load: function () {
+
+ var currentdomain = window.opener.document.getElementById("asf-current-domain").value;
+ var currentfilename = window.opener.document.getElementById("asf-current-filename").value ;
+
+ var radio_domain_all = window.document.getElementById("asf-addedit-radio-domain-all");
+ var radio_domain_edited = window.document.getElementById("asf-addedit-radio-domain");
+ var radio_filename_all = window.document.getElementById("asf-addedit-radio-filename-all");
+ var radio_filename_edited = window.document.getElementById("asf-addedit-radio-filename");
+
+ // enable or disable the local saving path text input
+ var select_variable_mode = window.opener.document.getElementById("asf-variablemode");
+ var select_folder_input = document.getElementById("asf-addedit-folder");
+ if(select_variable_mode.checked == true)
+ {
+ select_folder_input.readOnly = false;
+ }
+ if(select_variable_mode.checked == false)
+ {
+ select_folder_input.readOnly = true;
+ }
+
+ // pre-filled data
+ if (currentdomain != "")
+ { // if opened from save window, domain and filename is autofilled, and radio need to be selected on 1 and value set to 1
+
+ radio_domain_edited.checked;
+ radio_filename_edited.checked;
+
+ //set radio button to state 1 (if the user never clic on a radio, the value is null, even if the radio is selected at the right position)
+ document.getElementById('radio-addedit-domain').value = 1 ;
+ document.getElementById('radio-addedit-filename').value = 1 ;
+
+ // set the data into the fields
+ var domain = document.getElementById("asf-addedit-domain");
+ var filename = document.getElementById("asf-addedit-filename");
+
+ domain.value = currentdomain ;
+ filename.value = currentfilename ;
+
+ } // else, nothing to fill, radio button set to 0
+ else
+ {
+ radio_domain_all.checked;
+ radio_filename_all.checked;
+
+ //set radio button to state 0 (if the user never clic on a radio, the value is null, even if the radio is not checked)
+ document.getElementById('radio-addedit-domain').value = 0 ;
+ document.getElementById('radio-addedit-filename').value = 0 ;
+ }
+
+ sizeToContent();
+ this.asf_toggleradio_domain();
+ this.asf_toggleradio_filename();
+ },
+
+
+ edit_load: function () {
+
+ sizeToContent();
+ this.asf_loadData();
+ this.asf_toggleradio_domain();
+ this.asf_toggleradio_filename();
+ },
+
+
+ browsedir_addedit: function () {
+ var current_folder_input = document.getElementById("asf-addedit-folder").value;
+
+ const nsIFilePicker = Components.interfaces.nsIFilePicker;
+ var fp = Components.classes["@mozilla.org/filepicker;1"].createInstance(nsIFilePicker);
+
+ fp.init(window, "", nsIFilePicker.modeGetFolder);
+ //fp.appendFilters(nsIFilePicker.filterAll | nsIFilePicker.filterText);
+
+ // locate current directory
+ current_folder_input = this.createValidDestination(current_folder_input);
+ if (current_folder_input != false) fp.displayDirectory = current_folder_input;
+
+ var rv = fp.show();
+ if (rv == nsIFilePicker.returnOK)
+ {
+ var asf_url = fp.file.path;
+
+ // Set the data into the input box
+ document.getElementById("asf-addedit-folder").value = asf_url;
+ }
+ },
+
+
+ createValidDestination: function (path) {
+ if (!path) return false;
+ if (this.trim(path).length==0) return false;
+ var directory = Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);
+
+ try {
+ directory.initWithPath(path);
+ if (directory.exists())
+ return directory;
+ } catch(e) {return false;}
+ return directory;
+ },
+
+
+ asf_loadData: function () {
+ // enable or disable the local saving path user input
+ var select_variable_mode = window.opener.document.getElementById("asf-variablemode");
+ var select_folder_input = document.getElementById("asf-addedit-folder");
+ if (select_variable_mode.checked == true)
+ {
+ select_folder_input.readOnly = false;
+ }
+ if (select_variable_mode.checked == false)
+ {
+ select_folder_input.readOnly = true;
+ }
+
+
+ var tree = window.opener.document.getElementById("asf-filterList") ;
+ var idx = tree.currentIndex;
+ if (idx < 0)
+ {
+ return;
+ }
+
+ var domain = tree.view.getCellText(idx,tree.columns.getColumnAt(0));
+ var filename = tree.view.getCellText(idx,tree.columns.getColumnAt(1));
+ var folder = tree.view.getCellText(idx,tree.columns.getColumnAt(2));
+ var radio_domain = document.getElementById("radio-addedit-domain") ;
+ var radio_filename = document.getElementById("radio-addedit-filename") ;
+
+ if (domain == "/.*/")
+ {
+ radio_domain.value = 0;
+ }
+ else
+ {
+ radio_domain.value = 1;
+ document.getElementById("asf-addedit-domain").value = domain;
+
+ document.getElementById("asf-addedit-domain-regexp").checked = this.is_regexp(document.getElementById("asf-addedit-domain").value);
+ }
+
+ if (filename == "/.*/")
+ {
+ radio_filename.value = 0;
+ }
+ else
+ {
+ radio_filename.value = 1;
+ document.getElementById("asf-addedit-filename").value = filename;
+
+ document.getElementById("asf-addedit-filename-regexp").checked = this.is_regexp(document.getElementById("asf-addedit-filename").value);
+ }
+
+ document.getElementById("asf-addedit-folder").value = folder ;
+ },
+
+
+ asf_toggleradio_domain: function () {
+ var select_addedit_radio_all = document.getElementById("asf-addedit-radio-domain-all");
+ var select_addedit_radio = document.getElementById("asf-addedit-radio-domain");
+ var select_addedit_input = document.getElementById("asf-addedit-domain");
+ var select_addedit_chk = document.getElementById("asf-addedit-domain-regexp");
+
+ if (select_addedit_radio_all.selected == true)
+ {
+ select_addedit_input.disabled = true;
+ select_addedit_chk.disabled = true;
+ }
+
+ if (select_addedit_radio.selected == true)
+ {
+ select_addedit_input.disabled = false;
+ select_addedit_chk.disabled = false;
+ }
+ },
+
+
+ asf_toggleradio_filename: function () {
+ var select_addedit_radio_all = document.getElementById("asf-addedit-radio-filename-all");
+ var select_addedit_radio = document.getElementById("asf-addedit-radio-filename");
+ var select_addedit_input = document.getElementById("asf-addedit-filename");
+ var select_addedit_chk = document.getElementById("asf-addedit-filename-regexp");
+
+ if (select_addedit_radio_all.selected == true)
+ {
+ select_addedit_input.disabled = true;
+ select_addedit_chk.disabled = true;
+ }
+
+ if (select_addedit_radio.selected == true)
+ {
+ select_addedit_input.disabled = false;
+ select_addedit_chk.disabled = false;
+ }
+ },
+
+
+ // add the / at the beginning and the end of the input_regexp if id_regexp id checked
+ makeRegexp: function (id_regexp, input_regexp) {
+
+ var filter = document.getElementById(input_regexp);
+
+ if (document.getElementById(id_regexp).checked)
+ {
+ if (filter.value.substring(0,1) != "/") // let's add the /
+ {
+ filter.value = "/" + filter.value;
+ }
+ if (filter.value.substr(filter.value.length - 1, 1) != "/")
+ {
+ filter.value = filter.value + "/";
+ }
+ }
+ else
+ {
+ if (filter.value.substring(0,1) == "/") // then delete the /
+ {
+ filter.value = filter.value.substring(1, filter.value.length);
+ }
+ if (filter.value.substr(filter.value.length - 1, 1) == "/")
+ {
+ filter.value = filter.value.substring(0, filter.value.length -1);
+ }
+ }
+ document.getElementById(input_regexp).value = filter.value;
+ },
+
+
+ is_regexp: function (string) {
+
+ if ((string.substring(0,1) == "/") && (string.substr(string.length - 1, 1) == "/"))
+ {
+ return true;
+ }
+ else
+ {
+ return false;
+ }
+ },
+
+
+ // on text change, check if the text is still regexp, else unchecked the checkbox
+ testRegexp: function (id_regexp, input_regexp) {
+ var filter = document.getElementById(input_regexp);
+
+ if ((filter.value.substring(0,1) != "/") || (filter.value.substr(filter.value.length - 1, 1) != "/"))
+ {
+ document.getElementById(id_regexp).checked = false;
+ }
+ },
+
+
+ trim: function (string)
+ {
+ return string.replace(/(^\s*)|(\s*$)/g,'');
+ },
+
+
+ //
+ // ADD new filter in tree
+ //
+ asf_add: function () {
+
+ // get the domain
+ //
+ var domain_radio = document.getElementById('radio-addedit-domain');
+ var domain = document.getElementById('asf-addedit-domain');
+ var domain_regexp = document.getElementById('asf-addedit-domain-regexp');
+ if (domain_radio.value == 0)
+ {
+ var rule = "/.*/";
+ }
+ else
+ {
+ var rule = this.trim(domain.value);
+ }
+
+ if (rule != "")
+ {
+ var domain = rule;
+ }
+ else
+ {
+ var err_domain = document.getElementById('popup-nodata-domain').value;
+ asfalert = alert;
+ //alert(err_domain);
+ asfalert("test");
+ var error = true;
+ }
+
+ // get the filename
+ //
+ var filename_radio = document.getElementById('radio-addedit-filename');
+ var filename = document.getElementById('asf-addedit-filename');
+ var filename_regexp = document.getElementById('asf-addedit-filename-regexp');
+ if (filename_radio.value == 0)
+ {
+ var rule = "/.*/";
+ }
+ else
+ {
+ var rule = this.trim(filename.value);
+ }
+
+ if (rule != "")
+ {
+ var filename = rule;
+ }
+ else
+ {
+ var err_filename = document.getElementById('popup-nodata-filename').value;
+ alert(err_filename);
+ var error = true;
+ }
+
+
+ //get the foldername
+ //
+ var folder = document.getElementById('asf-addedit-folder');
+
+ var rule = this.trim(folder.value);
+ if (rule == "")
+ {
+ var err_folder = document.getElementById('popup-nodata-folder').value;
+ alert(err_folder);
+ var error = true;
+ }
+ else
+ {
+ var folder = rule;
+ }
+
+
+
+ if (error != true)
+ {
+ // adding into the tree
+ var filter = window.opener.document.getElementById('asf-filterList');
+ var rules = window.opener.document.getElementById('asf-filterChilds');
+ var item = window.opener.document.createElement('treeitem');
+ var row = window.opener.document.createElement('treerow');
+ var c1 = window.opener.document.createElement('treecell');
+ var c2 = window.opener.document.createElement('treecell');
+ var c3 = window.opener.document.createElement('treecell');
+ var c4 = window.opener.document.createElement('treecell');
+ c1.setAttribute('label', domain);
+ c2.setAttribute('label', filename);
+ c3.setAttribute('label', folder);
+ c4.setAttribute('value', true);
+ c1.setAttribute('editable', false);
+ c2.setAttribute('editable', false);
+ c3.setAttribute('editable', false);
+ row.appendChild(c1);
+ row.appendChild(c2);
+ row.appendChild(c3);
+ row.appendChild(c4);
+ item.appendChild(row);
+ rules.appendChild(item);
+
+ //select the new filter
+ idx = rules.childNodes.length-1;
+ filter.view.selection.select(idx);
+ filter.boxObject.ensureRowIsVisible(idx);
+
+ filter.focus();
+ window.close();
+
+ //needed for linux (and Mac ?): autosaved when editing filters
+ if (navigator.appVersion.indexOf("Win")!=-1) { } // = Windows
+ else
+ {
+ //save the filters
+ window.opener.automatic_save_folder.asf_savefilters();
+ }
+ }
+ },
+
+
+ asf_edit: function () {
+
+ // get the domain
+ //
+ var domain_radio = document.getElementById('radio-addedit-domain');
+ var domain = document.getElementById('asf-addedit-domain');
+ var domain_regexp = document.getElementById('asf-addedit-domain-regexp');
+ if (domain_radio.value == 0)
+ {
+ var rule = "/.*/";
+ }
+ else
+ {
+ var rule = this.trim(domain.value);
+ }
+
+ if (rule != "")
+ {
+ var domain = rule;
+ }
+ else
+ {
+ var err_domain = document.getElementById('popup-nodata-domain').value;
+ alert(err_domain);
+ var error = true;
+ }
+
+ // get the filename
+ //
+ var filename_radio = document.getElementById('radio-addedit-filename');
+ var filename = document.getElementById('asf-addedit-filename');
+ var filename_regexp = document.getElementById('asf-addedit-filename-regexp');
+ if (filename_radio.value == 0)
+ {
+ var rule = "/.*/";
+ }
+ else
+ {
+ var rule = this.trim(filename.value);
+ }
+
+ if (rule != "")
+ {
+ var filename = rule;
+ }
+ else
+ {
+ var err_filename = document.getElementById('popup-nodata-filename').value;
+ alert(err_filename);
+ var error = true;
+ }
+
+
+ //get the foldername
+ //
+ var folder = document.getElementById('asf-addedit-folder');
+
+ var rule = this.trim(folder.value);
+ if (rule == "")
+ {
+ var err_folder = document.getElementById('popup-nodata-folder').value;
+ alert(err_folder);
+ var error = true;
+ }
+ else
+ {
+ var folder = rule;
+ }
+
+ if (error != true)
+ {
+ var tree = window.opener.document.getElementById("asf-filterList") ;
+ var idx = tree.currentIndex;
+ if (idx < 0) {
+ return;
+ }
+
+
+ var theValue = tree.treeBoxObject.view.getItemAtIndex(idx);
+ var test = theValue.firstChild.childNodes[0].getAttribute("label");
+
+ theValue.firstChild.childNodes[0].setAttribute("label", domain );
+ theValue.firstChild.childNodes[1].setAttribute("label", filename );
+ theValue.firstChild.childNodes[2].setAttribute("label", folder );
+
+ //select the edited filter
+ tree.view.selection.select(idx);
+ tree.boxObject.ensureRowIsVisible(idx);
+
+ tree.focus();
+ window.close();
+
+ //needed for linux (and Mac ?): autosaved when editing filters
+ if (navigator.appVersion.indexOf("Win")!=-1) { } // = Windows
+ else
+ {
+ //save the filters
+ window.opener.automatic_save_folder.asf_savefilters();
+ }
+ }
+ }
+};
\ No newline at end of file
diff --git a/content/asf_download.js b/content/asf_download.js
new file mode 100644
index 0000000..b1552ae
--- /dev/null
+++ b/content/asf_download.js
@@ -0,0 +1,679 @@
+/* ***** BEGIN LICENSE BLOCK *****
+Automatic Save Folder
+Copyright (C) 2007-2009 Eric Cassar (Cyan).
+ 2009 Ted Gifford - Dynamic variable capturing
+
+ "Automatic Save Folder" is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 2 of the License, or
+ (at your option) any later version.
+
+ "Automatic Save Folder" is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with "Automatic Save Folder". If not, see <http://www.gnu.org/licenses/>.
+
+ * ***** END LICENSE BLOCK ***** */
+ var automatic_save_folder = {
+ prefManager: Components.classes["@mozilla.org/preferences-service;1"]
+ .getService(Components.interfaces.nsIPrefBranch),
+
+ appInfo: Components.classes["@mozilla.org/xre/app-info;1"]
+ .getService(Components.interfaces.nsIXULAppInfo),
+
+ versionChecker: Components.classes["@mozilla.org/xpcom/version-comparator;1"]
+ .getService(Components.interfaces.nsIVersionComparator),
+
+ asf_setdir: function () {
+ // I don't understand why "this.function" doesn't work with addEventListener even using "with" method, only onclick from the Xul events works.
+ // So I use this tweak to call functions and properties from its name "automatic_save_folder" instead of "this"
+
+ // Setting private variables usable in this function
+ var prefManager = automatic_save_folder.prefManager;
+ var versionChecker = automatic_save_folder.versionChecker;
+ var appInfo = automatic_save_folder.appInfo;
+ var ASF = automatic_save_folder; // ASF is just a shortcut to automatic_save_folder
+
+ var firefoxversion = "";
+ if(versionChecker.compare(appInfo.version, "3.0") >= 0)
+ {
+ firefoxversion = "3";
+ }
+ else
+ {
+ firefoxversion = "2";
+ }
+
+
+ // Check if there is any filter in list
+ var nbrfilters = prefManager.getIntPref("extensions.asf.filtersNumber");
+
+
+ // load the domain and the filename of the saved file (copy the data from the firefox saving window)
+ var domain = document.getElementById("source").value ;
+ var filename = document.getElementById("location").value ;
+
+
+ // load prefmanager data
+ var savetype = prefManager.getIntPref("extensions.asf.savetype");
+ var lastdir = prefManager.getBoolPref("extensions.asf.lastdir");
+ var defaultfolder = ASF.loadUnicodeString("extensions.asf.defaultfolder");
+ var keeptemp = prefManager.getBoolPref("extensions.asf.keeptemp");
+ var tempdomain = ASF.loadUnicodeString("extensions.asf.tempdomain");
+ var variable_mode = prefManager.getBoolPref("extensions.asf.variablemode");
+
+ // If variable/Advanced mode is ON, let's check the variables and replace to create the new defaultfolder
+ if (variable_mode == true)
+ {
+ defaultfolder = ASF.createfolder(defaultfolder);
+ }
+
+ // set the last folder path used into asf.lastpath
+ if (firefoxversion == "3") // take the download.lastDir if it's FF3
+ {
+ var folder = ASF.loadUnicodeString("browser.download.lastDir");
+ }
+ else // else if it's not FF3 (it's 1.5 or 2), read Download.dir
+ {
+ var folder = ASF.loadUnicodeString("browser.download.dir");
+ }
+ ASF.saveUnicodeString("extensions.asf.lastpath", folder); // And set it to asf.lastpath to be compared later with the new path the filters will set to lastDir (or dir)
+
+
+
+
+ // load filters data from prefmanager into filters[]
+ // filters[filternumber][label]
+ var filters = new Array();
+ for ( var i = 0 ; i < nbrfilters ; i++)
+ {
+ var dom = ASF.loadUnicodeString("extensions.asf.filters"+ i +".domain");
+ var fil = ASF.loadUnicodeString("extensions.asf.filters"+ i +".filename");
+ var fol = ASF.loadUnicodeString("extensions.asf.filters"+ i +".folder");
+ var act = prefManager.getBoolPref("extensions.asf.filters"+ i +".active");
+ filters[i] = [dom, fil, fol, act];
+ }
+
+
+ //
+ // Start checking the filters with the downloaded file
+ //
+ var idx = -1 ;
+ var dom_regexp = false;
+ var file_regexp = false;
+ for ( var i = 0 ; i < filters.length ; i++)
+ {
+ if (filters[i][3] == true) // if not temporary deactivated
+ {
+ dom_regexp = false ; // reset the matching string for the "for" loop
+ file_regexp = false ; // same as above
+ // Check the domain
+ dom_regexp = ASF.test_regexp(filters[i][0], "source"); // hosted Domain
+
+ // Check the referer domain name if hosted domain checking returned false. In next releases, will be a proper option
+ if (dom_regexp == false)
+ {
+ dom_regexp = ASF.test_regexp(filters[i][0], "referer"); // check the filter domain with the Referer domain only if the hosted domain doesn't match
+ }
+
+ // Check the filename
+ file_regexp = ASF.test_regexp(filters[i][1], "location"); // Filename
+
+ // debug
+ // alert ("i = "+i+"\n domain match = "+dom_regexp+"\n file match = "+file_regexp);
+ if (dom_regexp && file_regexp)
+ {
+ var idx = i;
+ break;
+ }
+ }
+ } // end filters loop
+
+ if (idx < 0) // if no filters matched
+ {
+ if(savetype == 1) // and folder is set to user choice
+ {
+ if ( (keeptemp == false) || ((keeptemp == true) && ( tempdomain != domain )) ) // and, if [same domain not checked] OR [ if same domain (keeptemp) is checked and domain not same as previous one]
+ { // then change the destination folder to user choice
+ ASF.saveUnicodeString("browser.download.dir", defaultfolder);
+ if (lastdir == true) // set it for "save as..." on FF1.5 and FF2, on FF3 lastdir is always true
+ {
+ ASF.saveUnicodeString("browser.download.lastDir", defaultfolder);
+ }
+ }
+ else // else, if domain is the same as the last, set the download.dir to the last folder used (else viewDownloadOption will not show the correct save path and will use the default folder)
+ { // only affect Firefox3 which update download.lastDir instead of download.dir, so taking download.lastDir data to set download.dir,
+ // FF1.5 or FF2 automatically update download.dir, not download.lastDir
+ if (firefoxversion == "3")
+ {
+ var lastpath = ASF.loadUnicodeString("browser.download.lastDir"); // this one is the one that will open
+ if (lastpath == "") // if no path is returned (first time using lastDir, or the user reseted the content manually in about:config)
+ {
+ ASF.saveUnicodeString("browser.download.lastDir", defaultfolder);
+ lastpath = defaultfolder;
+ }
+ ASF.saveUnicodeString("browser.download.dir", lastpath); // this one is the one that will be shown in ASF save option
+ }
+ }
+ }
+ else // else, if savetype == 0 (folder is set to last folder)
+ {
+ // set the download.dir to the last folder used (else viewDownloadOption will not show the correct save path and will use the default folder)
+ // only affect Firefox3 which update download.lastDir instead of download.dir, so we are taking download.lastDir data to set download.dir,
+ // FF1.5 or FF2 automatically update download.dir, not download.lastDir
+ if (firefoxversion == "3")
+ {
+ var lastpath = ASF.loadUnicodeString("browser.download.lastDir");
+ if (lastpath == "") // if no path is returned (first time using lastDir, or the user reseted the content manually in about:config)
+ {
+ ASF.saveUnicodeString("browser.download.lastDir", defaultfolder);
+ lastpath = defaultfolder;
+ }
+ ASF.saveUnicodeString("browser.download.dir", lastpath);
+ }
+
+ }
+ }
+ else // if a filter is found
+ {
+
+ var folder = filters[idx][2];
+
+
+ // If Advanced mode is ON, let's check the variables and create the folder
+ if (variable_mode == true)
+ {
+
+// Ted Gifford, start block
+ // String capture in filename with $f<1-9>
+ try {
+ //alert(file_regexp.length);
+ if (file_regexp.length > 1)
+ {
+ //alert('munging folder: ' + folder);
+ for (var replace_index = 1; replace_index < file_regexp.length; ++replace_index)
+ folder = folder.replace("$"+replace_index+"f", file_regexp[replace_index]);
+ //alert('munged folder: ' + folder);
+ }
+ } catch (e) {alert(e);}
+ // String capture in domain with $d<1-9>
+ try {
+ //alert(dom_regexp.length);
+ if (dom_regexp.length > 1)
+ {
+ //alert('munging folder: ' + folder);
+ for (var replace_index = 1; replace_index < dom_regexp.length; ++replace_index)
+ folder = folder.replace("$"+replace_index+"d", dom_regexp[replace_index]);
+ //alert('munged folder: ' + folder);
+ }
+ } catch (e) {alert(e);}
+// Ted Gifford, end block
+
+
+
+ folder = ASF.createfolder(folder, idx);
+ }
+
+ ASF.saveUnicodeString("browser.download.dir", folder);
+ if (lastdir == true) // set it for "save as..." on FF1.5 and FF2, on FF3 lastdir is always true
+ {
+ ASF.saveUnicodeString("browser.download.lastDir", folder);
+ }
+ }
+
+ // in every case, set the new file hosted domain to tempdomain
+ ASF.saveUnicodeString("extensions.asf.tempdomain", domain);
+
+ // show or hide the asf option on saving window
+ ASF.show_dloptions();
+
+ },
+
+
+ loadUnicodeString: function (pref_place) {
+ try
+ {
+ return this.prefManager.getComplexValue(pref_place, Components.interfaces.nsISupportsString).data;
+ }
+ catch (e)
+ { }
+ return "";
+ },
+
+
+ saveUnicodeString: function (pref_place,pref_data) {
+ var str = Components.classes["@mozilla.org/supports-string;1"]
+ .createInstance(Components.interfaces.nsISupportsString);
+ str.data = pref_data;
+ this.prefManager.setComplexValue(pref_place, Components.interfaces.nsISupportsString, str);
+ },
+
+
+ createfolder: function (path, idx) {
+
+ if (!path) return false;
+ if (this.trim(path).length==0) return false;
+
+ objdate = new Date();
+ const ZERO = "0"; // leading zero
+
+ // load the domain and the filename of the saved file
+ var domain = document.getElementById("source").value ;
+ domain = domain.replace(/^.*:\/\//g,''); // remove the protocol name from the domain
+ var filename = document.getElementById("location").value ;
+ var file_name = filename.replace (/\.(?!.*\.).*$/i, ""); // Trim from the last dot to the end of the file = remove extension
+ var extension = filename.match(/([^\.]*)$/i); // take out the extension (anything not containing a dot, with an ending line)
+
+ // check the filter's data
+ var asf_domain = "";
+ var asf_filename = "";
+ if (idx) { // If a filter match, idx is true
+ asf_domain = this.loadUnicodeString("extensions.asf.filters"+ idx +".domain");
+ // Trim the / / if domain is regexp
+ if (this.is_regexp(asf_domain))
+ {
+ asf_domain = asf_domain.substring(1, asf_domain.length);
+ asf_domain = asf_domain.substring(0, asf_domain.length -1);
+ }
+ asf_filename = this.loadUnicodeString("extensions.asf.filters"+ idx +".filename");
+ // Trim the / / if filename is regexp
+ if (this.is_regexp(asf_domain))
+ {
+ asf_filename = asf_filename.substring(1, asf_filename.length);
+ asf_filename = asf_filename.substring(0, asf_filename.length -1);
+ }
+ }
+ else // no filter is found, use actual Domain and filename without extension
+ {
+ asf_domain = domain;
+ asf_filename = file_name;
+ }
+
+ // Check if asf_rd is present and process asf_rd = Regexp the domain
+ if (path.search("%asf_rd%") != -1)
+ {
+ // get the domain with the protocol
+ var domainp = document.getElementById("source").value ;
+
+ // extract the filter part
+ var matches = path.match(/%asf_rd%.*?%asf_rd%/g); // matches is an array
+ if (matches != null)
+ {
+ var datareg = "";
+ var result = new Array();
+ var matchreplace = new Array();
+ for (var i = 0, len = matches.length; i < len; i++)
+ {
+ datareg = matches[i].replace(/%asf_rd%/g, ''); // remove the %asf_rf% to keep only the regexp
+ datareg = new RegExp(datareg, 'i'); // create the regexp
+ //alert("reg="+datareg);
+ result = domainp.match(datareg); // Check it on the domain with protocol
+
+ if (result == null)
+ {
+ matchreplace[i] = ""; // if no result, replace with nothing instead of null
+ }
+ else
+ {
+ matchreplace[i] = result[0];
+ }
+ //alert("matchreplace["+i+"]="+matchreplace[i]);
+ }
+ for (var i = 0, len = matches.length; i < len; i++)
+ {
+ path = path.replace(matches[i], matchreplace[i]); // replace each variable in the path
+ }
+ }
+ }
+
+
+ // Check if asf_rf is present and process asf_rf = Regexp the filename
+ if (path.search("%asf_rf%") != -1 )
+ {
+ // extract the filter part
+ var matches = path.match(/%asf_rf%.*?%asf_rf%/g); // matches is an array
+ if (matches != null)
+ {
+ var datareg = "";
+ var result = new Array();
+ var matchreplace = new Array();
+ for (var i = 0, len = matches.length; i < len; i++)
+ {
+ datareg = matches[i].replace(/%asf_rf%/g, ''); // remove the %asf_rf% to keep only the regexp
+ datareg = new RegExp(datareg, 'i'); // create the regexp
+ //alert("reg="+datareg);
+ result = filename.match(datareg); // Check it
+
+ if (result == null)
+ {
+ matchreplace[i] = ""; // if no result, replace with nothing instead of null
+ }
+ else
+ {
+ matchreplace[i] = result[0];
+ }
+ //alert("matchreplace["+i+"]="+matchreplace[i]);
+ }
+ for (var i = 0, len = matches.length; i < len; i++)
+ {
+ path = path.replace(matches[i], matchreplace[i]); // replace each variable in the path
+ }
+ }
+ }
+
+
+
+ // remove special characters from filters :
+ // forbidden on windows \ / : * ? " < > |
+ if (navigator.appVersion.indexOf("Win")!=-1) // = Windows
+ {
+ asf_domain = asf_domain.replace(/[\/\:\*\?\"\<\>\|]/g,'');
+ asf_filename = asf_filename.replace(/[\/\:\*\?\"\<\>\|]/g,'');
+ file_name = file_name.replace(/[\/\:\*\?\"\<\>\|]/g,'');
+ path = path.replace(/[\/\*\?\"\<\>\|]/g,'');
+ }
+ else // MacOS and linux, replace only / :
+ {
+ asf_domain = asf_domain.replace(/[\/\:]/g,'');
+ asf_filename = asf_filename.replace(/[\/\:]/g,'');
+ file_name = file_name.replace(/[\/\:]/g,'');
+ }
+
+ // replace the string here // Year
+ path = path .replace(/%Y%/g, objdate.getFullYear()) // full year format = 2009
+ .replace(/%y%/g, ((objdate.getYear()-100) <10) ? (ZERO + (objdate.getYear()-100)) : objdate.getYear()-100) // year in YY format : 08, 09, 10
+ // .replace(/%<to define>/g, objdate.getYear()-100) // 8, 9, 10, (no leading 0)
+ // Month
+ .replace(/%m%/g, ((objdate.getMonth()+1) <10) ? (ZERO + (objdate.getMonth()+1)) : objdate.getMonth()+1) // = number of the month : 01 to 12
+ .replace(/%n%/g, objdate.getMonth()+1) // 8, 9, 10, (no leading 0)
+ // Day
+ .replace(/%d%/g, ((objdate.getDate()) <10) ? (ZERO + (objdate.getDate())) : objdate.getDate()) // = number of the day : 01 to 31
+ .replace(/%j%/g, objdate.getDate()) // = number of the day 1 to 31 (no leading 0)
+ // ASF
+ .replace(/%asf_D%/g, domain) // downloaded File's domain
+ .replace(/%asf_F%/g, filename) // downloaded File's filename with extension
+ .replace(/%asf_Fx%/g, file_name) // downloaded File's filename without extension
+ .replace(/%asf_d%/g, asf_domain) // matching filter's Domain (without special chars used by regexp)
+ .replace(/%asf_f%/g, asf_filename) // mathching filter's filename (without special chars used by regexp)
+ .replace(/%asf_x%/g, extension[0]); // match the filename extension (without the dot)
+ // debug
+ // alert (path);
+ var directory = Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);
+
+ directory.initWithPath(path);
+ return path;
+
+// Canceled the folder creation script, so the folder will not be created if the user cancel the download
+// Firefox will create it automatically when accepting the download... under windows XP and Linux Ubuntu at least (not tested under Vista, MacOS, or any other operating system)
+/*
+ if (directory.exists())
+ {
+ return path;
+ }
+ else // if it doesn't exist, create it
+ {
+ if( !directory.exists() || !directory.isDirectory() )
+ {
+ directory.create(Components.interfaces.nsIFile.DIRECTORY_TYPE, 0777);
+ }
+ return path;
+ }
+*/
+ },
+
+
+ trim: function (string) {
+ return string.replace(/(^\s*)|(\s*$)/g,'');
+ },
+
+
+ show_dloptions: function () {
+
+ var asf_dloptions = document.getElementById('asf_dloptions');
+ var asf_radiogroup_pathselect = document.getElementById('asf_radiogroup_pathselect');
+ var asf_savefolder = document.getElementById('asf_savefolder');
+ var asf_viewdloption = this.prefManager.getBoolPref("extensions.asf.viewdloption");
+ var asf_viewpathselect = this.prefManager.getBoolPref("extensions.asf.viewpathselect");
+ var folder = this.loadUnicodeString("browser.download.dir");
+
+ // check the lastpath, if different than current folder, then print radio choice to user
+ // so he can choose from found filters, or last used path.
+ var lastpath = this.loadUnicodeString("extensions.asf.lastpath");
+ var asf_lastpath = document.getElementById('asf_lastpath');
+
+ if ( (lastpath == folder) || (lastpath == "") ) // if same or empty (first time using ASF), do not show radio for lastpath choice
+ {
+ asf_lastpath.hidden = true;
+ }
+ else // else, if last path is different than folder found in filter, show a choice
+ {
+ asf_lastpath.hidden = false;
+ }
+
+ //set the text to be written on the Radio comment
+ asf_savefolder.label = folder;
+ asf_lastpath.label = lastpath;
+
+ // Force check the first radio choice (needed on linux + ff2.x) (linux has blank radio choices on loading, this is only visual, it doesn't affect anything here, the value are set to the new path by default until the user change the radio choice)
+ var asf_radio_savepath = document.getElementById('asf_radio_savepath');
+ asf_radio_savepath.value = 0;
+
+
+ //now, if the user checked the option to view asf on saving window, set it to visible
+ if(asf_viewdloption == true) asf_dloptions.style.visibility = "visible";
+
+ //and last, if the user checked the option to view asf on saving window, set it to visible
+ if((asf_viewpathselect == true) && (this.prefManager.getIntPref("extensions.asf.filtersNumber") > 0) )
+ {
+ this.read_all_filterpath();
+ asf_radiogroup_pathselect.style.visibility = "visible";
+ }
+
+
+
+
+ // Set the max width to the size of the screen minus 200px. Added for Mac users with long path choice.
+ // alert("first screen : " + screen.width + "x" + screen.height);
+ asf_dloptions.style.maxWidth = screen.width -200 +"px";
+
+ // debug : show the full downloaded link
+ //var url = dialog.mLauncher.source.spec;
+ //alert(url);
+
+ },
+
+
+ read_all_filterpath: function() {
+
+ var list = document.getElementById('asf_folder_list');
+ var menupopup = document.createElement('menupopup');
+
+ // Check if there is any filter in list
+ var nbrfilters = this.prefManager.getIntPref("extensions.asf.filtersNumber");
+ var path = "";
+
+ // Delete active list before repopulating (if editing filter and coming back to saving window)
+ for (var i=list.childNodes.length-1 ; i>=0 ; i--)
+ {
+ list.removeChild(list.childNodes[i]);
+ }
+
+ // Write each path to the menupopup
+ for (var i = 0; i < nbrfilters; i++)
+ {
+ // read the filter number x
+ path = this.loadUnicodeString("extensions.asf.filters"+ i +".folder");
+
+ var menuitem = document.createElement('menuitem');
+ menuitem.setAttribute('label', path);
+ menuitem.setAttribute('crop', 'center');
+ menuitem.setAttribute('value', path);
+ menuitem.setAttribute('oncommand', "automatic_save_folder.asf_select_savepath(this)");
+ menupopup.appendChild(menuitem);
+ }
+
+ // Add the default folder
+ var defaultfolder = this.loadUnicodeString("extensions.asf.defaultfolder");
+ var menuitem = document.createElement('menuitem');
+ menuitem.setAttribute('label', defaultfolder);
+ menuitem.setAttribute('crop', 'center');
+ menuitem.setAttribute('value', defaultfolder);
+ menuitem.setAttribute('oncommand', "automatic_save_folder.asf_select_savepath(this)");
+ menupopup.appendChild(menuitem);
+
+ // Populate the path list into the menu
+ list.appendChild(menupopup);
+
+ },
+
+
+ asf_toggle_savepath: function () {
+
+ var lastdir = this.prefManager.getBoolPref("extensions.asf.lastdir");
+
+ var asf_savefolder = document.getElementById('asf_savefolder');
+ var asf_lastpath = document.getElementById('asf_lastpath');
+ var asf_pathselect = document.getElementById('asf_pathselect');
+ var userchoice = "";
+
+ if(asf_savefolder.selected == true)
+ {
+ userchoice = asf_savefolder.label ;
+ }
+
+ if(asf_lastpath.selected == true)
+ {
+ userchoice = asf_lastpath.label ;
+ }
+
+ if(asf_pathselect.selected == true)
+ {
+ // read the current selected item value
+ var asf_folder_list = document.getElementById('asf_folder_list');
+ userchoice = asf_folder_list.value ;
+ }
+
+
+ this.saveUnicodeString("browser.download.dir", userchoice);
+ if (lastdir == true) // set it for "save as..." on FF1.5 and FF2, on FF3 lastdir is always true
+ {
+ this.saveUnicodeString("browser.download.lastDir", userchoice);
+ }
+
+ },
+
+
+ asf_select_savepath: function () {
+
+ var lastdir = this.prefManager.getBoolPref("extensions.asf.lastdir");
+
+ // check the third radio choice
+ var asf_radio_savepath = document.getElementById('asf_radio_savepath');
+ asf_radio_savepath.value = 2;
+
+ // read the selected item value
+ var asf_folder_list = document.getElementById('asf_folder_list');
+
+ this.saveUnicodeString("browser.download.dir", asf_folder_list.value);
+ if (lastdir == true) // set it for "save as..." on FF1.5 and FF2, on FF3 lastdir is always true
+ {
+ this.saveUnicodeString("browser.download.lastDir", asf_folder_list.value);
+ }
+ },
+
+ test_regexp: function (filters, input) {
+
+ // input can be "source" for domain name, "location" for file name, ...
+ if ( (input == "source") || (input == "location") )
+ {
+ var string = document.getElementById(input).value ;
+ }
+ // ... or "referer" for referer's domain name (the place where the link is, and not the file)
+ else // if (input == "referer")
+ {
+ var uCT = document.getElementById("unknownContentType");
+ var string = uCT.parentNode.defaultView.opener.location.host; // look for the referer host name in the DOM.
+ }
+
+ // Steps :
+ // 1 - Check if the filter is a regular expression
+ // 2 - if not regexp : add the backslah to special characters and .* to the start and end of the string to convert it into a regexp form
+ // if it's already regexp : delete the / / for new regexp() to handle it
+ // 3 - when all is ready in regexp, test the data with the filters
+ // 4 - if the data match the filter --> return true
+
+ // 3 & 4 replaced with Ted script, now it returns the matching result's array, or false if nothing matched.
+
+
+ // step 1
+ var test_regexp = this.is_regexp(filters); // True or False
+
+ // step 2
+ if (test_regexp == false) // replace simple wildcard and special characters with corresponding regexp
+ {
+ filters = filters.replace(/\./gi, "\\.")
+ .replace(/\*/gi, "(.)*")
+ .replace(/\$/gi, "\\$")
+ .replace(/\^/gi, "\\^")
+ .replace(/\+/gi, "\\+")
+ .replace(/\?/gi, ".")
+ .replace(/\|/gi, "\\|")
+ .replace(/\[/gi, "\\[")
+ .replace(/\//gi,'\\/');
+ filters = ".*"+filters+".*";
+ }
+ else // remove the first and last slash
+ {
+ filters = filters.substring(1, filters.length);
+ filters = filters.substring(0, filters.length -1);
+ }
+
+ // initialize the regular expression search
+ var test_regexp = new RegExp(filters, "i"); // put the slash back and the gi option (g = global seach, i = case insensitive)
+ // Edited to only "i" option by Ted.
+
+ // Step 3 & 4
+ // if (string.match(test_regexp)) // if something match
+ // {
+ // return(true);
+ // }
+
+ // return(false);
+
+// Ted Gifford, start block
+ var res = string.match(test_regexp);
+ return res;
+// Ted Gifford, end block
+
+ },
+
+
+ is_regexp: function (string) {
+ if ((string.substring(0,1) == "/") && (string.substr(string.length - 1, 1) == "/"))
+ {
+ return true;
+ }
+ else
+ {
+ return false;
+ }
+ }
+
+
+};
+ // addEventListener( // Autoload
+ // "load", // After OnLoad from overlay_unknownContentType.xul file
+ // automatic_save_folder.asf_setdir, // Run asf_setdir from automatic_save_folder to check the filters
+ // true
+ // );
+
+ with(automatic_save_folder){
+ addEventListener( // Autoload
+ "load", // After OnLoad from overlay_unknownContentType.xul file
+ asf_setdir, // Run asf_setdir from automatic_save_folder to check the filters
+ false
+ );
+ }
\ No newline at end of file
diff --git a/content/edit.xul b/content/edit.xul
new file mode 100644
index 0000000..98c03f9
--- /dev/null
+++ b/content/edit.xul
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- ***** BEGIN LICENSE BLOCK *****
+ Copyright 2007-2009 Eric Cassar (Cyan)
+
+ This file is part of "Automatic Save Folder".
+ You may find the license in the LICENSE file
+
+ ***** END LICENSE BLOCK ***** -->
+<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
+<!DOCTYPE dialog SYSTEM "chrome://asf/locale/asf.dtd">
+
+<dialog title="&asf.edit.title;"
+ orient="vertical" autostretch="always"
+ onload="automatic_save_folder.edit_load();"
+ buttons="extra1, extra2, cancel"
+ defaultButton="extra1"
+ buttonlabelextra1="&buttonlabelextra1;"
+ ondialogextra1="automatic_save_folder.asf_edit()"
+ ondialogcancel="window.opener.focus;window.close();"
+ buttonlabelextra2="regexp help"
+ ondialogextra2="window.openDialog('chrome://asf/content/regexp.xul','asf_regexp_help','chrome, centerscreen, resizable=yes, dialog=no');"
+ xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+<script type="application/x-javascript" src="chrome://asf/content/asf_addedit.js"/>
+<groupbox align="center" orient="horizontal">
+ <caption label="&asf.addedit.filter.label;"/>
+ <vbox>
+
+ <description value="&asf.addedit.domain.label;"/>
+ <radiogroup id="radio-addedit-domain" align="left">
+ <radio id="asf-addedit-radio-domain-all" value="0" selected="true" label="&asf.addedit.all;" oncommand="automatic_save_folder.asf_toggleradio_domain()"/>
+ <hbox>
+ <radio id="asf-addedit-radio-domain" value="1" label="=" oncommand="automatic_save_folder.asf_toggleradio_domain()"/>
+ <textbox id="asf-addedit-domain" width="200" onchange="automatic_save_folder.testRegexp('asf-addedit-domain-regexp', 'asf-addedit-domain');"/>
+ <checkbox id="asf-addedit-domain-regexp" label="&asf.addedit.regexp;" oncommand="automatic_save_folder.makeRegexp('asf-addedit-domain-regexp', 'asf-addedit-domain');"/>
+ </hbox>
+ </radiogroup>
+ <separator class="thin"/>
+
+ <description value="&asf.addedit.filename.label;"/>
+ <radiogroup id="radio-addedit-filename" align="left">
+ <radio id="asf-addedit-radio-filename-all" value="0" selected="true" label="&asf.addedit.all;" oncommand="automatic_save_folder.asf_toggleradio_filename()"/>
+ <hbox>
+ <radio id="asf-addedit-radio-filename" value="1" label="=" oncommand="automatic_save_folder.asf_toggleradio_filename()"/>
+ <textbox id="asf-addedit-filename" width="200" onchange="automatic_save_folder.testRegexp('asf-addedit-filename-regexp', 'asf-addedit-filename')"/>
+ <checkbox id="asf-addedit-filename-regexp" label="&asf.addedit.regexp;" oncommand="automatic_save_folder.makeRegexp('asf-addedit-filename-regexp', 'asf-addedit-filename');"/>
+ </hbox>
+ </radiogroup>
+ <separator class="thin"/>
+
+ <description value="&asf.addedit.folder.label;"/>
+ <hbox>
+ <textbox id="asf-addedit-folder" readonly="true" width="230" ondblclick="automatic_save_folder.browsedir_addedit()"/>
+ <button id="asf-addedit-select-folder" label="&asf.selectfolder.label;" oncommand="automatic_save_folder.browsedir_addedit()"/>
+ </hbox>
+
+ </vbox>
+</groupbox>
+
+<groupbox align="center" orient="horizontal">
+ <caption label="&asf.addedit.help.label;"/>
+ <vbox>
+ <description value="&asf.addedit.inforegexp1;"/>
+ <description value="&asf.addedit.inforegexp2;"/>
+ <description value="&asf.addedit.inforegexp3;"/>
+ <description value="&asf.addedit.inforegexp4;"/>
+ </vbox>
+</groupbox>
+
+<description id="popup-nodata-domain" style="display:none" value="&asf.addedit.nodata.domain;"/>
+<description id="popup-nodata-filename" style="display:none" value="&asf.addedit.nodata.filename;"/>
+<description id="popup-nodata-folder" style="display:none" value="&asf.addedit.nodata.folder;"/>
+
+</dialog>
\ No newline at end of file
diff --git a/content/options.xul b/content/options.xul
new file mode 100644
index 0000000..17b262f
--- /dev/null
+++ b/content/options.xul
@@ -0,0 +1,133 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- ***** BEGIN LICENSE BLOCK *****
+ Copyright 2007-2009 Eric Cassar (Cyan)
+
+ This file is part of "Automatic Save Folder".
+ You may find the license in the LICENSE file
+
+ ***** END LICENSE BLOCK ***** -->
+<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
+<?xml-stylesheet href="chrome://asf/skin/style.css" type="text/css"?>
+<!DOCTYPE dialog SYSTEM "chrome://asf/locale/asf.dtd">
+
+<prefwindow
+ id="asf_pref"
+ autostretch="always"
+ buttons="accept, cancel"
+ defaultButton="accept"
+ onload="automatic_save_folder.asf_load();"
+ ondialogaccept="automatic_save_folder.asf_savepref();"
+ xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" title="&prefwindow.title; (&asf.version;)"
+>
+<prefpane id="asf-options" style="padding:1px !important" flex="1" >
+ <script type="application/x-javascript" src="chrome://asf/content/asf.js"/>
+ <preferences>
+ <preference id="asf_lastdir" name="extensions.asf.lastdir" type="bool"/>
+ <preference id="asf_keeptemp" name="extensions.asf.keeptemp" type="bool"/>
+ <preference id="asf_viewdloption" name="extensions.asf.viewdloption" type="bool"/>
+ <preference id="asf_viewpathselect" name="extensions.asf.viewpathselect" type="bool"/>
+ <preference id="asf_savetype" name="extensions.asf.savetype" type="int"/>
+ <preference id="asf_variablemode" name="extensions.asf.variablemode" type="bool"/>
+ </preferences>
+ <menupopup id="contextpopup">
+ <menuitem label="&asf.top.popup;" oncommand="automatic_save_folder.move('top');"/>
+ <menuitem label="&asf.copy.popup;" oncommand="automatic_save_folder.asf_duplicate();"/>
+ <menuitem label="&asf.delete.popup;" oncommand="automatic_save_folder.asf_delete();"/>
+ <menuitem label="&asf.bottom.popup;" oncommand="automatic_save_folder.move('bottom');"/>
+ </menupopup>
+ <vbox>
+ <tabbox>
+ <tabs>
+ <tab id="asf-filterstab" style="-moz-appearance: none" orient="vertical" selected="true" label="&asf.filters.label;" oncommand="automatic_save_folder.asf_selecttab('asf-tab-filters');" />
+ <tab id="asf-optionstab" style="-moz-appearance: none" orient="vertical" label="&asf.options.label;" oncommand="automatic_save_folder.asf_selecttab('asf-tab-options');" />
+ <tab id="asf-informationstab" style="-moz-appearance: none" orient="vertical" label="&asf.info.label;" oncommand="automatic_save_folder.asf_selecttab('asf-tab-informations');" />
+ </tabs>
+ <tabpanels hidden="true">
+ <tabpanel />
+ <tabpanel />
+ <tabpanel />
+ </tabpanels>
+ </tabbox>
+ </vbox>
+ <vbox id="asf-tab-filters" hidden="false" flex="1000" >
+ <groupbox flex="1" >
+ <caption label="&asf.filters.label;"/>
+ <hbox flex="1" >
+ <tree flex="1" id="asf-filterList" width="376" height="200" seltype="single" hidecolumnpicker="false"
+ enableColumnDrag="true" disableKeyNavigation="true" editable="true"
+ onselect="automatic_save_folder.asf_treeSelected();">
+ <treecols >
+ <treecol id="asf-column-Domain" label="&asf.tree.column.domain;" flex="1" persist="width ordinal hidden"/>
+ <splitter class="tree-splitter"/>
+ <treecol id="asf-column-filename" label="&asf.tree.column.filename;" flex="1" persist="width ordinal hidden"/>
+ <splitter class="tree-splitter"/>
+ <treecol id="asf-column-LocalFolder" label="&asf.tree.column.localfolder;" flex="1" persist="width ordinal hidden"/>
+ <splitter class="tree-splitter"/>
+ <treecol id="asf-column-Enabled" label="&asf.tree.column.enabled;" flex="0" persist="width ordinal hidden" type="checkbox" editable="true" hidden="true" />
+ </treecols>
+ <treechildren id="asf-filterChilds" context="contextpopup" ondblclick="event.preventDefault();window.openDialog('chrome://asf/content/edit.xul','asf_addedit','chrome, centerscreen, resizable=no, dialog=no, modal=yes');"/>
+ </tree>
+ <vbox>
+ <button id="asf-move-up" label="&asf.options.move.up;" oncommand="automatic_save_folder.move('up')"/>
+ <button id="asf-add" image="chrome://asf/skin/add.png" label="&asf.options.add;" onclick="window.openDialog('chrome://asf/content/add.xul','asf_addedit','chrome, centerscreen, resizable=no, dialog=no, modal=yes');"/>
+ <button id="asf-edit" label="&asf.options.edit;" oncommand="window.openDialog('chrome://asf/content/edit.xul','asf_addedit','chrome, centerscreen, resizable=no, dialog=no, modal=yes');"/>
+ <button id="asf-delete" label="&asf.options.delete;" oncommand="automatic_save_folder.asf_delete()"/>
+ <button id="asf-move-down" label="&asf.options.move.down;" oncommand="automatic_save_folder.move('down')"/>
+ </vbox>
+ </hbox>
+ </groupbox>
+ <groupbox flex="0">
+ <caption label="&asf.default.label;"/>
+ <radiogroup id="radio-savetype" align="left" preference="asf_savetype">
+ <radio id="asf-last-radio" value="0" label="&asf.lastselected.label;" oncommand="automatic_save_folder.asf_toggleradio()"/>
+ <hbox>
+ <radio id="asf-choose-radio" value="1" label="&asf.defaultfolder.label;" oncommand="automatic_save_folder.asf_toggleradio()"/>
+ <textbox id="asf-default-folder" width="350" ondblclick="automatic_save_folder.browsedir()"/>
+ <button id="asf-select-folder" label="&asf.selectfolder.label;" oncommand="automatic_save_folder.browsedir()"/>
+ </hbox>
+ <hbox pack="end"><description value=" " /><checkbox id="asf-keeptemp-check" preference="asf_keeptemp" label="&asf.keeptemp.label;"/>
+ </hbox>
+ </radiogroup>
+ </groupbox>
+ <groupbox hidden="true">
+ <textbox id="asf-pickup" value="&asf.selectfolder.pickup;" />
+ <textbox id="asf-current-domain" value="" />
+ <textbox id="asf-current-filename" value="" />
+ </groupbox>
+ </vbox>
+ <vbox id="asf-tab-options" hidden="true" flex="1000">
+ <groupbox id="asf-options" flex="1">
+ <caption label="&asf.options.label;"/>
+ <separator class="thin"/>
+ <checkbox id="asf-lasdir" preference="asf_lastdir" label="&asf.lastdir.bool;"/>
+ <checkbox id="asf-viewdloption" preference="asf_viewdloption" label="&asf.viewdloption.bool;" oncommand="automatic_save_folder.toggle_options();"/>
+ <hbox><description value=" " /><description id="asf-viewdloptiondesc" >&asf.viewdloption.label;</description></hbox>
+ <hbox><description value=" " /><checkbox id="asf-viewpathselect" preference="asf_viewpathselect" label="&asf.viewpathselect.bool;"/></hbox>
+ <hbox><description value=" " /><description id="asf-viewpathselectdesc" >&asf.viewpathselect.label;</description></hbox>
+ <separator />
+ <checkbox id="asf-variablemode" preference="asf_variablemode" label="&asf.variablemode.bool;" oncommand="automatic_save_folder.asf_variablemode()"/>
+ <hbox><description value=" " /><description id="asf-variablemodedesc1" >&asf.variablemode1.label;</description></hbox>
+ <hbox><description value=" " /><description id="asf-variablemodedesc2" >&asf.variablemode2.label;</description></hbox>
+ <hbox><description value=" " /><description id="asf-variablemodedesc3" >&asf.variablemode3.label;</description></hbox>
+ <hbox flex="1">
+ <description value=" " />
+ <groupbox flex="1" style="padding:0px !important;">
+ <caption label="&asf.variables.label;"/>
+ <iframe flex="1" id="iframe_tab" class="plain" style="padding:0px !important; background-color:transparent; min-height:123px;"
+ src="chrome://asf/locale/variables.html"
+ />
+ </groupbox>
+ </hbox>
+ </groupbox>
+ </vbox>
+ <vbox id="asf-tab-informations" hidden="true" flex="1000" >
+ <groupbox id="asf-informations" flex="1" >
+ <caption label="&asf.info.title;"/>
+ <iframe flex="1" id="iframe_info" class="plain" style="background-color:#FFFFFF; min-height:305px;"
+ width="580"
+ src="chrome://asf/locale/info.html"
+ />
+ </groupbox>
+ </vbox>
+</prefpane>
+</prefwindow>
\ No newline at end of file
diff --git a/content/overlay_preferences.xul b/content/overlay_preferences.xul
new file mode 100644
index 0000000..d81e242
--- /dev/null
+++ b/content/overlay_preferences.xul
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- ***** BEGIN LICENSE BLOCK *****
+ Copyright 2007-2009 Eric Cassar (Cyan)
+
+ This file is part of "Automatic Save Folder".
+ You may find the license in the LICENSE file
+
+ ***** END LICENSE BLOCK ***** -->
+<?xml-stylesheet href="chrome://asf/skin/overlay.css" type="text/css"?>
+<!DOCTYPE overlay SYSTEM "chrome://asf/locale/asf.dtd">
+<overlay id="asf-overlay-preferences"
+ xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+
+ <menupopup id="menu_ToolsPopup">
+ <menuitem insertafter="sanitizeItem" id="asf-option" label="&asf.label;"
+ oncommand="window.openDialog('chrome://asf/content/options.xul','Automatic_Save_Folder_Preferences','chrome,centerscreen,resizable=yes, dialog=no');" />
+ </menupopup>
+</overlay>
diff --git a/content/overlay_unknownContentType.xul b/content/overlay_unknownContentType.xul
new file mode 100644
index 0000000..0abdac0
--- /dev/null
+++ b/content/overlay_unknownContentType.xul
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- ***** BEGIN LICENSE BLOCK *****
+ Copyright 2007-2009 Eric Cassar (Cyan)
+
+ This file is part of "Automatic Save Folder".
+ You may find the license in the LICENSE file
+
+ ***** END LICENSE BLOCK ***** -->
+<?xml-stylesheet href="chrome://asf/skin/overlay.css" type="text/css"?>
+<!DOCTYPE overlay SYSTEM "chrome://asf/locale/asf.dtd">
+<overlay id="asf-overlay-download"
+ xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+
+<script type="application/x-javascript" src="chrome://asf/content/asf_download.js" />
+
+<vbox id="container">
+
+ <groupbox id="asf_dloptions" style="visibility: collapse;" flex="1">
+ <caption label="Automatic Save Folder"/>
+ <vbox>
+ <radiogroup id="asf_radio_savepath" align="left">
+ <radio id="asf_savefolder" value="0" width="280" crop="center" label="folder" class="small-indent" oncommand="automatic_save_folder.asf_toggle_savepath()"/>
+ <radio id="asf_lastpath" value="1" width="280" crop="center" label="folder" class="small-indent" oncommand="automatic_save_folder.asf_toggle_savepath()"/>
+ <vbox id="asf_radiogroup_pathselect" style="visibility: collapse;">
+ <radio id="asf_pathselect" value="2" width="280" crop="center" label="&asf.pathselect.label;" class="small-indent" oncommand="automatic_save_folder.asf_toggle_savepath()"/>
+ <hbox>
+ <description value=" "/><menulist id="asf_folder_list" width="280">
+ </menulist>
+ </hbox>
+ </vbox>
+ </radiogroup>
+ <separator class="thin"/>
+ <hbox>
+ <image src="chrome://asf/skin/add.png" onclick="window.openDialog('chrome://asf/content/options.xul','asf_option','chrome, centerscreen, resizable=yes, dialog=no, modal=no');" />
+ <description onclick="window.openDialog('chrome://asf/content/options.xul','asf_option','chrome, centerscreen, resizable=yes, dialog=no, modal=no');">&asf.addedit.label;</description>
+ </hbox>
+ </vbox>
+
+ </groupbox>
+</vbox>
+</overlay>
\ No newline at end of file
diff --git a/content/regexp.xul b/content/regexp.xul
new file mode 100644
index 0000000..d315ee8
--- /dev/null
+++ b/content/regexp.xul
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- ***** BEGIN LICENSE BLOCK *****
+ Copyright 2007-2009 Eric Cassar (Cyan)
+
+ This file is part of "Automatic Save Folder".
+ You may find the license in the LICENSE file
+
+ ***** END LICENSE BLOCK ***** -->
+<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
+<!DOCTYPE dialog SYSTEM "chrome://asf/locale/asf.dtd">
+
+<dialog flex="1000" title="&asf.info.title;"
+ orient="vertical"
+ buttons="accept"
+ ondialogaccept="window.opener.focus;window.close();"
+ xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+<groupbox flex="1" >
+ <caption label="&asf.regexp.label;"/>
+
+ <iframe flex="1" id="mytextbox" class="plain" style="background-color:#FFFFFF; min-height:300px;"
+ width="580"
+ src="chrome://asf/locale/regexp.html"
+ />
+</groupbox>
+</dialog>
\ No newline at end of file
diff --git a/defaults/preferences/asf.js b/defaults/preferences/asf.js
new file mode 100644
index 0000000..717efd1
--- /dev/null
+++ b/defaults/preferences/asf.js
@@ -0,0 +1,16 @@
+ pref("extensions.asf.lastdir", true);
+ pref("extensions.asf.keeptemp", true);
+ pref("extensions.asf.viewdloption", false);
+ pref("extensions.asf.viewpathselect", false);
+ pref("extensions.asf.savetype", 0);
+ pref("extensions.asf.defaultfolder", "");
+ pref("extensions.asf.tempdomain", "");
+ pref("extensions.asf.filtersNumber", 0);
+ pref("extensions.asf.lastpath", "");
+ pref("extensions.asf.variablemode", false);
+// See http://kb.mozillazine.org/Localize_extension_descriptions
+pref("extensions.asf at mangaheart.org.description", "chrome://asf/locale/asf.properties");
+// See http://developer.mozilla.org/En/Download_Manager_preferences or http://kb.mozillazine.org/About:config_entries
+// it make automatic saving to the right folder - 0= desktop, 1= system download dir, 2= user define
+// does only affect the user if useDownloadDir = true ---- if "always ask the destination folder" is selected in FF options, it has no effect on the user.
+ pref("browser.download.folderList", 2);
\ No newline at end of file
diff --git a/install.rdf b/install.rdf
new file mode 100644
index 0000000..0ea4bf6
--- /dev/null
+++ b/install.rdf
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:em="http://www.mozilla.org/2004/em-rdf#">
+ <Description about="urn:mozilla:install-manifest">
+ <em:id>asf at mangaheart.org</em:id>
+ <em:name>Automatic Save Folder</em:name>
+ <em:version>0.9.3</em:version>
+ <em:type>2</em:type>
+
+ <em:localized>
+ <Description>
+ <em:locale>fr</em:locale>
+ <em:name>Automatic Save Folder</em:name>
+ <em:description>Sélectionne automatiquement le dossier d'enregistrement suivant le nom du fichier et le site d'hébergement.</em:description>
+ </Description>
+ </em:localized>
+ <em:localized>
+ <Description>
+ <em:locale>en</em:locale>
+ <em:name>Automatic Save Folder</em:name>
+ <em:description>Automatically select the destination folder for your download, matching the filename and domain.</em:description>
+ </Description>
+ </em:localized>
+ <em:localized>
+ <Description>
+ <em:locale>it</em:locale>
+ <em:name>Automatic Save Folder</em:name>
+ <em:description>Seleziona automaticamente la cartella di destinazione dei tuoi download, in base al nome del file e dominio.</em:description>
+ </Description>
+ </em:localized>
+
+ <em:description>Automatically select the destination folder for your download, matching the filename and domain.</em:description>
+
+ <em:homepageURL>http://asf.mangaheart.org</em:homepageURL>
+
+ <em:creator>Cyan</em:creator>
+ <em:translator>Cyan</em:translator>
+ <em:translator>Scognito</em:translator>
+ <em:contributor>GoofyFr</em:contributor>
+ <em:contributor>Haynee</em:contributor>
+ <em:contributor>Carsten</em:contributor>
+
+
+ <em:aboutURL>chrome://asf/content/about.xul</em:aboutURL>
+ <em:optionsURL>chrome://asf/content/options.xul</em:optionsURL>
+ <em:iconURL>chrome://asf/skin/asf-icon.png</em:iconURL>
+
+ <em:targetApplication>
+ <Description>
+ <em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id> <!-- firefox -->
+ <em:minVersion>1.5</em:minVersion>
+ <em:maxVersion>3.5.*</em:maxVersion>
+ </Description>
+ </em:targetApplication>
+ </Description>
+</RDF>
\ No newline at end of file
diff --git a/locale/en-US/about.dtd b/locale/en-US/about.dtd
new file mode 100644
index 0000000..0f72106
--- /dev/null
+++ b/locale/en-US/about.dtd
@@ -0,0 +1,8 @@
+<!ENTITY about "About Automatic Save Folder">
+<!ENTITY version "Version: 0.9.3">
+<!ENTITY createdBy "Created By:">
+<!ENTITY createdBy.name "Cyan (CASSAR Éric)">
+<!ENTITY contributor "Thanks:">
+<!ENTITY contributor.name "Thank you to everyone who helped and left comments">
+<!ENTITY contributor2.name "on various websites to make this add-on better">
+<!ENTITY homepage "Home Pages:">
\ No newline at end of file
diff --git a/locale/en-US/asf.dtd b/locale/en-US/asf.dtd
new file mode 100644
index 0000000..1bfe900
--- /dev/null
+++ b/locale/en-US/asf.dtd
@@ -0,0 +1,81 @@
+<!-- ASF -->
+<!ENTITY asf.version "0.9.3">
+
+<!-- browser and save dialog-->
+<!ENTITY prefwindow.title "Automatic Save Folder Preferences">
+<!ENTITY asf.label "Automatic Save Folder...">
+<!ENTITY asf.addedit.label "Add or edit a filter">
+<!ENTITY asf.pathselect.label "Available filter's path:">
+
+<!-- Filters tab - top -->
+<!ENTITY asf.filters.label "Filters">
+<!ENTITY asf.tree.column.domain "Domain">
+<!ENTITY asf.tree.column.filename "File name">
+<!ENTITY asf.tree.column.localfolder "Local folder">
+<!ENTITY asf.tree.column.enabled "Active">
+<!ENTITY asf.options.move.up "">
+<!ENTITY asf.options.move.down "">
+<!ENTITY asf.options.edit "Edit">
+<!ENTITY asf.options.delete "">
+<!ENTITY asf.options.add "">
+
+<!-- Filters tab - bottom -->
+<!ENTITY asf.lastdir.bool "Affect the folder for the 'save as...' command when a filter matches">
+<!ENTITY asf.default.label "If the file doesn't match any filter, save to:">
+<!ENTITY asf.lastselected.label "The last folder">
+<!ENTITY asf.defaultfolder.label "This folder: ">
+<!ENTITY asf.selectfolder.label "Select...">
+<!ENTITY asf.keeptemp.label "Use the last folder if the file is from the same hosted domain than the previously downloaded file.">
+
+<!-- preference file pickup -->
+<!ENTITY asf.selectfolder.pickup "Select the default folder if no filter is found">
+
+<!-- popup -->
+<!ENTITY asf.top.popup "Move to Top">
+<!ENTITY asf.copy.popup "Duplicate">
+<!ENTITY asf.delete.popup "Delete">
+<!ENTITY asf.bottom.popup "Move to Bottom">
+
+<!-- Options tab -->
+<!ENTITY asf.options.label "Options">
+<!ENTITY asf.viewdloption.bool "View options when downloading">
+<!ENTITY asf.viewdloption.label "Allow you to see the last two destination folders and a link to add or edit the filters">
+<!ENTITY asf.viewpathselect.bool "View the filter's list">
+<!ENTITY asf.viewpathselect.label "Activate a menulist with all the filter's path.">
+<!ENTITY asf.variablemode.bool "Advanced mode :">
+<!ENTITY asf.variablemode1.label "Allow you to edit the filters saving path manually and add dynamic variables, like the date of the day ">
+<!ENTITY asf.variablemode2.label "or the file name.">
+<!ENTITY asf.variablemode3.label "Note : Attention to uppercase and lowercase.">
+<!ENTITY asf.variables.label "Tags list :">
+
+<!-- About tab-->
+<!ENTITY asf.info.label "About...">
+<!ENTITY asf.info.title "Automatic Save Folder">
+
+<!-- preference add & edit-->
+<!ENTITY buttonlabelextra1 "OK">
+<!ENTITY asf.add.title "Add a new filter">
+<!ENTITY asf.edit.title "Edit a filter">
+<!ENTITY asf.addedit.filter.label "Filters">
+<!ENTITY asf.addedit.help.label "Help">
+<!ENTITY asf.addedit.domain.label "Domain">
+<!ENTITY asf.addedit.filename.label "file name">
+<!ENTITY asf.addedit.folder.label "Local Folder">
+<!ENTITY asf.addedit.regexp "Regexp">
+<!ENTITY asf.addedit.all "All">
+<!ENTITY asf.addedit.regexp.exemple "Examples of regular expressions : ">
+<!ENTITY asf.addedit.regexphelp.label "Regexp help">
+
+<!ENTITY asf.addedit.inforegexp1 "The filters can be :">
+<!ENTITY asf.addedit.inforegexp2 "Defined : file_to_download.zip">
+<!ENTITY asf.addedit.inforegexp3 "Partial or wildcarded : file*.zip">
+<!ENTITY asf.addedit.inforegexp4 "Regexp. : .*(.rar|.zip)$">
+
+<!ENTITY asf.addedit.nodata.domain "The domain is empty. Please choose 'all' or enter filter for the domain">
+<!ENTITY asf.addedit.nodata.filename "The filename is empty. Please choose 'all' or enter a filter for the filename">
+<!ENTITY asf.addedit.nodata.folder "The folder is empty. Please select a destination folder for this filter">
+
+<!-- Regular expression Help dialog -->
+<!ENTITY asf.regexp.title "Regular Expressions">
+<!ENTITY asf.regexp.label "Help and examples :">
+
diff --git a/locale/en-US/asf.properties b/locale/en-US/asf.properties
new file mode 100644
index 0000000..8db50cb
--- /dev/null
+++ b/locale/en-US/asf.properties
@@ -0,0 +1 @@
+extensions.asf at mangaheart.org.description=Automatically select the destination folder for your download, matching the filename and domain.
\ No newline at end of file
diff --git a/locale/en-US/info.html b/locale/en-US/info.html
new file mode 100644
index 0000000..f3eda81
--- /dev/null
+++ b/locale/en-US/info.html
@@ -0,0 +1,300 @@
+<html>
+<!-- ***** BEGIN LICENSE BLOCK *****
+ Copyright 2007-2009 Eric Cassar (Cyan)
+
+ This file is part of "Automatic Save Folder".
+ You may find the license in the LICENSE file
+
+ ***** END LICENSE BLOCK ***** -->
+<body style="background-color:#FFFFFF;">
+<center><font size="+1"><b>Automatic Save Folder V0.9.3</b></font></center>
+<center>by Cyan</center>
+<br /><b><u>Important</u></b>:
+<br />
+<br />This extension only works if the download window is shown (the one asking you to open, execute or save the file to the disk)
+<br/><img src="chrome://asf/skin/screen_save_80fr.png" />
+<br />If Firefox doesn't show this window, the extension will not work.
+<br />
+<br />
+<br />If some filters don't work, be sure to check if Firefox doesn't use another process on the downloaded file:
+<br />
+<br />1.
+<br /> Go to the menu "Tools" and "Options...".
+<br />2.
+<br /> - For the Firefox 3 users: go to the "Applications" tab
+<br /> - For the previous Firefox versions users: Go to the "Content" tab and click on the "manage..." at the bottom right.
+<br />3.
+<br /> Verify if the File Type you want to download is set to "Always ask".
+<br /><img src="chrome://asf/skin/screen_apps_fr.png" />
+<br />
+<br />
+<br />
+<br />
+<br />
+<br />
+<br /><b><u>How to use</u></b>:
+<br />
+<br />
+<br />This extension allows you to define, using filters, the folder which will be automatically chosen while saving your files.
+<br />
+<br /><u>Filter rules</u>:
+<br />- The filters are defined using the file's name and the domain.
+<br />Attention: For the domain do not enter the address of the current website, but the server address where the file is located. (update from 0.9.3 : test with referer adress)
+<br />- The filters have to match the name of the file or the domain. For example do not write <b>"google.com"</b> but only <b>google.com</b> (without quotes)
+<br />- You can use the wildcard character <b>*</b> (asterisk) to replace parts of the filter: <b>wiki*.org</b>
+<br />- The asterisk is not needed at the beginning and end of the filter string. Writing <b>*wiki*</b> or <b>wiki</b> is the same.
+<br />- Same thing with the filename filter: <b>*.zip</b> or <b>.zip</b> will work the same way.
+<br />- The filters are verified from top to bottom and the process stops when a filter matching the downloaded file is met. Be sure to sort your filters accordingly.
+<br />- The filters are case insensitive, there is no difference between upper and lower case while the filters are processed.
+<br />
+<br />
+<br />This extension can be used with regular expressions.
+<br />You can read the regular expression help menu on the filter adding and editing window.
+<br />
+<br />
+<br />Dynamic variables are available to create new folders when saving, named after the date of the day, the file name or domain name.
+<br />You can refer to the option tab to see the dynamic tag list.
+<br />
+<br />
+<br />
+<br /><u>Few filters examples</u>:
+<br />
+<br />If you want all your executable files <b>.exe</b> to be saved in a specific folder:
+<br />- <b>domain</b>: all
+<br />- <b>filter</b>: .exe
+<br />- <b>folder</b>: your executable files folder
+<br />
+<br />
+<br />Now if you want all the files from a particular website (mozilla.org for example) to be saved in a Mozilla folder:
+<br />- <b>domain</b>: mozilla.org
+<br />- <b>filter</b>: all
+<br />- <b>folder</b>: your Mozilla folder
+<br />
+<br />
+<br />Then, if you need to sort all zipped file-type <b>.zip</b> from mozilla.org, and leaves other files in the previous folder:
+<br />- <b>domain</b>: mozilla
+<br />- <b>filter</b>: .zip
+<br />- <b>folder</b>: your Mozilla folder for .zip files
+<br />And sort this filter above the previous one. Do remember the filters are verified from top to bottom.
+<br />
+<br />
+<br />And last, you can define filters with more complete name, not only with the file extension:
+<br />- <b>domain</b>: all
+<br />- <b>filter</b>: firefox*.exe
+<br />- <b>folder</b>: your folder for all version of Firefox installation program
+<br />
+<br />
+<br /><u>Here are a few examples with simple and complex variables</u> :
+<br />
+<br />To sort out all the nightly builds of firefox in a subfolder of D:\firefox :
+<br />- <b>domain</b> : All
+<br />- <b>filter</b> : firefox*pre
+<br />- <b>folder</b> : D:\firefox\Nightly\%Y%-%m%-%d%
+<br />The extension will create a subfolder named after the date of the day. For example "2009-12-04", in which your file will be saved.
+<br />
+<br />
+<br />To sort out a file according to its extension :
+<br />- <b>domain</b> : All
+<br />- <b>filter</b> : All
+<br />- <b>folder</b> : D:\download\%asf_x%
+<br />The extension will create a subfolder named "zip" for the .zip files, "rar" for .rar files, etc. in which your file will be saved.
+<br />
+<br />
+<br />To create or not create different subdirectories according to the file :
+<br />
+<br />Example : We wish to download videos named "My_vacation_date-of-the-trip.avi".
+<br />The videos have .srt subtitles to explain the trip,
+.zip files are also available with photos of the trip,
+videos can be downloaded with .avi, .torrent or .nzb extension (newsgroup).
+<br />
+<br />".avi" and ".srt" will have to go in the D:\video\vacation file.
+<br />".zip", ".torrent" and ".nzb" will have to go respectively in subdirectories D:\video\vacation\zip, D:\video\vacation\torrent and D:\video\vacation\nzb.
+<br />
+<br />- <b>domain</b> : all
+<br />- <b>filter</b> : /^My_vacation.*\.(avi|srt|zip|torrent|nzb)$/
+<br />- <b>folder</b> : D:\video\vacation\%asf_rf%(zip|torrent|nzb)$%asf_rf%
+<br />
+<br />Explanation about the filters :
+<br />The filter will be activated for all the files beginning by "My_vacation" and ending with one of the available extensions (avi, srt, zip, torrent or nzb).
+<br />The directory created will depend on the filtering : %asf_rf% analyses the name of the file downloaded with the regular expression contained between the two %asf_rf% : If the file ends with "zip", "torrent" or "nzb", the portion captured by the regular expression creates the subdirectory.
+<br />If none of those three extensions are found, the regular expression won't do anything, no subfolder is created and files will be downloaded in D:\video\vacation\
+<br />
+<br />Note : You can put as many tags as you want for the main folder.
+<br />The filter could have been :
+<br />- <b>filter</b> : /.*\.(avi|srt|zip|torrent|nzb)$/
+<br />- <b>folder</b> : D:\video\%asf_rf%(vacation|wedding)%asf_rf%\%asf_rf%(zip|torrent|nzb)$%asf_rf%
+<br />In this case, the subfolder "vacation" is created only if the name of the file contains "vacation".
+<br />
+<br />
+<br />
+<br />
+<br /><b><u>Known problems</u></b>:
+<br />
+<br />- For some users, ASF only suggest the default folder instead of the filter's folder.
+<br />Not enough user's comments to understand what this problem is.
+<br />Please contact the author if you have this bug and you want to help to correct it.
+<br />
+<br />- If your filters contained unicode characters in previous version (less than 0.9.3), the filter's path may appear blank, but working.
+<br />Please, edit the filters and define again your path manually.
+<br />
+<br />- The domain filtering is now done on the referer URL if the file hosted domain doesn't match the filter.
+<br />It can generate problems on the filter validation when the user doesn't attempt to validate it.
+<br />if this problem happen, I'll delete this option (Please leave comments on this option: useful or bothering ?).
+<br />
+<br />
+<br />
+<br /><b><u>To do</u></b>:
+<br />
+<br />I'm looking for help with this:
+<br />- Enable filter while using right-click menu "Save target as..." and "Save picture as...".
+<br />
+<br />You can contact me if you want to help or have any suggestions:
+<br />http://asf.mangaheart.org
+<br />or
+<br />https://addons.mozilla.org/fr/firefox/addon/4781
+<br />
+<br />
+<br />
+<br /><b><u>History</u></b>:
+<br />
+<br /><pre>
+
++ added
+- removed
+* fixed or changed
+
+
+Version 0.9.3: (2009 07 05)
++ Added the version number in the main config window title.
++ Add option to double click a Path field to open the explorer window.
++ New tabs to separate filters, options, help and versions history.
++ New dynamic variable to create folders. (Thanks to Ted for the group capture with $1)
++ Option to activate or deactivate the dynamic variables (Advanced mode).
++ New context menu on the filter list to duplicate a filter, or move to top/bottom in one click.
++ [Experimental] For ease to use when the hosted domain is random (ex. to donwload firefox on mozilla.org):
+ Check the filter with the current URI if the hosted domain file doesn't match.
+ Attention to the filtering order : First the file hosted domain is checked, then the current website address.
+ The data used to mark a domain as "previous" is still the one from the file hosted domain.
++ Limit the saving window width to the user main screen size. (Thanks to Julien)
++ Add an option to show a menu list on the saving window to select the saving folder from the filter's list.
+* Correction for unicode path (filters using unicode character in version 0.9.2 might be deleted, please rewrite them manually).
+* Correction of the editable parametter of new created filters.
+* Changed the way the links in the "about..." window works. Now it will open in a new tab.
+* Bigger menu and window for better visibility.
+* Code simplification for moving filters up/down.
+* Code simplification for the loading and auto-filling data in the "add" window.
+* Better visibility : All the windows are now dragable and the content fit accordingly.
+* Bug correction preventing the loading and reading of undefine or non existing preferences in about:config. (Thanks to Martin)
+* Complete script recoding to Global namespace (asked by Mozilla.com to submit the extension in public area)
+* cleaner code and comments.
+
+
+Version 0.9.2: (2009 01 26)
+* Correction for Vista: Forced the variable browser.download.folderList to "2" when openning the ASF preferences window.
+* Corrected the "active" column, the filters couldn't be activated or deactivated temporarily.
+* Compatibility with Themes: The default colors are now used, all the text should be correctly visible.
+ The pictures have been updated to be visible on dark themes.
+* Edited between 0.9.2 and 0.9.3: Firefox 3.1b2, 3.1b3, 3.5b4
+
+
+Version 0.9.1: (2008 11 01)
++ Italian localisation by Scognito.
++ Added a radio menu while saving, allowing the user to choose quickly between the last two folders.
+ The second choice appears only if it's different from the first one.
+* Corrected a script bug on filter verification while "use the last folder" was selected. (Thanks to Carsten)
+* Hide the option "Affect the 'save as...'" on Firefox 3, this option is used automaticaly.
+* Removed the "Add a filter" popup while saving. It made some focus problem and a window position error.
+ The link is still here and open now the main window to allow the user to add or edit existing filters.
+ While adding a filter using this link, the field will be auto-filled with current file name and domain.
+* Fixed a bug on Firefox 3 and Windows Vista: Changed an internal Firefox option allowing the user to use defined folders. (Thanks to Carsten)
+ (browser.download.folderList = 2) On Windows Vista, the default value is set to 1.
+ Different possible values are : 0 = desktop ; 1 = default saving folder ; 2 = user choice.
+* Fixed the specified path on the saving windows on Firefox3.
+* Fixed the double-cliking on filters. Now the fields are not editable on firefox3.
+
+
+
+Version 0.9.0: (2008 06 28)
++ Work with Firefox 3.0.*
++ Added a new button for informations and help on using the extension.
++ New menu allowing you to add a filter just before saving the file, with Domain and file areas filled with the current download properties.
+ After adding a filter that way, the filters are checked again to apply the new filter to the current downloaded file.
+ Known bug: A window focus problem can occur while closing the filter panel.
+- Drop of the option to activate or deactivate the extension. To deactivate it temporarily, please use the extension manager.
+* New way to check the filters (addEventlistener instead of OnLoad), for a better compatibility with other extensions.
+* Corrected the per filter "Active" column properties which didn't stay hidden correctly.
+
+
+Version 0.8.7: (2008 01 06)
++ ... version for Windows and Linux (and maybe Mac ? Can someone test it please ?)
++ Compatible with Firefox 3.0 beta (few changes to the script).
+* The Enter key is now affected to the accept button (Ok, Add, Edit). On the previous version, it was on the Cancel button.
+
+
+Version 0.8.6 - Linux fix: (2008 01 04)
+* Changes on the "OK" buttons which didn't appear in the main option panel in Linux.
+Info:
+On linux, there is only a "Close" button and the checking button are saved automatically when checked by the user. Unfortunately the Table array is not saved on this process.
+I removed the "Accept" button and replaced it with a scripted one "Save and close".
+
+
+Version 0.8.6: (2007 07 09)
+* Words and sentences correction. Thanks to Goofy from Mozilla.org comment.
+
+
+Version 0.8.5: (2007 04 01)
++ Added an option to show some informations on the downloading window.
++ Added an option to keep in memory the domain the file came from.
+* Default folder is now working even if no filter is set.
+* Changed the way the Regular expressions help window is shown. Use of an Iframe and an html page instead of Xul's dtd
+
+
+Version 0.8.4: (2007 02 24)
++ French translation
+* Converted the localisation files to utf-8.
+
+
+Version 0.8.3: (2007 02 17)
++ Added some examples and short help on how regular expressions are working. Available in the Add & Edit filter window.
+
+
+Version 0.8.2:(2007 02 15)
+First public release.
++ Added an option to affect the path of the Web page saving menu (File, save as...)
+
+
+Version 0.8.1:
+* Folder selection: The picking window opens now on the previously choosed folder. Before, it opened on a random one from: documents and settings, desktop et the user folder.
+* Restriction of the folder selection: removed the possibility to write the path manually, now only the "Select..." button is valid to select the destination folder.
+
+
+Version 0.8.0:
+Functions:
++ Priority sorting filter (option to move up or down the filters)
++ Work with normal, wildcard, and RegExp. filters.
++ Select folder manually or with a Select button.
++ Edit a filter with Double-click on the filters in the list.
++ Skin of the GUI with pictures.
+</pre>
+<br />
+<br />
+<br />
+<br />
+<br /><b><u>Thanks to</u></b>:
+<br />
+<br />- Goofy, Haynee: Read and corrected french and english.
+<br />- MrCOLOMBO: Thanks for the ideas, but I had to use current menu with popup to keep security checking.
+<br />- Photonic: Pointing the problem with the Firefox "Applications" menu :)
+<br />- Carsten: Help with a script error and a Firefox option on Windows Vista making the filters not working.
+<br />- Martin: Help with finding the bug when reading a Firefox preference not set or empty.
+<br />- Ted Gifford: Script modification allowing group capture in dynamic variables.
+<br />
+<br />
+<br /><b><u>Translators</u></b>:
+<br />- English : Cyan.
+<br />- French : Cyan.
+<br />- Italian : Scognito.
+<br />
+<br />
+</body>
+</html>
diff --git a/locale/en-US/regexp.html b/locale/en-US/regexp.html
new file mode 100644
index 0000000..d0299a6
--- /dev/null
+++ b/locale/en-US/regexp.html
@@ -0,0 +1,144 @@
+<html>
+<!-- ***** BEGIN LICENSE BLOCK *****
+ Copyright 2007-2009 Eric Cassar (Cyan)
+
+ This file is part of "Automatic Save Folder".
+ You may find the license in the LICENSE file
+
+ ***** END LICENSE BLOCK ***** -->
+<body style="background-color:#FFFFFF;">
+
+The Regular Expression (Reg. exp., or Regexp) is a matching method to define many filters in one line.
+<br />
+<br />With the Regexp you can filter filename or domain that would be difficult to filter with the usual asterisk '*'.
+<br />
+<br /><b>Note 1</b> : All the filters are case insensitive.
+<br /><b>Note 2</b> : The regexp in this plugin needs to be capture inside a / / statement. All the examples below are writen without the / / at the beginning and the end of the filters in order to be easily readable. When you check the checkbox 'regexp' in the filter window, the / / will be added automatically.
+<br />
+<br />
+<br />To define the filters, there are specials characters to know :
+<br />
+<br /><b><u>Special character</u></b> : .
+<br />The dot . replaces any 1 character (a letter, number or space). g..gle matches google and any other word starting with 'g' followed by 2 characters and finishing with 'gle'.
+<br />
+<br />
+<br /><b><u>Special character</u></b> : *
+<br />the * repeats the last character (.* matches any string = many time 1 character)
+<br />
+<br />
+<br /><b><u>Special character</u></b> : ^
+<br />^ means beginning of the string (^http only matches first occurence. good on http://test.com not good in ftp://http_test.com)
+<br />
+<br />
+<br /><b><u>Special character</u></b> : $
+<br />$ means end of the string ( com$ matches ending occurence. good in http://test.com and not good in http://computer.net)
+<br />
+<br />
+<br /><b><u>Special character</u></b> : { }
+<br />{x} matches any character x time, example tor{2}ent = torrent (check for 2 'r')
+<br />
+<br />
+<br /><b><u>Special character</u></b> : \
+<br />\d matches any decimal (number)
+<br />\s matches any whitespace character (space, tab, etc.)
+<br />\w matches any word
+<br />\b matches any word boundary ( \barc\b = only the word arc, not the arc in parc, nor the arc in arctic)
+<br />\uFFFF with FFFF = hexadecimal code, matches the unicode character from the hexadecimal code. example \u00E0 matches à
+<br />
+<br />
+<br /><b><u>Special character</u></b> : ?
+<br />? matches if the character is present or not : mpeg files can be .mpg or .mpeg, the regexp would be mpe?g
+<br />Nov(ember)? will matche Nov or November
+<br />
+<br />
+<br /><b><u>Special character</u></b> : ( ) and |
+<br />The parenthesis and pipe (aaaa|bbbb|cccc) can capture any matching character either aaaa or bbbb or cccc etc.
+<br />
+<br />
+<br /><b><u>Special character</u></b> : [ ]
+<br />The bracket [ ] is useful to define a match for many characters. r[aio]se matches the words rase, rise and rose.
+<br />The minus - in the bracket defines a range of characters :
+<br />[a-z] meanse any characters from a to z. r[a-z]se matches rase, rbse, rcse, ..., rzse.
+<br />
+<br />You can use many - in the same bracket [a-zA-Z] to match all alphabetic characters. [a-zA-Z0-9] to match all alphanumerics
+<br />[a-cn-o] to match any letters from a to c and from n to o.
+<br />[-a-z] to match - (minus) and a to z.
+<br />
+<br />
+<br />The bracket only correspond to one letter.
+<br />To define an option on several letters :
+<br />t[se]*t
+<br />Corresponds as much as 'tet' or 'tst' or 'test' or 'tset', or finally 'tessst'
+<br />t[es]{0,2}
+<br />Corresponds to t, te, ts, tee, tss, tes, tse
+<br />
+<br />
+<br />
+<br />You need to escape the above characters if you use it in a filter. domain.com become domain\.com
+<br />
+<br />\ -> \\ . -> \. * -> \* ? -> \? ^ -> \^
+<br />$ -> \$ ( -> \( ) -> \) { -> \{ } -> \}
+<br />[ -> \[ ] -> \] / -> \/
+<br />
+<br />
+<br />
+<br />
+<br />There are many more filtering methods and possibilities that cannot be explained here.
+<br />You can read this documentation : http://www.regular-expressions.info/tutorial.html
+<br />Or this one for beginners : http://www.javascriptkit.com/jsref/regexp.shtml
+<br />
+<br />
+<br />
+<br /><b><u>Some examples</u></b> :
+<br />
+<br />To match any .rar and .r01 .rxx files :
+<br /> r(ar|\d{2}) means r + ar, or r + 2 decimals
+<br />
+<br />To match any http in .com :
+<br />^http.*\.com$
+<br />
+<br />To match a domain, regardless if there is www or not in the path :
+<br /> ^http:\/\/(|www\.)domain\.com
+<br />
+<br />
+<br />
+<br />
+<br /><b><u>Filter examples on filenames</u></b> :
+<br />
+<br />To filter all the archive files :
+<br />.*\.(z(ip|\d{2})|r(ar|\d{2})|jar|bz2|gz|tar|rpm|7z)$
+<br />
+<br />Filter all the images :
+<br />.*\.(jpe?g|jpe|gif|png|tiff?|bmp|ico)$
+<br />
+<br />To filter all the videos :
+<br />.*\.(mp(eg?|[g4])|rm|avi|mov|mkv|divx|asf|qt|wmv|ram|m1v|m2v|rv|vob|asx|og(g|v)|flv)$
+<br />
+<br />
+<br />
+<br />
+<br /><b><u>Filter examples on domains</u></b> :
+<br />
+<br />Filter all the ftp protocol
+<br />regexp : ^ftp:\/\/.*
+<br />non regexp : ftp://*
+<br />
+<br />filter on a particular domain
+<br />regexp : ^http:\/\/(|www\.)domain\.com$
+<br />non regexp : http://*domain.com
+<br />(but with non regexp, it will matches http://domain.com, http://www.domain.com, but will also matches http://the.bad.domain.com)
+<br />
+<br />
+<br />to match any domain with 'oogle' in it :
+<br />regexp : .*oogle.*
+<br />non regexp : *oogle*
+<br />
+<br />
+<br />
+<br />
+<br /><b><u>Conclusion</u></b> :
+<br />Regular expressions permit a better use of filters, but it can be sometimes much more faster to use simple widlcard *.
+<br />Regular expressions are useful only on complex matching.
+<br />
+</body>
+</html>
\ No newline at end of file
diff --git a/locale/en-US/variables.html b/locale/en-US/variables.html
new file mode 100644
index 0000000..c053656
--- /dev/null
+++ b/locale/en-US/variables.html
@@ -0,0 +1,82 @@
+<html>
+<!-- ***** BEGIN LICENSE BLOCK *****
+ Copyright 2007-2009 Eric Cassar (Cyan)
+
+ This file is part of "Automatic Save Folder".
+ You may find the license in the LICENSE file
+
+ ***** END LICENSE BLOCK ***** -->
+<body>
+<table border="0" style="font-size:12px; margin-top:0px;">
+ <tr>
+ <td align="left" valign="top">
+ <u style="font-size:15px">Year</u><br/>
+ <b>%Y%</b> = 2009, 2012<br/>
+ <b>%y%</b> = 09, 12<br/>
+
+ </td>
+ <td align="left" valign="top">
+ <u style="font-size:15px">Month</u><br/>
+ <b>%m%</b> = 01 to 12<br/>
+ <b>%n%</b> = 1 to 12<br/>
+ </td>
+ <td align="left" valign="top">
+ <u style="font-size:15px">Day</u> :<br/>
+ <b>%d%</b> = 01 to 31<br/>
+ <b>%j%</b> = 1 to 31<br/>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="3" valign="top">
+ <br/>
+ <u style="font-size:15px">Special tags</u> :<br/>
+ <table style="font-size:12px;">
+ <tr>
+ <td valign="top"><b>%asf_D%</b></td><td>= Domain name. (Without http://)</td>
+ </tr>
+ <tr>
+ <td valign="top"><b>%asf_F%</b></td><td>= File name with the extension.</td>
+ </tr>
+ <tr>
+ <td valign="top"><b>%asf_Fx%</b></td><td>= File name without the extension.</td>
+ </tr>
+ <tr>
+ <td valign="top"><b>%asf_d%</b></td><td>= "Domain" field from the filter used. (Forbidden characters will be deleted. If no filter is found, the current domain is used)</td>
+ </tr>
+ <tr>
+ <td valign="top"><b>%asf_f%</b></td><td>= "File name" field from the filter used. (Forbidden characters will be deleted. If no filter is found, the current file name is used)</td>
+ </tr>
+ <tr>
+ <td valign="top"><b>%asf_x%</b></td><td>= File extension. (Without the dot)</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="3" valign="top">
+ <br/>
+ <u style="font-size:15px">capture tags</u> :<br/>
+
+ <b>$<number>d</b> = Return the captured data using parentheses in the "domain" filter. <number> refer to the parenthesis number, from 1 to 9.
+ <br/>
+ <br/>
+ <b>$<number>f</b> = Return the captured data using parentheses in the "file name" filter. <number> refer to the parenthesis number, from 1 to 9.
+ <br/>Example, on this filter: mozilla_(firefox)_3.5.(exe), <b>$1f</b> will capture firefox, and <b>$2f</b> will capture "exe".
+ <br/>
+ <br/>
+ <b>%asf_rd%</b><u>regular expression</u><b>%asf_rd%</b><br/>
+ Check the full domain with the regular expression contained between the two tags <b>%asf_rd%</b> and return the captured data.
+ <br/>
+ <br/>
+ <b>%asf_rf%</b><u>regular expression</u><b>%asf_rf%</b><br/>
+ Check the file name with the regular expression contained between the two tags <b>%asf_rf%</b> and return the captured data.
+ <br/>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="3" valign="top">
+ <br/>
+ <b>ATTENTION</b> : If the result for the saving path has forbidden characters (the : or the ?"*\/<>|: under Windows), the extension will cease to function. Be sure to check your filters if the extension doesn't work anymore.<br/>
+ </td>
+ </tr>
+</table></body></html>
\ No newline at end of file
diff --git a/locale/fr-FR/about.dtd b/locale/fr-FR/about.dtd
new file mode 100644
index 0000000..835b6f1
--- /dev/null
+++ b/locale/fr-FR/about.dtd
@@ -0,0 +1,8 @@
+<!ENTITY about "À Propos d'Automatic save folder">
+<!ENTITY version "Version : 0.9.3">
+<!ENTITY createdBy "Extension créée par :">
+<!ENTITY createdBy.name "Cyan (CASSAR Éric)">
+<!ENTITY contributor "Remerciements :">
+<!ENTITY contributor.name "Merci à tous ceux qui ont testé et laissé des commentaires">
+<!ENTITY contributor2.name "sur les sites pour l'amélioration de l'extension">
+<!ENTITY homepage "Site web :">
diff --git a/locale/fr-FR/asf.dtd b/locale/fr-FR/asf.dtd
new file mode 100644
index 0000000..17e4cb8
--- /dev/null
+++ b/locale/fr-FR/asf.dtd
@@ -0,0 +1,81 @@
+<!-- ASF -->
+<!ENTITY asf.version "0.9.3">
+
+<!-- browser and save dialog-->
+<!ENTITY prefwindow.title "Préférences pour Automatic Save Folder">
+<!ENTITY asf.label "Automatic Save Folder...">
+<!ENTITY asf.addedit.label "Ajouter ou éditer un filtre">
+<!ENTITY asf.pathselect.label "Liste des filtres :">
+
+<!-- Filters tab - top -->
+<!ENTITY asf.filters.label "Filtres">
+<!ENTITY asf.tree.column.domain "Domaine">
+<!ENTITY asf.tree.column.filename "Nom de fichier">
+<!ENTITY asf.tree.column.localfolder "Dossier local">
+<!ENTITY asf.tree.column.enabled "Actif">
+<!ENTITY asf.options.move.up "">
+<!ENTITY asf.options.move.down "">
+<!ENTITY asf.options.edit "Éditer">
+<!ENTITY asf.options.delete "">
+<!ENTITY asf.options.add "">
+
+<!-- Filters tab - bottom -->
+<!ENTITY asf.lastdir.bool "Modifier aussi le dossier d'enregistrement utilisé par le menu 'Enregistrer sous...'">
+<!ENTITY asf.default.label "Dossier d'enregistrement lorsqu'aucun filtre n'est trouvé :">
+<!ENTITY asf.lastselected.label "Le dernier dossier utilisé">
+<!ENTITY asf.defaultfolder.label "Ce dossier : ">
+<!ENTITY asf.selectfolder.label "Sélectionner...">
+<!ENTITY asf.keeptemp.label "Utiliser le dernier dossier si le téléchargement provient du même domaine d'hébergement que le précédent fichier.">
+
+<!-- preference file pickup -->
+<!ENTITY asf.selectfolder.pickup "Selectionnez le dossier de destination par défaut, lorsqu'aucun filtre n'est trouvé">
+
+<!-- popup -->
+<!ENTITY asf.top.popup "Déplacer au début">
+<!ENTITY asf.copy.popup "Dupliquer">
+<!ENTITY asf.delete.popup "Supprimer">
+<!ENTITY asf.bottom.popup "Déplacer à la fin">
+
+<!-- Options tab -->
+<!ENTITY asf.options.label "Options">
+<!ENTITY asf.viewdloption.bool "Afficher les options lors de l'enregistrement">
+<!ENTITY asf.viewdloption.label "Permet de voir les deux derniers dossiers d'enregistrement et un lien pour éditer ou ajouter de nouveaux filtres.">
+<!ENTITY asf.viewpathselect.bool "Afficher la liste des filtres">
+<!ENTITY asf.viewpathselect.label "Active le menu déroulant contenant le chemin de chaque filtre.">
+<!ENTITY asf.variablemode.bool "Mode avancé :">
+<!ENTITY asf.variablemode1.label "Permet d'éditer le chemin d'enregistrement des filtres manuellement et d'ajouter des variables dynamiques,">
+<!ENTITY asf.variablemode2.label "comme la date du jour ou le domaine d'hébergement.">
+<!ENTITY asf.variablemode3.label "Note : Attention aux majuscules et minuscules.">
+<!ENTITY asf.variables.label "Liste des balises :">
+
+<!-- About tab-->
+<!ENTITY asf.info.label "À propos...">
+<!ENTITY asf.info.title "Automatic Save Folder">
+
+<!-- preference add & edit-->
+<!ENTITY buttonlabelextra1 "OK">
+<!ENTITY asf.add.title "Ajouter un nouveau filtre">
+<!ENTITY asf.edit.title "Editer un filtre">
+<!ENTITY asf.addedit.filter.label "Filtres">
+<!ENTITY asf.addedit.help.label "Aide">
+<!ENTITY asf.addedit.domain.label "Domaine">
+<!ENTITY asf.addedit.filename.label "Nom de fichier">
+<!ENTITY asf.addedit.folder.label "Dossier local">
+<!ENTITY asf.addedit.regexp "Regexp">
+<!ENTITY asf.addedit.all "Tous">
+<!ENTITY asf.addedit.regexp.exemple "Exemples d'expressions régulières : ">
+<!ENTITY asf.addedit.regexphelp.label "Aide pour les Regexp.">
+
+<!ENTITY asf.addedit.inforegexp1 "Les filtres peuvent être :">
+<!ENTITY asf.addedit.inforegexp2 "Définis : fichier_a_telecharger.zip">
+<!ENTITY asf.addedit.inforegexp3 "Partiels : fichier*.zip">
+<!ENTITY asf.addedit.inforegexp4 "Expression régulière : .*(.rar|.zip)$">
+
+<!ENTITY asf.addedit.nodata.domain "Le domaine est vide. Veuillez sélectionner 'Tous' ou entrer un filtre pour le domaine">
+<!ENTITY asf.addedit.nodata.filename "Le nom de fichier est vide. Veuillez séléctionner 'Tous' ou entrer un filtre pour le nom de fichier">
+<!ENTITY asf.addedit.nodata.folder "Le dossier n'est pas défini. Veuillez séléctionner un dossier de destination pour ce filtre">
+
+<!-- Regular expression Help dialog -->
+<!ENTITY asf.regexp.title "Expressions Régulières">
+<!ENTITY asf.regexp.label "Aide et exemples :">
+
diff --git a/locale/fr-FR/asf.properties b/locale/fr-FR/asf.properties
new file mode 100644
index 0000000..12c9878
--- /dev/null
+++ b/locale/fr-FR/asf.properties
@@ -0,0 +1 @@
+extensions.asf at mangaheart.org.description=Sélectionne automatiquement le dossier d'enregistrement suivant le nom du fichier et le site d'hébergement.
\ No newline at end of file
diff --git a/locale/fr-FR/info.html b/locale/fr-FR/info.html
new file mode 100644
index 0000000..8764aca
--- /dev/null
+++ b/locale/fr-FR/info.html
@@ -0,0 +1,300 @@
+<html>
+<!-- ***** BEGIN LICENSE BLOCK *****
+ Copyright 2007-2009 Eric Cassar (Cyan)
+
+ This file is part of "Automatic Save Folder".
+ You may find the license in the LICENSE file
+
+ ***** END LICENSE BLOCK ***** -->
+<body style="background-color:#FFFFFF;">
+<center><font size="+1"><b>Automatic Save Folder V0.9.3</b></font></center>
+<center>par Cyan</center>
+<br /><b><u>Important</u></b> :
+<br />
+<br />- Cette extension fonctionne uniquement si la fenêtre de téléchargement s'affiche :
+<br/><img src="chrome://asf/skin/screen_save_80fr.png" />
+<br />Par conséquent, le clic-droit "télécharger la cible sous..." ne fonctionne pas avec cette extension.
+<br />
+<br />De même, si une étape de téléchargement prévue par Firefox empêche cette fenêtre de s'afficher, l'extension ne fonctionnera pas.
+<br />Si certains filtres ne fonctionnent pas, veuillez vérifier que Firefox ne lance pas un traitement différent sur le fichier téléchargé.
+<br />Par exemple pour les fichier .rar :
+<br />
+<br />1. Allez dans le menu "Outils" de Firefox puis "Options...".
+<br />
+<br />2. - Pour les utilisateurs de Firefox 3 : Allez sur l'onglet "Applications".
+<br /> - Pour les utilisateurs d'une version précédente : Allez sur l'onglet "Contenu" puis cliquez sur le bouton "Gérer...".
+<br />
+<br />3. Vérifiez que l'extension de fichier que vous souhaitez télécharger soit bien positionnée sur "Toujours demander".
+<br /><img src="chrome://asf/skin/screen_apps_fr.png" />
+<br />
+<br />
+<br />
+<br />
+<br />
+<br />
+<br /><b><u>Fonctionnement</u></b> :
+<br />
+<br />
+<br />Cette extension permet de définir, à l'aide de filtres, le répertoire qui vous sera automatiquement proposé par la fenêtre d'enregistrement de vos fichiers.
+<br />
+<br /><u>Les règles à suivre</u> :
+<br />- Les filtres sont définis à l'aide du nom du fichier et du domaine d'hébergement.
+<br />Attention : pour le domaine d'hébergement il ne s'agit pas du site où vous vous trouvez, mais du serveur où se trouve le fichier.
+<br />- Les filtres doivent contenir le texte correspondant au nom de fichier ou de domaine. Par exemple n'indiquez pas <b>"google.fr"</b> mais simplement <b>google.fr</b> (sans les guillemets).
+<br />- Vous pouvez utiliser le caractère <b>*</b> (astérisque) pour remplacer une partie du filtre : <b>wiki*.org</b>
+<br />- L'astérisque n'est pas nécessaire en début et fin de filtre. Écrire <b>*wiki*</b> ou <b>wiki</b> revient au même. (Les astérisques sont ajoutés automatiquement en début et fin de filtre lors de l'enregistrement)
+<br />- Tout comme les extensions de fichier : <b>*.zip</b> ou <b>.zip</b> fonctionnent de la même manière.
+<br />- Les filtres sont vérifiés de haut en bas et la vérification s'arrête lorsqu'un filtre correspond au fichier téléchargé. Veillez à bien organiser vos filtres.
+<br />- Les filtres sont insensibles à la casse, il n'y a aucune différence entre les majuscules et les minuscules lors du filtrage.
+<br />
+<br />
+<br />Pour plus de souplesse, cette extension accepte aussi les expressions régulières.
+<br />Pour plus de renseignements sur les expressions régulières, reportez-vous au menu d'aide présent dans la fenêtre d'ajout et d'édition des filtres.
+<br />
+<br />
+<br />Des variables dynamiques sont à votre dispositions afin de créer des dossiers spécifiques lors de l'enregistrement, suivant la date du jour ou les noms de fichier et de domaine.
+<br />Reportez vous au menu d'option pour la liste des balises.
+<br />
+<br />
+<br />
+<br /><u>Voici quelques exemples</u> :
+<br />
+<br />Si vous souhaitez que tous vos fichiers exécutables <b>.exe</b> soient enregistrés dans un répertoire spécifique :
+<br />- <b>domaine</b> : Tous
+<br />- <b>filtre</b> : .exe
+<br />- <b>dossier</b> : votre répertoire des programmes
+<br />
+<br />
+<br />Si maintenant vous voulez que tous les fichiers provenant d'un site en particulier (par exemple mozilla.org) soient enregistrés dans un répertoire Mozilla :
+<br />- <b>domaine</b> : mozilla.org
+<br />- <b>filtre</b> : Tous
+<br />- <b>dossier</b> : votre répertoire Mozilla
+<br />
+<br />
+<br />Ensuite, si vous voulez trier les fichiers <b>.zip</b> provenant de mozilla.org, et laisser les autres fichiers dans l'ancien répertoire :
+<br />- <b>domaine</b> : mozilla
+<br />- <b>filtre</b> : .zip
+<br />- <b>dossier</b> : votre répertoire Mozilla pour les .zip
+<br />Et placez votre filtre au-dessus du filtre précédent. Rappelez-vous que les filtres sont vérifiés de haut en bas.
+<br />
+<br />
+<br />Et enfin, vous pouvez aussi définir des noms complets, pas seulement des extensions :
+<br />- <b>domaine</b> : Tous
+<br />- <b>filtre</b> : firefox*.exe
+<br />- <b>dossier</b> : votre répertoire pour les programmes d'installation de Firefox
+<br />
+<br />
+<br /><u>Voici quelques exemples avec les variables dynamiques et les variables de capture</u> :
+<br />
+<br />Pour trier tous les nighlty build de firefox dans un sous-dossier de D:\firefox :
+<br />- <b>domaine</b> : Tous
+<br />- <b>filtre</b> : firefox*pre
+<br />- <b>dossier</b> : D:\firefox\Nightly\%Y%-%m%-%d%
+<br />L'extension créera un sous-dossier nommé avec la date du jour, par exemple "2009-04-12", dans lequel sera enregistré votre fichier.
+<br />
+<br />
+<br />Pour trier un fichier suivant son extension :
+<br />- <b>domaine</b> : Tous
+<br />- <b>filtre</b> : Tous
+<br />- <b>dossier</b> : D:\download\%asf_x%
+<br />L'extension créera un sous-dossier nommé "zip" pour les fichier .zip, "rar" pour les .rar, etc. dans lequel sera enregistré votre fichier.
+<br />
+<br />
+<br />Pour créer ou non des sous dossiers différents suivant le fichier :
+<br />
+<br />Exemple de consignes : Nous souhaitons télécharger des vidéos nommées "Mes_vacances_date-du-sejour.avi".
+<br />Les vidéos comportent des sous-titres .srt pour expliquer le voyage,
+des fichiers .zip sont également disponibles contenant des photos du séjour,
+les vidéos peuvent être distribuées en .avi, .torrent ou .nzb (newsgroup).
+<br />
+<br />Les ".avi" et ".srt" devront aller dans le dossier D:\video\vacances.
+<br />Les ".zip", ".torrent" et ".nzb" devront aller respectivement dans leur sous-dossier D:\video\vacances\zip, D:\video\vacances\torrent et D:\video\vacances\nzb.
+<br />
+<br />- <b>domaine</b> : Tous
+<br />- <b>filtre</b> : /^Mes_vacances.*\.(avi|srt|zip|torrent|nzb)$/
+<br />- <b>dossier</b> : D:\video\vacances\%asf_rf%(zip|torrent|nzb)$%asf_rf%
+<br />
+<br />Explication du filtrage :
+<br />Le filtre sera déclenché pour tous les fichiers commençant par "Mes_vacances" et terminant par une des extensions possibles (avi, srt, zip, torrent ou nzb).
+<br />Le dossier créé dépendra du filtrage : La balise %asf_rf% analyse le nom du fichier téléchargé avec l'expression régulière contenue entre les deux balises : Si le fichier comporte "zip", "torrent" ou "nzb" en fin de nom, la portion capturée par l'expression régulière sert à créér le sous-dossier.
+<br />Si aucune de ses trois extensions n'est trouvée, l'expression régulière ne renvoit rien, et aucun sous-dossier n'est créé, les fichiers seront téléchargé dans D:\video\vacances\
+<br />
+<br />Note : Vous pouvez placer autant de balises que vous le souhaitez dans le chemin d'enregistrement.
+<br />Le filtre aurait pu être :
+<br />- <b>filtre</b> : /.*\.(avi|srt|zip|torrent|nzb)$/
+<br />- <b>dossier</b> : D:\video\%asf_rf%(vacances|mariage)%asf_rf%\%asf_rf%(zip|torrent|nzb)$%asf_rf%
+<br />Dans ce cas, le sous dossier "vacances" est crée uniquement si le nom de fichier contient "vacances".
+<br />
+<br />
+<br />
+<br />
+<br /><b><u>Problèmes connus</u></b> :
+<br />
+<br />- For some users , ASF only suggest default folder instad of filter's folder.
+<br />Pas assez de retours d'utilisateurs ayant rencontrés ce problème.
+<br />Veuillez contacter l'auteur par mail si vous êtes dans ce cas et souhaitez aider à corriger ce problème.
+<br />
+<br />- Si vous utilisiez des caractères unicodes dans une version inférieur à 0.9.3, le chemin local peut apparaître vide, mais fonctionne toujours correctement.
+<br />Veuillez éditer les filtres dans ce cas et redéfinir les chemins manuellement.
+<br />
+<br />- [expérimental] Le filtrage du domaine se fait maintenant avec l'URL du referer si le domaine d'hébergement ne correspond pas au filtre.
+<br />Cela peut engendrer des problèmes de validation du filtre alors qu'on ne le souhaite pas.
+<br />Si cela pose trop de problèmes, je supprimerai cette option (Merci de laisser vos commentaires à propos de cette option : utile ou génante ?).
+<br />
+<br />
+<br />
+<br /><b><u>Prévisions et demande d'aide</u></b> :
+<br />
+<br />Je cherche de l'aide pour :
+<br />- Prise en compte du menu clic droit "Enregistrer la cible du liens sous..." et "Enregistrer l'image sous...".
+<br />
+<br />Vous pouvez me contacter si vous souhaitez apporter votre aide ou proposer de nouvelles idées :
+<br />http://asf.mangaheart.org
+<br />ou
+<br />https://addons.mozilla.org/fr/firefox/addon/4781
+<br />
+<br />
+<br />
+<br /><b><u>Historique</u></b> :
+<br />
+<br /><pre>
+
++ Ajout
+- Suppression
+* Correction ou modification
+
+
+Version 0.9.3: (2009 07 05)
++ Ajout du numéro de version dans la barre de titre du menu principal.
++ Possibilité d'ouvrir l'explorateur de dossier en double-cliquant sur le champs du chemin d'enregistrement.
++ Ajout d'onglets pour séparer les filtres, les options, l'aide et l'historique des versions.
++ Ajout des variables dynamiques pour le chemin d'enregistrement du fichier. (Merci à Ted pour la capture des groupe avec $1)
++ Option permétant d'activer ou désactiver les variables dynamiques (Mode avancé).
++ Ajout d'un menu contextuel sur les filtres permettant de dupliquer ou déplacer un filtre en début ou fin de tableau.
++ [Experimental] Pour plus de facilité lorsque le domaine d'hébergement est aléatoire (ex. pour télécharger firefox sur mozilla.org) :
+ Vérification du filtre avec l'URL du site courant si le domaine d'hébergement du fichier ne retourne pas de résultat.
+ Attention à l'ordre de filtrage : En premier le domaine d'hébergement du fichier est vérifié, puis l'adresse du site où se trouve le lien.
+ Les données utilisés pour vérifier le domaine précédent reste celui d'hébergement du fichier.
++ Limite la taille maximum de la fenêtre d'enregistrement à la résolution de l'écran principal. (Merci à Julien)
++ Ajout d'une option permettant d'afficher un menu déroulant sur la fenêtre de sauvegarde contenant la liste des dossiers définit par les filtres.
+* Enregistrement des données au format unicode (Les filtres présents dans les versions précédentes contenant des caractères accentués peuvent ne plus fonctionner. Vous devrez les redéfinir).
+* Correction du paramètre d'édition par double-clic sur un filtre venant d'être ajouté.
+* Modification du mode d'ouverture des liens de la fenêtre "à propos de...". Les liens s'ouvrent maintenant dans un nouvel onglet.
+* Agrandissement de certains menus pour plus de lisibilité.
+* simplification du code pour le déplacement haut/bas des filtres.
+* simplification du code de chargement des données courantes pour l'autocomplétion du menu "Ajouter".
+* Meilleure visibilité : Les zones de texte s'agrandissent maintenant avec le changement de taille des fenêtres de préférence et d'aides.
+* Correction du bug qui empechait la lecture des préférences non définies ou inexistantes dans about:config. (Merci à Martin)
+* Modification complète du script en Global Namespace, demandé par mozilla.org afin de sousmettre l'extension en zone public.
+* Simplifications des fonctions du script et ajout des commentaires du code.
+
+
+Version 0.9.2 : (2009 01 26)
+* Correction pour Vista : Mise à jour forcée de la variable browser.download.folderList à "2" lors de l'ouverture de la fenêtre d'option d'ASF.
+* Correction de la colonne "actif", les filtres ne pouvaient plus être activés ou désactivés temporairement depuis la Version 0.8.7.
+* Compatibilité des thèmes : Les couleurs par défauts sont maintenant utilisées, tous les textes devraient être visibles correctement.
+ Les images ont été améliorées afin d'être visibles sur les thèmes sombres.
+* Agrandissement de la zone des filtres.
+
+
+Version 0.9.1 : (2008 11 01)
++ Traduction italienne par Scognito.
++ Ajout d'un menu à puces lors de l'enregistrement, permettant de sélectionner rapidement les deux derniers dossiers en mémoire.
+ Le deuxième choix n'apparait que s'il est différent du premier.
+* Correction d'un bug lors de la vérification des filtres si l'option "Utiliser le dernier dossier" était sélectionné. (Merci à Carsten)
+* Correction d'un bug sur Firefox3 et Windows Vista : Modification d'une option interne à Firefox permettant de changer le dossier d'enregistrement manuellement. (Merci à Carsten)
+ (browser.download.folderList = 2) Sur Windows Vista, la valeur par défaut est à 1.
+ Les différentes valeurs possibles sont : 0 = Bureau ; 1 = Dossier d'enregistrement par défaut ; 2 = Choix laissé à l'utilisateur.
+* Suppression de l'option "affecter aussi enregistrer sous..." pour firefox3, puisque cette valeur est utilisée automatiquement.
+* Suppression du popup "+ Ajouter un filtre" lors de l'enregistrement. Cela causait des problèmes de priorité de focus et de position de fenêtres.
+ Le lien n'ouvre plus que le menu principal permettant de modifier ou ajouter un filtre manuellement.
+ Lors de l'ajout d'un filtre en passant par ce menu, les champs seront tout de même pré-remplis avec le nom de fichier et le domaine.
+* Correction du chemin spécifié dans la fenêtre de téléchargement sur Firefox3. Le chemin n'était pas mis correctement à jour suivant les options cochées.
+* Désactivation de l'édition des cellules du tableau lors d'un double-clic.
+ Depuis Firefox 3, double cliquer sur une cellule permet de l'éditer directement sans passer par la fenêtre d'édition. L'édition n'était alors pas enregistrée correctement.
+
+
+Version 0.9.0 : (2008 06 28)
++ Compatible avec Firefox 3.0.*
++ Ajout d'un bouton d'informations et d'aide à l'utilisation de l'extension.
++ Nouveau menu permettant d'ajouter des filtres juste avant l'enregistrement du fichier, avec les champs domaine et fichier pré-remplis.
+ Après l'ajout d'un filtre de cette manière, les filtres sont à nouveau vérifiés afin de prendre en compte le fichier en cours de téléchargement.
+ Bug connu : un problème de retour à la fenêtre active peut survenir lors de la fermeture des filtres.
+- Suppression de l'option permettant de désactiver l'extension. Afin de la désactiver temporairement, veuillez utiliser le gestionnaire d'extension.
+* Changement de la façon dont les filtres sont exécutés (addEventlistener à la place de OnLoad), pour une meilleure compatibilité avec les autres extensions.
+* Correction de la colonne "Actif" qui ne restait pas masquée correctement.
+
+
+Version 0.8.7 : (2008 01 06)
++ Version unique pour Windows et Linux (et peut être Mac ?).
++ Compatible avec Firefox 3.0 beta (quelques modifications apportées au code).
+* La touche entrée du clavier correspond maintenant aux boutons d'acceptations (OK, Ajouter, Editer). Auparavant le bouton par défaut était "Annuler".
+
+
+Version 0.8.6 - Linux fix : (2008 01 04)
+* Modification des boutons "OK" qui n'apparaissent pas dans la fenêtre principale sur Linux.
+Info :
+Sur Linux, il n'y a que le bouton "Fermer" et les cases à cocher sont enregistrées dès qu'elles sont modifiées par l'utilisateur. Malheureusement les tableaux ne sont pas pris en compte à la fermeture.
+J'ai donc supprimé le bouton "Accept" et je l'ai remplacé par un bouton "sauver et fermer".
+
+
+Version 0.8.6 : (2007 07 09)
+* Correction orthographique et syntaxique. Merci à Goofy sur Mozilla.org
+
+
+Version 0.8.5 : (2007 04 01)
++ Ajout d'une option pour afficher des informations dans la fenêtre de téléchargement.
++ Ajout d'une option pour mémoriser le dernier domaine sur lequel les fichiers ont été téléchargés.
+* L'option du dossier par défaut fonctionne maintenant même si aucun filtre n'est défini dans la liste.
+* Modification de la page d'aide pour les expressions régulières. Utilisation d'un iframe et d'une page html à la place du xul/dtd.
+
+
+Version 0.8.4 : (2007 02 24)
++ Traduction de l'extension en français.
+* Conversion des fichiers de localisation en utf-8.
+
+
+Version 0.8.3 : (2007 02 17)
++ Ajout d'exemples et une courte explication concernant l'utilisation des expressions régulières, accessible dans la fenêtre d'ajout et d'édition des filtres.
+
+
+Version 0.8.2 :(2007 02 15)
+Première version publique.
++ Ajout d'une option pour agir en même temps sur le chemin d'enregistrement des pages Web (note : le menu "fichier/enregistrer sous..." de Firefox).
+
+
+Version 0.8.1 :
+* Sélection des dossiers : la fenêtre de sélection s'ouvre sur le dossier déjà sélectionné. Avant elle s'ouvrait sur un dossier aléatoire parmi : documents and settings, bureau et le dossier personnel.
+* Restriction pour la sélection des dossiers : suppression de la possibilité d'écrire le chemin au clavier, seul le bouton "Sélectionner..." est valide pour choisir les dossiers de destination.
+
+
+Version 0.8.0 :
+Fonctionnalités :
++ Positionnement des filtres par priorité (option pour monter et descendre les filtres).
++ Reconnaissance des filtres normaux, masqués et RegExp. (Expression régulière).
++ Sélection des dossiers manuellement et par menu interactif (bouton "sélectionner...").
++ Edition des filtres par double-clic sur les filtres.
++ Skin de l'interface avec des images.
+</pre>
+<br />
+<br />
+<br />
+<br />
+<br /><b><u>Remerciements</u></b> :
+<br />
+<br />- Goofy, Haynee : Relecture et correction d'orthographe en francais et anglais.
+<br />- MrCOLOMBO : Merci pour les suggestions, mais par soucis de sécurité j'ai utilisé le menu existant.
+<br />- Photonic : Merci pour l'information à propos du menu Application de firefox :)
+<br />- Carsten: Correction d'une erreur dans le script et information concernant une option de Firefox sur Windows Vista empéchant les filtres de fonctionner.
+<br />- Martin: Aide à la correction d'un bug lors de la lecture des préférences de firefox non définies ou inexistantes.
+<br />- Ted Gifford: Modification du script permettant la capture des groupes dans les variables dynamiques.
+<br />
+<br />
+<br /><b><u>Traducteurs</u></b>:
+<br />- Anglais : Cyan.
+<br />- Français : Cyan.
+<br />- Italien : Scognito.
+<br />
+<br />
+</body>
+</html>
diff --git a/locale/fr-FR/regexp.html b/locale/fr-FR/regexp.html
new file mode 100644
index 0000000..3d35557
--- /dev/null
+++ b/locale/fr-FR/regexp.html
@@ -0,0 +1,172 @@
+<html>
+<!-- ***** BEGIN LICENSE BLOCK *****
+ Copyright 2007-2009 Eric Cassar (Cyan)
+
+ This file is part of "Automatic Save Folder".
+ You may find the license in the LICENSE file
+
+ ***** END LICENSE BLOCK ***** -->
+<body style="background-color:#FFFFFF;">
+<br />L'expression régulière (appelé Reg. exp., Regex. ou Regexp) est une méthode de filtrage permettant de définir plusieurs masques complexe en un seul filtre.
+<br />
+<br />Avec les expressions régulières vous pouvez filtrer des noms de fichiers ou de domaines qui pourraient être difficile à effectuer avec le simple astérisque '*'.
+<br />
+<br /><b>Note 1</b> : Tous les filtres ignorent la casse (les majuscules et minuscules sont interprétés de la même façon).
+<br /><b>Note 2</b> : Les expressions régulières nécessitent dans cette extension d'être entourés par des slashs / /. Tous les exemples décrits ci-dessous omettent les slashs de début et de fin de filtre afin de faciliter la lisibilité. Lorsque vous cochez la case Regexp dans la fenêtre du filtre, les slashs / / s'ajoutent automatiquement.
+<br />
+<br />
+<br />Pour créer les filtres, il y a plusieurs caractères spéciaux à connaître :
+<br />
+<br /><b><u>Caractère spécial</u></b> : <b>.</b>
+<br />Le point . remplace n'importe quel caractère, limité à un seul caractère (une lettre, un nombre ou un espace). 'g..gle' correspond donc à google et tous les autres mots commençant par 'g' suivi de 2 caractères quelconque et terminant par 'gle'.
+<br />
+<br />
+<br /><b><u>Caractère spécial</u></b> : <b>*</b>
+<br />L'astérisque * permet de répéter plusieurs fois le caractère précédant.
+<br />go*gle correspondra donc à gogle, google, gooooooooooogle, etc.
+<br />'.*' (Un point suivi d'un astérisque) correspond à une suite de plusieurs lettres quelconques : plusieurs fois 1 seul caractère.
+<br />'.*' utilisé seul définit donc la totalité du nom de domaine ou du nom de fichier à filtrer, par conséquent cela correspond à l'option 'Tous' de la fenêtre d'ajout et d'édition des filtres.
+<br />
+<br />
+<br /><b><u>Caractère spécial</u></b> : <b>^</b>
+<br />Le circonflexe ^ permet de repérer le début d'une ligne. '^http' ne cherchera que les http en début de domaine.
+<br />Le filtrage sera donc correct pour 'http://test.com' mais ne sera pas bon pour 'ftp://http_test.com' car 'http' n'est pas en début de ligne mais au centre.
+<br />
+<br />
+<br /><b><u>Caractère spécial</u></b> : <b>$</b>
+<br />Le signe dollar $ permet de repérer la fin de phrase ou de ligne. 'com$' correspondant a tout ce qui termine par com.
+<br />Le filtrage sera donc correct dans 'http://test.com' mais ne sera pas bon pour 'http://computer.net' car 'com' n'est pas en fin de ligne mais au centre.
+<br />
+<br />
+<br /><b><u>Caractère spécial</u></b> : <b>\</b> suivi d'une lettre
+<br />\d capture les décimales (nombres)
+<br />\s capture tous les espace blanc (espace, tab, etc.)
+<br />\w capture un mot (séparé par des espaces, début ou fin de ligne)
+<br />\b permet de repérer le début et la fin d'un mot. '\barc\b' permettra de repérer le mot 'arc' s'il est employé seul, et ne fonctionnera pas sur le mot 'parc' ni sur 'arctique'.
+<br />\uFFFF avec FFFF = code hexadécimal, permet de capturer les caractères unicodes correspondant au code hexadécimal.
+<br />Exemple \u00E0 capturera 'à'<br />
+<br />
+<br />
+<br /><b><u>Caractère spécial</u></b> : <b>{ }</b>
+<br />Les accolades {} permettent de définir le nombre de répétition du caractère qui le précède, exemple go{2}gle = google (caractère o répété 2 fois)
+<br />Il est possible de définir le nombre minimum et maximum : 'go{0,2}gle' correspondra à ggle, gogle et google
+<br />
+<br />
+<br /><b><u>Caractère spécial</u></b> : <b>( )</b> et <b>( | )</b>
+<br />Les parenthèses permettent de définir un groupe de lettre consécutive. Utilisé conjointement avec un pipe | cela permet de définir plusieurs choix possible.
+<br />(aaaa|bbbb|cccc) capturera n'importe lequel de ces groupe de caractère aaaa or bbbb or cccc, mais pas plusieurs.
+<br />(b|g)oogle ne correspond qu'à boogle ou google, et non pas bgoogle
+<br />Vous pouvez appliquer des filtres sur les parenthèses :
+<br />'(b|g){1,2}oogle' permet de capturer une à deux fois les lettres parmi b ou g, suivi de 'oogle'.
+<br />boogle, bboogle, google, ggoogle, bgoogle, gboogle sont tous correct.
+<br />'(b|g)*oogle' permet de capturer un nombre infini de b, de g ou des deux avant 'oogle'.
+<br />
+<br />
+<br /><b><u>Caractère spécial</u></b> : <b>?</b>
+<br />Le point d'interrogation ? permet de définir des données optionnelles.
+<br />Par exemple les fichiers mpeg peuvent être de type '.mpg' ou '.mpeg'. L'expression régulière corresondante sera 'mpe?g'
+<br />Nov(embre)? capturera Nov et Novembre
+<br />Le ? correspond à l'expression régulière {0,1}
+<br />Nov(embre)? = Nov(embre){0,1}
+<br />
+<br />Le caractère * suivi d'un ? permet de rendre le * fénéant au lieu d'avare, exemple :
+<br />Les données : "C'est un test"
+<br />Le filtre : "t.*t" capturera du premier au dernier T, soit "t un test", l'astérisque est avare et capture le plus de lettres possibles.
+<br />Le filtre : "t.*?t" ne capturera cependant que le premier groupe de T, c'est à dire "t un t", l'astérisque est fénéante et la capture s'arrete au premier résultat rencontré (de gauche à droite).
+<br />
+<br />
+<br /><b><u>Caractère spécial</u></b> : <b>[ ]</b>
+<br />Les crochets [ ] servent à définir une rangée ou un groupe de caractère possible.
+<br />Contrairement aux parenthèses, les caractères dans le crochet ne forment pas un tout, elles sont indépendantes.
+<br />Nov[embr] correspond à Nove, Novm, Novb et Novr.
+<br />Le signe moins '-' entre deux caractères permet de définit une rangé de lettre :
+<br />[a-z] signifie 'toutes les lettres entre a et z'.
+<br />
+<br />Vous pouvez utiliser plusieurs signe moins '-' dans un même crochet. [a-zA-Z] définit toutes les lettres alphabétiques minuscules et majuscules. [a-zA-Z0-9] correspondra à tous les caractères alphanumériques
+<br />Vous pouvez spécifier n'importe quel caractère entre crochet : [_+.()a-d] capturera toutes les lettres entre 'a et d' ainsi que le _ le + le point et les parenthèses.
+<br />Pour capturer le signe moins '-', il faut le placer en premier [-a-z] capturera le signe moins '-' et les lettres de a à z.
+<br />Vous pouvez aussi utiliser les caractères spéciaux entre crochet. Par exemple pour capturer les lettres et les espaces [a-zA-Z\s]
+<br />
+<br />
+<br />Les crochets ne correspondent qu'à une seule lettre.
+<br />Pour définir une option sur plusieurs lettres :
+<br />t[se]*t
+<br />Correspond aussi bien à 'tet' ou 'tst' qu'à 'test' ou 'tset', ou encore 'tessst'
+<br />t[es]{0,2}
+<br />Correspond à t, te, ts, tee, tss, tes, tse
+<br />
+<br />
+<br />
+<br />
+<br />Comme tous les caractères spéciaux ci-dessus sont utilisés pour le fonctionnement des expressions régulières, si vous devez filtrer ces lettres dans vos noms de domaine ou de fichier, vous devrez utiliser le caractère spécial anti-slash.
+<br />Par exemple pour filtrer un fichier 'mon_fichier(2007).jpg' il faudra mettre un antislash devant les parentheses : mon_fichier\(2007\)\.jpg
+<br />
+<br />Notez que tous ces caractère devront avoir un antislash :
+<br />\ => \\ . => \. * => \* ? => \? ^ => \^
+<br />$ => \$ (=> \( ) => \) { => \{ } => \}
+<br />[ => \[ ] => \] / => \/ + => \+
+<br />
+<br />
+<br />
+<br />
+<br />Il existe beaucoup d'autres méthodes de filtrage en utilisant les expressions régulières qui ne peuvent être expliquées ici.
+<br />Si vous voulez vous renseigner, vous pourrez trouver de la documentation et des exemples sur ces sites :
+<br />http://www.regular-expressions.info/tutorial.html
+<br />http://www.javascriptkit.com/jsref/regexp.shtml
+<br />(en français) https://developer.mozilla.org/fr/Guide_JavaScript_1.5/Expressions_rationnelles
+<br />
+<br />
+<br />
+<br /><b><u>Quelques exemples</u></b> :
+<br />
+<br />Pour filtrer tous les .rar et les fichiers en .r01 .rxx :
+<br />r(ar|\d{2})
+<br />Cela signifie 'r' suivi soit de 'ar' soit de 2 décimales
+<br />
+<br />Pour filtrer tous les http en .com :
+<br />^http.*\.com$
+<br />Cela signifie tout ce qui commce par 'http' (grâce au ^), suivi d'aucune ou de n'importe quel lettre(s) un nombre indéfini de fois, terminant par '.com' (grâce au $).
+<br />
+<br />Pour capturer un domaine, qu'il y ait les www ou non :
+<br /> ^http:\/\/(|www\.)google\.com
+<br />Cela signifie tout ce qui commence par 'http' (grace au ^), suivi d'un deux point ':', suivi de deux slash '\/\/', suivi soit de 'www' et d'un point '\.' soit de rien, suivi du nom du domaine (ici 'google.com')
+<br />Note : Les slashs et les points sont antislashés car ce sont des caractères spéciaux.
+<br />
+<br />
+<br />
+<br /><b><u>Exemples de filtres sur les noms de fichier</u></b> :
+<br />
+<br />Pour filtrer toutes les archives :
+<br />.*\.(z(ip|\d{2})|r(ar|\d{2})|jar|bz2|gz|tar|rpm|7z)$
+<br />
+<br />Pour filtrer toutes les vidéos :
+<br />.*\.(mp(eg?|[g4])|rm|avi|mov|divx|asf|qt|wmv|ram|m1v|m2v|rv|vob|asx)$
+<br />
+<br />
+<br />
+<br />
+<br /><b><u>Comparaisons de filtres sur les noms de domaine</u></b> :
+<br />
+<br />Pour filtrer tous les protocoles ftp :
+<br />Avec regexp : ^ftp:\/\/.*
+<br />Sans regexp : ftp://
+<br />
+<br />Pour filtrer un domaine particulier :
+<br />Avec regexp : ^http:\/\/(|www\.)domain\.com$
+<br />Sans regexp : http://*domain.com
+<br />(Sans regexp le filtre fonctionnera bien pour http://domain.com ou pour http://www.domain.com, mais il filtrera aussi http://pas_le_bon.domain.com)
+<br />
+<br />
+<br />Pour filtrer tous les domaines contenant 'oogle' :
+<br />Avec regexp : .*oogle.*
+<br />Sans regexp : oogle
+<br />
+<br />
+<br />
+<br />
+<br /><b><u>Conclusion</u></b> :
+<br />Les expressions régulières permettent de mieux gérer les filtres, mais c'est parfois beaucoup plus rapide d'utiliser l'astérisque.
+<br />Les expressions régulières sont utiles uniquement sur les filtrages complexes.
+<br />
+</body>
+</html>
\ No newline at end of file
diff --git a/locale/fr-FR/variables.html b/locale/fr-FR/variables.html
new file mode 100644
index 0000000..21ce470
--- /dev/null
+++ b/locale/fr-FR/variables.html
@@ -0,0 +1,82 @@
+<html>
+<!-- ***** BEGIN LICENSE BLOCK *****
+ Copyright 2007-2009 Eric Cassar (Cyan)
+
+ This file is part of "Automatic Save Folder".
+ You may find the license in the LICENSE file
+
+ ***** END LICENSE BLOCK ***** -->
+<body>
+<table border="0" style="font-size:12px; margin-top:0px;">
+ <tr>
+ <td align="left" valign="top">
+ <u style="font-size:15px">Année</u><br/>
+ <b>%Y%</b> = 2009, 2012<br/>
+ <b>%y%</b> = 09, 12<br/>
+
+ </td>
+ <td align="left" valign="top">
+ <u style="font-size:15px">Mois</u><br/>
+ <b>%m%</b> = 01 à 12<br/>
+ <b>%n%</b> = 1 à 12<br/>
+ </td>
+ <td align="left" valign="top">
+ <u style="font-size:15px">Jour</u> :<br/>
+ <b>%d%</b> = 01 à 31<br/>
+ <b>%j%</b> = 1 à 31<br/>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="3" valign="top">
+ <br/>
+ <u style="font-size:15px">Variables spéciales</u> :<br/>
+ <table style="font-size:12px;">
+ <tr>
+ <td valign="top"><b>%asf_D%</b></td><td>= Domaine d'hébergement. (Sans http://)</td>
+ </tr>
+ <tr>
+ <td valign="top"><b>%asf_F%</b></td><td>= Nom du fichier complet.</td>
+ </tr>
+ <tr>
+ <td valign="top"><b>%asf_Fx%</b></td><td>= Nom du fichier sans l'extension.</td>
+ </tr>
+ <tr>
+ <td valign="top"><b>%asf_d%</b></td><td>= Champs "Domaine" du filtre utilisé. (Les caractères incompatibles seront supprimés. Si aucun filtre n'est trouvé, le domaine courant est utilisé)</td>
+ </tr>
+ <tr>
+ <td valign="top"><b>%asf_f%</b></td><td>= Champs "Nom de fichier" du filtre utilisé. (Les caractères incompatibles seront supprimés. Si aucun filtre n'est trouvé, le nom du fichier courant est utilisé)</td>
+ </tr>
+ <tr>
+ <td valign="top"><b>%asf_x%</b></td><td>= Extension du fichier. (Sans le point)</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="3" valign="top">
+ <br/>
+ <u style="font-size:15px">Variables de capture</u> :<br/>
+
+ <b>$<numéro>d</b> = Retourne le contenu de la capture à l'aide des parenthèses présentes dans le filtre "Domaine". <numéro> correspond au numéro de la parenthèse, de 1 à 9.
+ <br/>
+ <br/>
+ <b>$<numéro>f</b> = Retourne le contenu de la capture à l'aide des parenthèses présentes dans le filtre "Nom de fichier". <numéro> correspond au numéro de la parenthèse, de 1 à 9.
+ <br/>Exemple, sur ce filtre : mozilla_(firefox)_3.5.(exe), <b>$1f</b> capturera firefox, et <b>$2f</b> capturera "exe".
+ <br/>
+ <br/>
+ <b>%asf_rd%</b><u>expression régulière</u><b>%asf_rd%</b><br/>
+ Examine le nom du domaine complet avec l'expression régulière contenue entre les deux balises <b>%asf_rd%</b> et retourne la capture de l'évaluation.
+ <br/>
+ <br/>
+ <b>%asf_rf%</b><u>expression régulière</u><b>%asf_rf%</b><br/>
+ Examine le nom du fichier avec l'expression régulière contenue entre les deux balises <b>%asf_rf%</b> et retourne la capture de l'évaluation.
+ <br/>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="3" valign="top">
+ <br/>
+ <b>ATTENTION</b> : Si le résultat retourné pour le chemin d'enregistrement contient des caractères interdits (le : ou les ?"*\/<>|: sous Windows), l'extension ne fonctionnera pas. Vérifiez bien vos filtres si l'extension ne fonctionne plus.<br/>
+ </td>
+ </tr>
+</table></body></html>
\ No newline at end of file
diff --git a/locale/it-IT/about.dtd b/locale/it-IT/about.dtd
new file mode 100644
index 0000000..01ae979
--- /dev/null
+++ b/locale/it-IT/about.dtd
@@ -0,0 +1,8 @@
+<!ENTITY about "Informazioni su Automatic Save Folder">
+<!ENTITY version "Versione: 0.9.3">
+<!ENTITY createdBy "Creato da:">
+<!ENTITY createdBy.name "Cyan (CASSAR Éric)">
+<!ENTITY contributor "ringraziamenti:">
+<!ENTITY contributor.name "Grazie a chiunque mi ha aiutato e ha lasciato">
+<!ENTITY contributor2.name "commenti sui siti per migliorare questa estensione">
+<!ENTITY homepage "Pagina principale:">
diff --git a/locale/it-IT/asf.dtd b/locale/it-IT/asf.dtd
new file mode 100644
index 0000000..adf3bba
--- /dev/null
+++ b/locale/it-IT/asf.dtd
@@ -0,0 +1,81 @@
+<!-- ASF -->
+<!ENTITY asf.version "0.9.3">
+
+<!-- browser and save dialog-->
+<!ENTITY prefwindow.title "Preferenze di Automatic Save Folder">
+<!ENTITY asf.label "Automatic Save Folder...">
+<!ENTITY asf.addedit.label "Aggiungi o modifica filtro">
+<!ENTITY asf.pathselect.label "Percorsi disponibili per i filtri:">
+
+<!-- Filters tab - top -->
+<!ENTITY asf.filters.label "Filtri">
+<!ENTITY asf.tree.column.domain "Dominio">
+<!ENTITY asf.tree.column.filename "Nome file">
+<!ENTITY asf.tree.column.localfolder "Cartella locale">
+<!ENTITY asf.tree.column.enabled "Attivo">
+<!ENTITY asf.options.move.up "">
+<!ENTITY asf.options.move.down "">
+<!ENTITY asf.options.edit "Modifica">
+<!ENTITY asf.options.delete "">
+<!ENTITY asf.options.add "">
+
+<!-- preference bottom -->
+<!ENTITY asf.lastdir.bool "Ha effetto sulla cartella per il comando 'Salva come...' quando un filtro corrisponde">
+<!ENTITY asf.default.label "Cartella per salvare il file se nessun filtro corrisponde:">
+<!ENTITY asf.lastselected.label "Ultima cartella">
+<!ENTITY asf.defaultfolder.label "Cartella: ">
+<!ENTITY asf.selectfolder.label "Seleziona...">
+<!ENTITY asf.keeptemp.label "Usa l'ultima cartella se il file viene dallo stesso dominio dell'ultimo file scaricato.">
+
+<!-- preference file pickup -->
+<!ENTITY asf.selectfolder.pickup "Seleziona la cartella predefinita se nessun filtro corrisponde">
+
+<!-- popup -->
+<!ENTITY asf.top.popup "Sposta su">
+<!ENTITY asf.copy.popup "Duplica">
+<!ENTITY asf.delete.popup "Rimuovi">
+<!ENTITY asf.bottom.popup "Sposta giu">
+
+<!-- Options tab -->
+<!ENTITY asf.options.label "Opzioni">
+<!ENTITY asf.viewdloption.bool "Vedere le opzioni mentre scarica">
+<!ENTITY asf.viewdloption.label "(permette di vedere le due ultime cartelle di destinazione e un collegamento per aggiungere o modificare filtri)">
+<!ENTITY asf.viewpathselect.bool "Vedi la lista dei filtri">
+<!ENTITY asf.viewpathselect.label "Visualizza un menu con la lista di tutti i percorsi dei filtri.">
+<!ENTITY asf.variablemode.bool "Modalità avanzata :">
+<!ENTITY asf.variablemode1.label "Permette di editare i percorsi di salvataggi manualmente e aggiungere variabili dinamiche,">
+<!ENTITY asf.variablemode2.label "come la data del giorno o il nome del file.">
+<!ENTITY asf.variablemode3.label "Nota : Attenziona ai caratteri maiuscoli e minuscoli.">
+<!ENTITY asf.variables.label "Lista dei tag :">
+
+<!-- About tab-->
+<!ENTITY asf.info.label "Informazioni...">
+<!ENTITY asf.info.title "Automatic Save Folder">
+
+<!-- preference add & edit-->
+<!ENTITY buttonlabelextra1 "OK">
+<!ENTITY asf.add.title "Aggiungi nuovo filtro">
+<!ENTITY asf.edit.title "Modifica un filtro">
+<!ENTITY asf.addedit.filter.label "Filtri">
+<!ENTITY asf.addedit.help.label "Aiuto">
+<!ENTITY asf.addedit.domain.label "Dominio">
+<!ENTITY asf.addedit.filename.label "Nome file">
+<!ENTITY asf.addedit.folder.label "Cartella locale">
+<!ENTITY asf.addedit.regexp "Espressione regolare">
+<!ENTITY asf.addedit.all "tutti">
+<!ENTITY asf.addedit.regexp.exemple "Esempio di espressione regolare: ">
+<!ENTITY asf.addedit.regexphelp.label "Aiuto sulle espressioni regolari">
+
+<!ENTITY asf.addedit.inforegexp1 "I filtri possono essere:">
+<!ENTITY asf.addedit.inforegexp2 "definiti: mio_file.jpg">
+<!ENTITY asf.addedit.inforegexp3 "Parzialmente corrisposto o con wildcard: mio*.zip">
+<!ENTITY asf.addedit.inforegexp4 "Espressione regolare. : .*(.rar|.zip)$">
+
+<!ENTITY asf.addedit.nodata.domain "Il campo dominio è vuoto. Scegli 'tutti' o inserisci un filtro per il dominio">
+<!ENTITY asf.addedit.nodata.filename "Il campo Nome File è vuoto. Scegli 'tutti' o inserisci un filtro per il nome file">
+<!ENTITY asf.addedit.nodata.folder "La cartella è vuota. Scegli una cartella di destinazione per questo filtro">
+
+<!-- Regular expression Help dialog -->
+<!ENTITY asf.regexp.title "Espressioni regolari - aiuti ed esempi">
+<!ENTITY asf.regexp.label "Puoi copiare/incollare il testo qui sotto">
+
diff --git a/locale/it-IT/asf.properties b/locale/it-IT/asf.properties
new file mode 100644
index 0000000..2493cbd
--- /dev/null
+++ b/locale/it-IT/asf.properties
@@ -0,0 +1 @@
+extensions.asf at mangaheart.org.description=Seleziona automaticamente la cartella di destinazione dei tuoi download, in base al nome del file e dominio.
\ No newline at end of file
diff --git a/locale/it-IT/info.html b/locale/it-IT/info.html
new file mode 100644
index 0000000..2a3b28f
--- /dev/null
+++ b/locale/it-IT/info.html
@@ -0,0 +1,300 @@
+<html>
+<!-- ***** BEGIN LICENSE BLOCK *****
+ Copyright 2007-2009 Eric Cassar (Cyan)
+
+ This file is part of "Automatic Save Folder".
+ You may find the license in the LICENSE file
+
+ ***** END LICENSE BLOCK ***** -->
+<body style="background-color:#FFFFFF;">
+<center><font size="+1"><b>Automatic Save Folder V0.9.3</b></font></center>
+<center>by Cyan</center>
+<br /><b><u>Importante</u></b>:
+<br />
+<br />Questa estensione funziona solamente se si usa la finestra di download (quella che chiede di aprire, eseguire o salvare file su disco)
+<br/><img src="chrome://asf/skin/screen_save_80fr.png" />
+<br />Se Firefox non mostra tale finestra, l'estensione non funzionerà.
+<br />
+<br />
+<br />Se qualche filtro non funziona, accertartati che Firefox non usi un altro processo sul file scaricato:
+<br />
+<br />1.
+<br /> Vai sul menu "Strumenti" e "Opzioni...".
+<br />2.
+<br /> - Per utenti di Firefox 3: vai sul tab "Applicazioni"
+<br /> - Per utenti di precedenti versioni di Firefox: Vai sul tab "Contenuti" e clicca su "gestisci..." in basso a destra.
+<br />3.
+<br /> Verifica se il file che vuoi scaricare sia impostato su "Chiedi ogni volta".
+<br /><img src="chrome://asf/skin/screen_apps_fr.png" />
+<br />
+<br />
+<br />
+<br />
+<br />
+<br />
+<br /><b><u>Come si usa</u></b>:
+<br />
+<br />
+<br />Questa estensione permette di definire, usando dei filtri, quale cartella verrà scelta automaticamente quando scarichi i tuoi file.
+<br />
+<br /><u>Regole dei filtri</u>:
+<br />- I filtri sono definiti usando il nome del file e il dominio.
+<br />Attenzione: Per il dominio non usare l'inidirizzo corrente del sito, ma il server dove si trova il file.
+<br />- I filtri devono corrispondere al nome del file o al dominio. Per esempio non scrivere <b>"google.com"</b> ma solo <b>google.com</b> (senza doppi apici)
+<br />- Puoi usare i caratteri wildcard <b>*</b> (asterisco) per rimpiazzare parti del filtro: <b>wiki*.org</b>
+<br />- L'asterisco non serve all'inizio e alla fine della stringa usata come filtro. Scrivere <b>*wiki*</b> o <b>wiki</b> è la stessa cosa.
+<br />- La stessa cosa vale per il filtro sul nome file: <b>*.zip</b> o <b>.zip</b> funzionano allo stesso modo.
+<br />- I filtri sono verificati da quello più in alto a quello più basso e il processo termina quando un filtro corrisponde al file da scaricare. Abbi cura di ordinare i tuoi filtri di conseguenza.
+<br />- I filtri non sono 'case insensitive', cioè non c'è nessuna differenza tra parole scritte in maiuscolo o in minuscolo quando viene processato un filtro.
+<br />
+<br />
+<br />Questa estensione può essere usata con espressioni regolari.
+<br />Puoi leggere dal menu l'aiuto sulle espressioni regolari sulla finestra di aggiunta e modifica filtri.
+<br />
+<br />
+<br />Sono disponibili variabili dinamiche per creare directory quando si salva, chiamate con la data, col nome del file o col nome del dominio.
+<br />Puoi controllare il tab delle opzioni per vedere la lista dei tag dinamici.
+<br />
+<br />
+<br />
+<br /><u>Un po di esempi sui filtri</u>:
+<br />
+<br />Se vuoi che tutti i file eseguibili <b>.exe</b> vengano salvati su una cartella specifica:
+<br />- <b>dominio</b>: tutti
+<br />- <b>filter</b>: .exe
+<br />- <b>cartella</b>: la tua cartella per i file eseguibili
+<br />
+<br />
+<br />Se invece vuoi che tutti i file di un particolare sito (per esempio mozilla.org) vengano scaricati sulla cartella Mozilla:
+<br />- <b>dominio</b>: mozilla.org
+<br />- <b>filtro</b>: tutti
+<br />- <b>cartella</b>: la tua cartella Mozilla
+<br />
+<br />
+<br />Oppure, se hai bisogno di avere tutti i file zip <b>.zip</b> da mozilla.org, e lasciare gli altri file nella cartella precedente:
+<br />- <b>dominio</b>: mozilla
+<br />- <b>filtro</b>: .zip
+<br />- <b>cartella</b>: la tua cartella Mozilla per i file zip
+<br />e metti questo filtro sopra il precedente. Ricorda che i filtri vengono controllati dall'alto verso il basso.
+<br />
+<br />
+<br />Per finire, puoi definire filtri con un nome più completo, e non solo dall'estensione del file:
+<br />- <b>dominio</b>: tutti
+<br />- <b>filtro</b>: firefox*.exe
+<br />- <b>cartella</b>: la tua cartella per tutte le versioni del programma di istallazione di Firefox
+<br />
+<br />
+<br /><u>Ecco qualche esempio di variabili dinamiche e "capture":</u> :
+<br />
+<br />Per scaricare tutte le nightly build di firefox in una sottocartella di D:\firefox :
+<br />- <b>dominio</b> : Tutti
+<br />- <b>filtro</b> : firefox*pre
+<br />- <b>cartella</b> : D:\firefox\Nightly\%Y%-%m%-%d%
+<br />L'estensione creerà una sottocartella chiamata con la data di quel giorno. Per esempio "2009-12-04", dove verrà salvato il file.
+<br />
+<br />
+<br />Per scaricare un file in base alla sua estensione:
+<br />- <b>dominio</b> : Tutti
+<br />- <b>filtro</b> : Tutti
+<br />- <b>cartella</b> : D:\download\%asf_x%
+<br />L'estensione creerà una sottocartella chiamata "zip" per i file .zip, "rar" per i file .rar, etc., dove verranno salvati i file.
+<br />
+<br />
+<br />Per creare oppure no sottocartelle differenti in base al nome del file :
+<br />
+<br />Esempio : Vogliamo salvare i video chiamati "La_mia_vacanza_data-di-viaggio.avi".
+<br />I video hanno i sottotitoli nel formato .srt per spiegare la vacanza,
+ci sono anche file .zip con le foto del viaggio,
+e i video possono escarticati con l'estensione .avi, .torrent or .nzb (newsgroup).
+<br />
+<br />".avi" e ".srt" andranno nella cartella D:\video\vacation .
+<br />".zip", ".torrent" e ".nzb" andranno rispettivamente nelle sottocartelle D:\video\vacanze\zip, D:\video\vacanze\torrent and D:\video\vacanze\nzb.
+<br />
+<br />- <b>dominio</b> : Tutti
+<br />- <b>filtro</b> : /^La_mia_vacanza.*\.(avi|srt|zip|torrent|nzb)$/
+<br />- <b>cartella</b> : D:\video\vacanza\%asf_rf%(zip|torrent|nzb)$%asf_rf%
+<br />
+<br />Spiegazione dei filtri :
+<br />I filtri saranno attivati per tutti i file che cominciano con "La_mia_vacanza" e che finiscono con l'estensione disponibili (avi, srt, zip, torrent o nzb).
+<br />La cartella creata dipenderà dal filtro: %asf_rf% analizza il nome del file scaricato con l'espressione regolare contenuta fra i due %asf_rf% : se il file finisce con "zip", "torrent" o "nzb", la parte catturata dall'espressione regolare creerà la sottocartella.
+<br />Se nessuna di quelle estensioni non è trovata, l'espressione regolare non farà nulla, non verrà creata nessuna sottocartella e i file verranno scaricati nella cartella in D:\video\vacanze\
+<br />
+<br />Nota: Puoi mettere quanti tag vuoi per la cartella principale.
+<br />I filtri possono essere:
+<br />- <b>filtro</b> : /.*\.(avi|srt|zip|torrent|nzb)$/
+<br />- <b>cartella</b> : D:\video\%asf_rf%(vacanza|matrimonio)%asf_rf%\%asf_rf%(zip|torrent|nzb)$%asf_rf%
+<br />In questo cartello, verrà creata la cartella "vacanze" verrà creata solo se il nome contiene "vacanze".
+<br />
+<br />
+<br />
+<br />
+<br /><b><u>Problemi noti</u></b>:
+<br />
+<br />- Per alcuni utenti, ASF suggerisce solo la cartella di default invece della cartella del filtro.
+<br />Non ci sono abbastanza commenti da parte degli uteniti per capire bene il problema.
+<br />Perfavore contattare l'autore se sei uno di tali utenti e vuoi aiutare a correggere il problema.
+<br />
+<br />- Se i filtri contenevano caratteri unicode nella versione precedente (precedente alla 0.9.3), il percorso del filtro potrebbe apparire vuoto, ma funziona.
+<br />Perfavore, edita i filtri e specifica il percorso manualmente.
+<br />
+<br />- I filtri dei domini sono fatti nel referer URL se il dominio hostato non corrisponde al filtro.
+<br />Può dare problemi sulla validazione del filtro quando l'utente non prova a validarlo.
+<br />Se tale problema capita, cancellerò quest'opzione (perfavore lasciate dei commenti su questa opzione: utile o no?).
+<br />
+<br />
+<br />
+<br /><b><u>Da fare</u></b>:
+<br />
+<br />Sto cercando aiuto su:
+<br />- Abilitare filtri quando si usa il menu del tasto destro "Salva destinazione con nome..." e "Salva immagine con nome...".
+<br />- Aggiungere caratteristiche o rimpiazzare il menu opzioni "Applicazioni" di Firefox.
+<br />
+<br />Puoi contattarmi se hai bisogno di aiuto o suggerimenti:
+<br />http://asf.mangaheart.org
+<br />o
+<br />https://addons.mozilla.org/fr/firefox/addon/4781
+<br />
+<br />
+<br /><b><u>Storico versioni</u></b>:
+<br />
+<br /><pre>
+
++ aggiunto
+- rimosso
+* risolto o cambiato
+
+
+Version 0.9.3: (2009 07 05)
++ Aggiunto il numero di versione nel titolo della finestra di configurazione principale
++ Aggiunta l'opzione di eseguire doppio click sul campo del percorso per aprire la finestra di selezione.
++ Nuovi tab per separare filtri, opzioni, aiuto e l'elenco di versioni.
++ Possibilità di creare variabili dinamiche per creare cartelle. (Grazie a Ted per la cattura del gruppo col $1)
++ Opzione per attivare o disattivare le variabili dinamiche (Modalità avanzata).
++ Nuovo menu contestuale sulla lista dei filtri per duplicare un filtro, spostarlo su o giù con un click.
++ [Sperimentale] Per facilitare l'uso quando il dominio hostato è random (es. per scaricare firefox su mozilla.org):
+ Controllare i filtri con l'URI corrente se il dominio hostato non corrisponde.
+ Attenzione all'ordine dei filtri: Prima viene controllato il file del dominio, dopo l'indirizzo del sito corrente.
+ I dati usati per selezionare il dominio come "precedente" è ancora uno dei file hostati sul dominio.
++ Limitata la larghezza della finestra di salvataggio (Grazie a Julien)
++ Aggiunta l'opzione per mostrare un menu con la lista nella finestra di salvataggio per selezionare la cartella di salvataggio da tale lista.
+* Correzione per il percorso in unicode (i filtri che usano caratteri unicode nella versione 0.9.2 potrbbero essere rimossti, perfavore riscriverli a mano).
+* Correzione per il parametro editabile dei nuovi filtri creati.
+* Cambiato il modo in cui i link nella finestra "about..." funzionano. Adesso apriranno un nuovo tab.
+* Finetra e menu pi grandi per una visibilità migliore.
+* Codice semplificato per muovere i filtri su e giu.
+* Codice semplificato per il caricamento e l'autocompletamento dei dati nella finestra "aggiungi".
+* Migliore visibilità: Tutte le finestra possono essere ridimensionate e il contenuto verrà aggiusato di conseguenza.
+* Corretto il bug che non faceva caricare e leggere preferenze non definite o non esistenti nella about:config (Grazie a Martin)
+* Script riscritto completamente per usare namespace Globa (chiesto da mozilla.com per pubblicare l'estensione)
+* Codice scritto in modo più chiaro e con commenti.
+
+
+Versione 0.9.2: (2009 01 26)
+* Correzione per Vista: Forzata la variabile browser.download.folderList a "2" quando si apre la finestra delle preferenze di ASF.
+* Corretta la colonna "attiva", i filtri non potevano essere temporaneamente attivati o disattivati.
+*Compatibilià con i temi: Adesso vengono usati i colori di default, tutto il testo dovrebbe essere visibile correttamente.
+ Le immagini sono state aggiornate in modo da rimanere visibili sui temi scuri.
+* Firefox 3.1b2, 3.1b3, 3.5b4
+
+
+Versione 0.9.1: (2008 11 01)
++ Traduzione italiana di Scognito.
++ Aggiunto un radio menu mentre si salva, che permette all'utente di scegliere velocemente fra le ultime due cartelle.
+ La seconda scelta compare solamente se è diversa dalla prima.
+* Corretto un bug dello script sulla verifica del filtro mentre "Usa l'ultima cartella" era selezionata (grazie a Carsten)
+* Nascosta l'opzione "Ha effetto su 'salva come...'" su Firefox 3, questa opzione è usata automaticamente.
+* Rimosso il popup "Aggiungi un filtro" mentre si salva. Ha creato il problema del focus e un errore sul posizionamento della finestra.
+ Il collegamento è ancora qui e apre la finestra principale per permettere all'utente di aggiungere o modificare filtri.
+ Mentre si aggiunge un filtro usando questo collegamento, il campo verrà inserito automaticamente riempito col nome del file corrente e col dominio.
+* Risolto un bug su Firefox 3 e Windows Vista: Cambiato un opzione interna di firefox che permette all'utente di usare cartelle definite. (Thanks to Carsten)
+ (browser.download.folderList = 2) Su Windows Vista, il valore è settato a 1.
+ I possibili valori sono: 0 = desktop ; 1 = cartella di download predefinita; 2 = scelta utente.
+* Risolto il percorso specificato sulle finestre di downloa su Firefox 3.
+* Risolto il doppio click sui filtri. Adesso i campi non sono editabili su Firefox 3.
+
+
+
+Versione 0.9.0: (2008 06 28)
++ Funziona con Firefox 3.0.*
++ Aggiunto un nuovo bottone per informazioni su aiuti e informazioni su come usare l'estensione.
++ Nuovo menu che permette di modificare un filtro prima si dalvare il file, con i campi dominio e file riempiti con le proprietà del download corrente.
+ Dopo aver aggiunto un filtro in questo modo, i filtri sono controllati di nuovo e applicati al file appena scaricato.
+ Problema noto: Può capitare un problema di focus mentre si chiude il pannelo dei filtri.
+- Tolta l'opzione per attivare o disattivare l'estensione. Per disabilitarla temporaneamente, usa il gestore delle estensioni.
+* Nuovo modo di controllare i filtri (addEventlistener invece di OnLoad), per una migliore compatibilità con altre estensioni.
+* Corretta la colonna per filtro "Attivo" che non era nascosta correttamente.
+
+
+Versione 0.8.7: (2008 01 06)
++ ...versioni per Windows and Linux (e forse Mac ? Perfavore qualcuno potrebbe testare ?)
++ Compatibile con Firefox 3.0 beta (giusto qualche cambiamento sullo script).
+* Il bottone Invio ha effetto sui vari pulsanti (Ok, Aggiungi, Modifica). Nelle precedenti versioni era sul pulsante "Cancel".
+
+
+Versione 0.8.6 - Linux fix: (2008 01 04)
+* Cambiati i bottoni "OK" che non comparivano nel menu principale su Linux.
+Informazioni:
+Su Linux, c'è solo il bottone "chiudi" e i bottoni di controllo sono salvati automaticamente quando richiesto dall'utente. Sfortunatamente l'array Table non è salvato in questo processo.
+Ho rimosso il bottone "Accetta" e l'ho cambiato con uno fatto traimte script "Salva e chiudi".
+
+
+Versione 0.8.6: (2007 07 09)
+* Correzioni di parole e frasi. Grazie al commento di Goofy di Mozilla.org.
+
+
+Versione 0.8.5: (2007 04 01)
++ Aggiunta l'opzione per mostrare qualche informazione sulla finestra di download.
++ Aggiunta l'opzione per mantenere in memoria il dominio da cui viene il file.
+* La cartella di default funziona anche quando nessun filtro è impostato.
+* Cambiato il modo in cui compare la finestra d'aiuto delle espressioni regolari. Viene usato un Iframe e una pagina html invece del dtd di Xul
+
+
+Versione 0.8.4: (2007 02 24)
++ Traduzione francese
+* File di traduzione convertiti in utf-8.
+
+
+Versione 0.8.3: (2007 02 17)
++ Aggiunto qualche esempio e piccoli suggerimenti sulle espressioni regolari. Si trova sulla finestra Aggiungi e Modifica filtro.
+
+
+Versione 0.8.2:(2007 02 15)
+Primo rilascio pubblico.
++ Aggiunta l'opzione per impostare il percorso del menu salva pagina Web (File, salva pagina con nome...)
+
+
+Versione 0.8.1:
+* Selezione cartella: La finestra della selezione della cartella si basa sulla cartella scelta precedentemente. Prima si apriva su una cartella a caso tra: documents and settings, desktop o la cartella dell'utente.
+* Restrizioni sulla selezione della cartella: tolta la possibilità di scrivere il percorso manualmente, adesso solo il bottone "Seleziona..." è valido per la selezione della cartella di destinazione.
+
+
+Versione 0.8.0:
+Funzioni:
++ Filtri ordinati per priorità (opzioni per muovere i filtri su e giu)
++ Funziona con filtri normali, wildcard e RegExp.
++ La cartella si puà selezionare manualmente o col bottone "Seleziona".
++ Modifica di un filtro tramite doppio click sulla lista dei filtri.
++ Skin della GUI con immagini.
+</pre>
+<br />
+<br />
+<br />
+<br />
+<br /><b><u>Thanks</u></b>:
+<br />
+<br />- Goofy, Haynee: Per aver letto e corretto le traduzioni in inglese e francese.
+<br />- MrCOLOMBO: Grazie per le idee, ma ho dovuto usare il menu corrente con il popup per mantere controlli sulla sicurezza.
+<br />- Photonic: Per avermi fatto notare il prombema con il menu "Applicazioni" di Firefox :)
+<br />- Carsten: Per l'aiuto su un errore dello script e l'opzione di Firefox su Windows Vista che non faceva funzionare i filtri.
+<br />- Martin: Help with finding the bug when reading a Firefox preference not set or empty.
+<br />- Ted Gifford: Script modification allowing group capture in dynamic variables.
+<br />
+<br />
+<br /><b><u>Translators</u></b>:
+<br />- English : Cyan.
+<br />- French : Cyan.
+<br />- Italian : Scognito.
+<br />
+<br />
+</body>
+</html>
diff --git a/locale/it-IT/regexp.html b/locale/it-IT/regexp.html
new file mode 100644
index 0000000..0fc48bf
--- /dev/null
+++ b/locale/it-IT/regexp.html
@@ -0,0 +1,128 @@
+<html>
+<!-- ***** BEGIN LICENSE BLOCK *****
+ Copyright 2007-2009 Eric Cassar (Cyan)
+
+ This file is part of "Automatic Save Folder".
+ You may find the license in the LICENSE file
+
+ ***** END LICENSE BLOCK ***** -->
+<body style="background-color:#FFFFFF;">
+
+Un Espressione Regolare (Reg. exp., or Regexp) è un metodo di matching per definire molti filtri su una linea.
+<br />
+<br />Con le Regexp puoi filtrare il nome del file o dominio che sarebbe difficile da filtrare con il solto asterisco '*'.
+<br />
+<br /><b>Nota 1</b> : Tutti i filtri sono 'case insensitive' (non c'è distinzione fra maiuscole e minuscole).
+<br /><b>Nota 2</b> : Le regexp in questo plugin hanno bisogno di essere racchiuse all'interno di una coppia di caratteri / / . Tutti gli esempi che seguono non comprendono / / all'inizio e alla fine del filtro per essere leggibili facilmente. Quando selezioni dalla checkbox 'regexp' nella finestra dei filtri, gli / / verranno inseriti automaticamente.
+<br />
+<br />
+<br />Per definire i filtri bisogna conoscere alcuni caratteri speciali:
+<br />
+<br /><b><u>Carattere speciale </u></b> : .
+<br />Il punto . rimpiazza qualsiasi carattere singolo(una lettere, numero o spazio). g..gle corrisponde a 'google' e ad altre parole che cominciano per 'g', seguite da 2 caratteri, e che termina con 'gle'.
+<br />
+<br />
+<br /><b><u>Carattere speciale </u></b> : *
+<br />il simbolo * ripete l'ultimo carattere (.* indica una qualsiasi stringa, cioè molte volte un carattere)
+<br />
+<br />
+<br /><b><u>Carattere speciale</u></b> : ^
+<br />^ significa all'inizio della stringa (^http indica solo l'occorrenza all'inizio. Va bene per http://test.com ma non per ftp://http_test.com)
+<br />
+<br />
+<br /><b><u>Carattere speciale</u></b> : $
+<br />$ indica la fine della stringa ( com$ indica solo la fine. Va bene per http://test.com ma non per http://computer.net)
+<br />
+<br />
+<br /><b><u>Carattere speciale</u></b> : { }
+<br />{x} indica qualsiasi carattere x volte, ad esempio tor{2}ent = torrent (corrisponde a 2 volte 'r')
+<br />
+<br />
+<br /><b><u>Special character</u></b> : \
+<br />\d corrisponde qualsiasi cifra (numero)
+<br />\s corrisponde a qualsiasi spazio (anche tab, ecc.)
+<br />\w corrisponde a qualsiasi parola
+<br />\b corrisponde ai bordi della stringa ( \barco\b = corrisponde solo la parola arco, non arco di 'parco', e neppure 'arcobaleno')
+<br />\uFFFF con FFFF = codice esadecimale, corrisponde al carattere unicode in esadecimale. Esempio \u00E0 corrisponde ad à
+<br />
+<br />
+<br /><b><u>Carattere speciale</u></b> : ?
+<br />? indica la presenza o assenza del carattere: i file mpeg possono essere .mpg or .mpeg, la regexp sarà mpe?g
+<br />Nov(embre)? indica Nov o Novembre
+<br />
+<br />
+<br /><b><u>Carattere speciale</u></b> : ( ) e |
+<br />la parentesi e il pipe (aaaa|bbbb|cccc) prende qualsiasi carattere che sia aaaa o bbbb o cccc ecc.
+<br />
+<br />
+<br /><b><u>Carattere speciale</u></b> : [ ]
+<br />Le parentesi quadre [ ] sono utili per definire una corrispondenza di molti caratteri. v[eo]lo corrisponde alle parole velo e volo.
+<br />Il meno - fra le parentesi quadre corrisponde a una serie di caratteri:
+<br />[a-z] significa qualsiasi carattere dalla a alla z. c[a-z]ne corrisponde a cane, cbne, ccne, ...m czne.
+<br />
+<br />Puoi usare molti - fra le stesse parenetesi quadre, ad esempio [a-zA-Z] corrisponde a tutti i caratteri dell'alfabeto. [a-zA-Z0-9] per tutti i caratteri alfanumerici
+<br />[a-cn-o] per indicare qualsiasi lettera tra la a e la c, e dalla n alla o.
+<br />[-a-z] per indicare - (meno) e dalla alla alla z.
+<br />
+<br />
+<br />
+<br />Se all'interno di un filtro c'è bisogno di riportare il simbolo dei caratteri sopra riportati bisogna eseguire il cosidetto escape, cioè far precedere il simbolo con un un backslash \. Ad esempio dominio.com diventa dominio\.com
+<br />
+<br />\ -> \\ . -> \. * -> \* ? -> \? ^ -> \^
+<br />$ -> \$ ( -> \( ) -> \) { -> \{ } -> \}
+<br />[ -> \[ ] -> \] / -> \/
+<br />
+<br />
+<br />
+<br />
+<br />Esistono molti metodi di filtro e possiblità che non possono essere spiegati qui.
+<br />Trovi la documentazione su: http://www.regular-expressions.info/tutorial.html
+<br />O per i principianti: http://www.javascriptkit.com/jsref/regexp.shtml
+<br />
+<br />
+<br />
+<br /><b><u>Alcuni esempi</u></b> :
+<br />
+<br />qualsiasi .rar e .r01 .rxx files :
+<br /> r(ar|\d{2}) significa r + ar, o r + due decimali
+<br />
+<br />qualsiasi http in .com :
+<br />^http.*\.com$
+<br />
+<br />qualsiasi dominio, indipendentemente che ci sia http davanti :
+<br /> ^http:\/\/(|www\.)dominio.com
+<br />
+<br />
+<br />
+<br />
+<br /><b><u>Esempi su filtri dei nomi dei file</u></b> :
+<br />
+<br />Filtro su tutti gli archivi :
+<br />.*\.(z(ip|\d{2})|r(ar|\d{2})|jar|bz2|gz|tar|rpm|7z)$
+<br />
+<br />Filtro su tutte le immagini
+<br />.*\.(jpe?g|jpe|gif|png|tiff?|bmp|ico)$
+<br />
+<br />Filtro su tutte le video
+<br />.*\.(mp(eg?|[g4])|rm|avi|mov|mkv|divx|asf|qt|wmv|ram|m1v|m2v|rv|vob|asx|og(g|v)|flv)$
+<br />
+<br />
+<br /><b><u>Esempi su filtri del dominio</u></b> :
+<br />
+<br />Filtro su tutti i siti ftp
+<br />regexp : ^ftp:\/\/.*
+<br />non regexp : ftp://*
+<br />
+<br />Filtro su un particolare dominio
+<br />regexp : ^http:\/\/(|www\.)dominio\.com$
+<br />non regexp : http://*dominio.com
+<br />(ma il non regexp, corrisponderà http://domain.com, http://www.domain.com, ma anche http://il.cattivo.dominio.com)
+<br />
+<br />
+<br />qualsiasi dominio con 'oogle' dentro:
+<br />regexp : .*oogle.*
+<br />non regexp : *oogle*
+<br />
+
+</body>
+</html>
\ No newline at end of file
diff --git a/locale/it-IT/variables.html b/locale/it-IT/variables.html
new file mode 100644
index 0000000..bbed4f5
--- /dev/null
+++ b/locale/it-IT/variables.html
@@ -0,0 +1,75 @@
+<html>
+<!-- ***** BEGIN LICENSE BLOCK *****
+ Copyright 2007-2009 Eric Cassar (Cyan)
+
+ This file is part of "Automatic Save Folder".
+ You may find the license in the LICENSE file
+
+ ***** END LICENSE BLOCK ***** -->
+<body>
+<table border="0" style="font-size:12px; margin-top:0px;">
+ <tr>
+ <td align="left" valign="top">
+ <u style="font-size:15px">Anno</u><br/>
+ <b>%Y%</b> = 2009, 2012<br/>
+ <b>%y%</b> = 09, 12<br/>
+
+ </td>
+ <td align="left" valign="top">
+ <u style="font-size:15px">Mese</u><br/>
+ <b>%m%</b> = da 01 a 12<br/>
+ <b>%n%</b> = da 1 a 12<br/>
+ </td>
+ <td align="left" valign="top">
+ <u style="font-size:15px">Giorno</u> :<br/>
+ <b>%d%</b> = da 01 a 31<br/>
+ <b>%j%</b> = da 1 a 31<br/>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="3" valign="top">
+ <br/>
+ <u style="font-size:15px">Tag speciali - semplice</u> :<br/>
+ <table style="font-size:12px;">
+ <tr>
+ <td valign="top"><b>%asf_D%</b></td><td>= Nome dominio. (senza http://)</td>
+ </tr>
+ <tr>
+ <td valign="top"><b>%asf_F%</b></td><td>= Nome file con estensione.</td>
+ </tr>
+ <tr>
+ <td valign="top"><b>%asf_Fx%</b></td><td>= Nome file senza estensione.</td>
+ </tr>
+ <tr>
+ <td valign="top"><b>%asf_d%</b></td><td>= Campo "Dominio" dal filtro usato. (I caratteri non permessi verranno rimossi. Se nessun filtro viene trovato, viene usato il dominio corrente)</td>
+ </tr>
+ <tr>
+ <td valign="top"><b>%asf_f%</b></td><td>= Campo "Nome file" dal filtro usato. (I caratteri non permessi verranno rimossi. Se nessun filtro viene trovato, viene usato il dominio corrente)</td>
+ </tr>
+ <tr>
+ <td valign="top"><b>%asf_x%</b></td><td>= Estensione file. (Senza il punto)</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="3" valign="top">
+ <br/>
+ <u style="font-size:15px">Tag speciali - avanzate</u> :<br/>
+ <b>%asf_rd%</b><u>Espressione regolare</u><b>%asf_rd%</b><br/>
+ Controlla il dominio completo con l'espressione regolare contenuta tra i due tag <b>%asf_rd%</b> e ritorna i dati presi.
+ <br/>
+ <br/>
+ <b>%asf_rf%</b><u>espressione regolare</u><b>%asf_rf%</b><br/>
+ Controlla il nome del file con l'espressione regolare contenuta tra i due tag <b>%asf_rf%</b> e ritorna i dati presi.
+ <br/>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="3" valign="top">
+ <br/>
+ <b>ATTENZIONE</b> : Se il risultato per il percorso di salvataggio contiene caratteri non permessi(i : or i ?"*\/<>|: su Windows), l'estensione smetterà di funzionare. Controllare i filtri se l'estensione smette di funzionare.<br/>
+
+ </td>
+ </tr>
+</table></body></html>
\ No newline at end of file
diff --git a/skin/add.png b/skin/add.png
new file mode 100644
index 0000000..99552a9
Binary files /dev/null and b/skin/add.png differ
diff --git a/skin/asf-icon.png b/skin/asf-icon.png
new file mode 100644
index 0000000..c72e31a
Binary files /dev/null and b/skin/asf-icon.png differ
diff --git a/skin/delete.png b/skin/delete.png
new file mode 100644
index 0000000..7f3572c
Binary files /dev/null and b/skin/delete.png differ
diff --git a/skin/delete_disabled.png b/skin/delete_disabled.png
new file mode 100644
index 0000000..6f6d46d
Binary files /dev/null and b/skin/delete_disabled.png differ
diff --git a/skin/down.png b/skin/down.png
new file mode 100644
index 0000000..8206e38
Binary files /dev/null and b/skin/down.png differ
diff --git a/skin/down_disabled.png b/skin/down_disabled.png
new file mode 100644
index 0000000..fda6b16
Binary files /dev/null and b/skin/down_disabled.png differ
diff --git a/skin/off.png b/skin/off.png
new file mode 100644
index 0000000..372c4da
Binary files /dev/null and b/skin/off.png differ
diff --git a/skin/on.png b/skin/on.png
new file mode 100644
index 0000000..f5cb109
Binary files /dev/null and b/skin/on.png differ
diff --git a/skin/screen_apps_fr.png b/skin/screen_apps_fr.png
new file mode 100644
index 0000000..305e95f
Binary files /dev/null and b/skin/screen_apps_fr.png differ
diff --git a/skin/screen_save_50fr.png b/skin/screen_save_50fr.png
new file mode 100644
index 0000000..8cba329
Binary files /dev/null and b/skin/screen_save_50fr.png differ
diff --git a/skin/screen_save_80fr.png b/skin/screen_save_80fr.png
new file mode 100644
index 0000000..fd40996
Binary files /dev/null and b/skin/screen_save_80fr.png differ
diff --git a/skin/screen_save_fr.png b/skin/screen_save_fr.png
new file mode 100644
index 0000000..60d8d8f
Binary files /dev/null and b/skin/screen_save_fr.png differ
diff --git a/skin/style.css b/skin/style.css
new file mode 100644
index 0000000..ea79a44
--- /dev/null
+++ b/skin/style.css
@@ -0,0 +1,16 @@
+treechildren::-moz-tree-checkbox
+{
+ /* unchecked checkbox treecells */
+ list-style-image: url("chrome://asf/skin/off.png");
+}
+treechildren::-moz-tree-checkbox(checked)
+{
+ /* checked checkbox treecells*/
+ list-style-image: url("chrome://asf/skin/on.png");
+}
+treechildren::-moz-tree-checkbox(disabled)
+{
+ /* disabled checkbox treecells */
+ list-style-image: none;
+}
+
diff --git a/skin/up.png b/skin/up.png
new file mode 100644
index 0000000..8ff0de3
Binary files /dev/null and b/skin/up.png differ
diff --git a/skin/up_disabled.png b/skin/up_disabled.png
new file mode 100644
index 0000000..18ba461
Binary files /dev/null and b/skin/up_disabled.png differ
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/automatic-save-folder.git
More information about the Pkg-mozext-commits
mailing list