aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
# Sweden - Drevdagen
# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
T 682000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
td class='right'>bin
0 -> 9216 bytes
-rw-r--r--src/chrome/content/icons/arrow-dn.gifbin0 -> 56 bytes
-rw-r--r--src/chrome/content/icons/check.pngbin0 -> 751 bytes
-rw-r--r--src/chrome/content/icons/cross.pngbin0 -> 951 bytes
-rw-r--r--src/chrome/content/icons/isp.pngbin0 -> 1150 bytes
-rw-r--r--src/chrome/content/icons/new.pngbin0 -> 544 bytes
-rw-r--r--src/chrome/content/icons/options.pngbin0 -> 1150 bytes
-rw-r--r--src/chrome/content/icons/pencil.pngbin0 -> 810 bytes
-rw-r--r--src/chrome/content/options/options.js80
-rw-r--r--src/chrome/content/options/options.xul32
-rw-r--r--src/chrome/content/proxy.js1080
-rw-r--r--src/chrome/content/proxy.xul125
-rw-r--r--src/chrome/content/proxy_moz.xul118
-rw-r--r--src/chrome/content/proxy_thunder.xul60
-rw-r--r--src/chrome/content/tabmanager.js146
-rw-r--r--src/chrome/locale/README.txt12
-rw-r--r--src/chrome/locale/cs-CZ/contents.rdf19
-rw-r--r--src/chrome/locale/cs-CZ/locale.dtd118
-rw-r--r--src/chrome/locale/cs-CZ/locale.properties56
-rw-r--r--src/chrome/locale/de-DE/contents.rdf19
-rw-r--r--src/chrome/locale/de-DE/locale.dtd117
-rw-r--r--src/chrome/locale/de-DE/locale.properties56
-rw-r--r--src/chrome/locale/en-US/contents.rdf19
-rw-r--r--src/chrome/locale/en-US/locale.dtd117
-rw-r--r--src/chrome/locale/en-US/locale.properties56
-rw-r--r--src/chrome/locale/es-ES/contents.rdf19
-rw-r--r--src/chrome/locale/es-ES/locale.dtd117
-rw-r--r--src/chrome/locale/es-ES/locale.properties56
-rw-r--r--src/chrome/locale/fa-IR/contents.rdf19
-rw-r--r--src/chrome/locale/fa-IR/locale.dtd118
-rw-r--r--src/chrome/locale/fa-IR/locale.properties47
-rw-r--r--src/chrome/locale/fr-FR/contents.rdf19
-rw-r--r--src/chrome/locale/fr-FR/locale.dtd118
-rw-r--r--src/chrome/locale/fr-FR/locale.properties55
-rw-r--r--src/chrome/locale/hu-HU/contents.rdf19
-rw-r--r--src/chrome/locale/hu-HU/locale.dtd117
-rw-r--r--src/chrome/locale/hu-HU/locale.properties55
-rw-r--r--src/chrome/locale/is-IS/contents.rdf21
-rw-r--r--src/chrome/locale/is-IS/locale.dtd117
-rw-r--r--src/chrome/locale/is-IS/locale.properties56
-rw-r--r--src/chrome/locale/it-IT/contents.rdf19
-rw-r--r--src/chrome/locale/it-IT/locale.dtd118
-rw-r--r--src/chrome/locale/it-IT/locale.properties56
-rw-r--r--src/chrome/locale/ja-JP/contents.rdf19
-rw-r--r--src/chrome/locale/ja-JP/locale.dtd117
-rw-r--r--src/chrome/locale/ja-JP/locale.properties56
-rw-r--r--src/chrome/locale/zh-CN/contents.rdf19
-rw-r--r--src/chrome/locale/zh-CN/locale.dtd117
-rw-r--r--src/chrome/locale/zh-CN/locale.properties57
-rw-r--r--src/chrome/locale/zh-TW/contents.rdf19
-rw-r--r--src/chrome/locale/zh-TW/locale.dtd118
-rw-r--r--src/chrome/locale/zh-TW/locale.properties57
-rw-r--r--src/install.rdf83
64 files changed, 5265 insertions, 0 deletions
diff --git a/multiproxy_switch_1.33.xpi b/multiproxy_switch_1.33.xpi
new file mode 100644
index 0000000..3dc7567
--- /dev/null
+++ b/multiproxy_switch_1.33.xpi
Binary files differ
diff --git a/src/chrome.manifest b/src/chrome.manifest
new file mode 100644
index 0000000..48998ce
--- /dev/null
+++ b/src/chrome.manifest
@@ -0,0 +1,20 @@
+content mproxy chrome/content/
+
+
+overlay chrome://browser/content/browser.xul chrome://mproxy/content/proxy.xul
+overlay chrome://navigator/content/navigator.xul chrome://mproxy/content/proxy_moz.xul
+overlay chrome://messenger/content/mailWindowOverlay.xul chrome://mproxy/content/proxy_thunder.xul
+overlay chrome://messenger/content/messengercompose/messengercompose.xul chrome://mproxy/content/proxy_thunder.xul
+
+locale mproxy en-US chrome/locale/en-US/
+locale mproxy cs-CZ chrome/locale/cs-CZ/
+locale mproxy de-DE chrome/locale/de-DE/
+locale mproxy es-ES chrome/locale/es-ES/
+locale mproxy fa-IR chrome/locale/fa-IR/
+locale mproxy fr-FR chrome/locale/fr-FR/
+locale mproxy hu-HU chrome/locale/hu-HU/
+locale mproxy is-IS chrome/locale/is-IS/
+locale mproxy it-IT chrome/locale/it-IT/
+locale mproxy ja-JP chrome/locale/ja-JP/
+locale mproxy zh-CN chrome/locale/zh-CN/
+locale mproxy zh-TW chrome/locale/zh-TW/ \ No newline at end of file
diff --git a/src/chrome/content/about.js b/src/chrome/content/about.js
new file mode 100644
index 0000000..f8370b4
--- /dev/null
+++ b/src/chrome/content/about.js
@@ -0,0 +1,97 @@
+
+function open_tab(UrlToGoTo) {
+ if( MPS_isThunderBird() ) {
+ var messenger = Components.classes["@mozilla.org/messenger;1"].createInstance()
+ .QueryInterface(Components.interfaces.nsIMessenger);
+
+ messenger.launchExternalURL(UrlToGoTo);
+ } else {
+ var navWindow;
+
+ // Try to get the most recently used browser window
+ try {
+ var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]
+ .getService(Components.interfaces.nsIWindowMediator);
+ navWindow = wm.getMostRecentWindow("navigator:browser");
+ } catch(ex) {}
+
+ if (navWindow) { // Open the URL in most recently used browser window
+ if ("delayedOpenTab" in navWindow) {
+ navWindow.delayedOpenTab(UrlToGoTo);
+ } else if ("loadURI" in navWindow) {
+ navWindow.loadURI(UrlToGoTo);
+ } else {
+ navWindow._content.location.href = UrlToGoTo;
+ }
+ } else { // If there is no recently used browser window open new browser window with the URL
+ var ass = Components.classes["@mozilla.org/appshell/appShellService;1"]
+ .getService(Components.interfaces.nsIAppShellService);
+ var win = ass.hiddenDOMWindow;
+
+ win.openDialog("chrome://navigator/content/navigator.xul", "",
+ "chrome,all, dialog=no", UrlToGoTo );
+ }
+ }
+ /*
+ var uri = Components.classes["@mozilla.org/network/standard-url;1"].createInstance(Components.interfaces.nsIURI);
+ uri.spec = aURL;
+ var protocolSvc = Components.classes["@mozilla.org/uriloader/external-protocol-service;1"].getService(Components.interfaces.nsIExternalProtocolService);
+ protocolSvc.loadUrl(uri);
+ */
+}
+
+
+const SEAMONKEY_ID = "{92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}";
+const THUNDERBIRD_ID = "{3550f703-e582-4d05-9a08-453d09bdfdc6}";
+function MPS_isThunderBird() {
+ var id;
+ if("@mozilla.org/xre/app-info;1" in Components.classes) {
+ // running under Mozilla 1.8 or later
+ id = Components.classes["@mozilla.org/xre/app-info;1"]
+ .getService(Components.interfaces.nsIXULAppInfo).ID;
+ } else {
+ try {
+ id = Components.classes["@mozilla.org/preferences-service;1"]
+ .getService(Components.interfaces.nsIPrefBranch)
+ .getCharPref("app.id");
+ } catch(e) {
+ }
+ }
+ if ( id != null && id == THUNDERBIRD_ID ) {
+ return true;
+ }
+ else {
+ return false;
+ }
+}
+
+function MPS_isSunbirdOrLightning() {
+ var id;
+ if("@mozilla.org/xre/app-info;1" in Components.classes) {
+ // running under Mozilla 1.8 or later
+ id = Components.classes["@mozilla.org/xre/app-info;1"]
+ .getService(Components.interfaces.nsIXULAppInfo).ID;
+ } else {
+ try {
+ id = Components.classes["@mozilla.org/preferences-service;1"]
+ .getService(Components.interfaces.nsIPrefBranch)
+ .getCharPref("app.id");
+ } catch(e) {
+ }
+ }
+
+ // check if this is Sunbird
+ if ( id != null && id == "{718e30fb-e89b-41dd-9da7-e25a45638b28}" ) {
+ return true;
+ }
+ else if ( id != null && id == THUNDERBIRD_ID ) {
+ var em = Components.classes["@mozilla.org/extensions/manager;1"]
+ .getService(Components.interfaces.nsIExtensionManager);
+ var addon = em.getItemForID("{e2fda1a4-762b-4020-b5ad-a41df1933103}");
+ // check to see if the version attribute exists (if not, then the addon doesn't exist)
+ if ( addon != null && (addon.version != null && addon.version != "" )) {
+ return true;
+ }
+ }
+ return false;
+}
diff --git a/src/chrome/content/contents.rdf b/src/chrome/content/contents.rdf
new file mode 100644
index 0000000..90450c4
--- /dev/null
+++ b/src/chrome/content/contents.rdf
@@ -0,0 +1,50 @@
+<?xml version="1.0"?>
+
+<RDF:RDF xmlns:chrome="http://www.mozilla.org/rdf/chrome#"
+ xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
+
+ <RDF:Seq about="urn:mozilla:package:root">
+ <RDF:li resource="urn:mozilla:package:mproxy"/>
+ </RDF:Seq>
+
+ <RDF:Description about="urn:mozilla:package:mproxy"
+ chrome:author="Based on SwitchProxy by Jeremy Gillick"
+ chrome:authorURL="http://mcfreds.blogspot.com/"
+ chrome:description="Multiproxy Switch lets you set local proxy in Firefox and Thunderbird, and do more."
+ chrome:displayName="Multiproxy Switch"
+ chrome:extension="true"
+ chrome:name="Multiproxy Switch"
+ chrome:settingsURL="chrome://mproxy/content/options/options.xul"
+ chrome:uninstallFunc="mproxy_uninstall">
+ </RDF:Description>
+
+ <RDF:Seq about="urn:mozilla:overlays">
+ <!-- Firefox -->
+ <RDF:li resource="chrome://browser/content/browser.xul"/>
+
+ <!-- Mozilla -->
+ <RDF:li resource="chrome://navigator/content/navigator.xul"/>
+
+ <!-- Thunderbird -->
+ <RDF:li resource="chrome://messenger/content/mailWindowOverlay.xul"/>
+ <RDF:li resource="chrome://messenger/content/messengercompose/messengercompose.xul"/>
+ </RDF:Seq>
+
+ <!-- Firefox -->
+ <RDF:Seq about="chrome://browser/content/browser.xul">
+ <RDF:li>chrome://mproxy/content/proxy.xul</RDF:li>
+ </RDF:Seq>
+
+ <!-- Mozilla -->
+ <RDF:Seq about="chrome://navigator/content/navigator.xul">
+ <RDF:li>chrome://mproxy/content/proxy_moz.xul</RDF:li>
+ </RDF:Seq>
+
+ <!-- Thunderbird -->
+ <RDF:Seq about="chrome://messenger/content/mailWindowOverlay.xul">
+ <RDF:li>chrome://mproxy/content/proxy_thunder.xul</RDF:li>
+ </RDF:Seq>
+ <RDF:Seq about="chrome://messenger/content/messengercompose/messengercompose.xul">
+ <RDF:li>chrome://mproxy/content/proxy_thunder.xul</RDF:li>
+ </RDF:Seq>
+</RDF:RDF>
diff --git a/src/chrome/content/datasource.js b/src/chrome/content/datasource.js
new file mode 100644
index 0000000..e31a1ec
--- /dev/null
+++ b/src/chrome/content/datasource.js
@@ -0,0 +1,386 @@
+//DataSource
+var gSProxyDs = null;
+var gSProxyRdf = null;
+var gSProxyRdfC = null;
+var gSProxyRDFUtil = null
+
+//Initializes the RDF Datasource components
+function mproxy_ds_initDataSource(){
+ try{
+
+ // Datasource URI
+ if(gSProxyRdfDataSouce == "rdf:local-store"){
+ var file = Components.classes["@mozilla.org/file/directory_service;1"].getService(Components.interfaces.nsIProperties);
+ var io = Components.classes["@mozilla.org/network/io-service;1"].getService(Components.interfaces.nsIIOService);
+ file = file.get("PrefD", Components.interfaces.nsILocalFile);
+ file.appendRelativePath("multiproxy.rdf");
+
+ io = io.newFileURI(file);
+ gSProxyRdfDataSouce = io.spec;
+ }
+
+ if(gSProxyRdf == null)
+ gSProxyRdf = Components.classes["@mozilla.org/rdf/rdf-service;1"].getService(Components.interfaces.nsIRDFService);
+ if(gSProxyDs == null)
+ gSProxyDs = gSProxyRdf.GetDataSourceBlocking(gSProxyRdfDataSouce);
+ if(gSProxyRDFUtil == null)
+ gSProxyRDFUtil = Components.classes["@mozilla.org/rdf/container-utils;1"].getService(Components.interfaces.nsIRDFContainerUtils);
+ if(gSProxyRdfC == null){
+ gSProxyRdfC = Components.classes["@mozilla.org/rdf/container;1"].createInstance(Components.interfaces.nsIRDFContainer);
+
+ //Get or Add Sequence
+ try{
+ gSProxyRdfC.Init(gSProxyDs, gSProxyRdf.GetResource(gSProxyRdfRoot)); //Get
+ }catch(err){
+ gSProxyRdfC = gSProxyRDFUtil.MakeSeq(gSProxyDs, gSProxyRdf.GetResource(gSProxyRdfRoot)); //Create
+ }
+ }
+
+ }catch(err){ throw "(mproxy_ds_initDataSource)\n" + err; }
+}
+
+//Add RDF Observer
+function mproxy_ds_addObserver(oObserver){
+ mproxy_ds_initDataSource();
+
+ try{
+ gSProxyDs.AddObserver(oObserver);
+ }catch(err){throw "(mproxy_ds_addObserver)\n" + err}
+}
+
+//Returns resource for the given uri
+function mproxy_ds_getElement(sUri){
+ mproxy_ds_initDataSource();
+
+ try{
+ return gSProxyRdf.GetResource(sUri);
+ }catch(err){ throw "(mproxy_ds_getElement)\n" + err; }
+}
+
+//Duplicate of mproxy_ds_getElement
+function mproxy_ds_getResource(sAbout){
+ return mproxy_ds_getElement(sAbout)
+}
+
+//Returns array of all mproxy Element URIs
+// array[index] = uri
+function mproxy_ds_getAllElements(){
+ mproxy_ds_initDataSource();
+
+ var aOut = new Array();
+ var aElements = gSProxyRdfC.GetElements();
+ while(aElements.hasMoreElements()){
+ var oRes = aElements.getNext();
+ oRes = oRes.QueryInterface(Components.interfaces.nsIRDFResource);
+
+ aOut[aOut.length] = oRes.Value;
+ }
+
+ return aOut;
+}
+
+//Returns an associative array of properties (attributes) contained in sUri element
+// array[propName] = oRes
+function mproxy_ds_getPropertiesFor(sUri){
+ mproxy_ds_initDataSource();
+
+ var aOut = new Array();
+
+ //Get an array of elements for sAbout
+ try{
+ var oRes = mproxy_ds_getElement(sUri);
+ var oTrgts = gSProxyDs.ArcLabelsOut(oRes);
+ while(oTrgts.hasMoreElements()){
+ var oTrgt = oTrgts.getNext();
+
+ if (oTrgt instanceof Components.interfaces.nsIRDFResource){
+ var sTrgName = oTrgt.Value.substring(gSProxyRdfNodeUriRoot.length + 1); //return node name without URI
+ aOut[sTrgName] = oTrgt;
+ }
+ }
+ }catch(err){throw "(mproxy_ds_getPropertiesFor)\n" + err}
+
+ return aOut;
+}
+
+//Similar to 'mproxy_ds_getPropertiesFor' however returns uri=>literal_object_value
+// array[uri] = oLiteral
+function mproxy_ds_getPropertyValuesFor(sUri){
+ mproxy_ds_initDataSource();
+
+ var aOut = new Array();
+
+ //Get an array of elements for sAbout
+ try{
+ var oRes = mproxy_ds_getElement(sUri);
+ var oTrgts = gSProxyDs.ArcLabelsOut(oRes, true);
+ while(oTrgts.hasMoreElements()){
+ var oTrgt = oTrgts.getNext();
+
+ if (oTrgt instanceof Components.interfaces.nsIRDFResource){
+ aOut[oTrgt.Value] = mproxy_ds_getValueFor(oRes, oTrgt);
+ }
+ }
+ }catch(err){throw "(mproxy_ds_getPropertyValuesFor)\n" + err}
+
+ return aOut;
+}
+
+//Returns element that has this property/value
+function mproxy_ds_getElementForValue(sPropertyUri, sValue){
+ mproxy_ds_initDataSource();
+
+ try{
+ var oValue = gSProxyRdf.GetLiteral(sValue);
+ var oProp = gSProxyRdf.GetResource(sPropertyUri);
+ var oSubject = gSProxyDs.GetSource(oProp, oValue, true);
+
+ return oSubject;
+
+ }catch(err){throw "(mproxy_ds_getElementForValue)\n" + err}
+
+ return null;
+}
+
+// Returns all elements that has this property/value
+function mproxy_ds_getElementsForValue(sPropertyUri, sValue){
+ mproxy_ds_initDataSource();
+
+ var aOut = new Array();
+
+ try{
+ var oValue = gSProxyRdf.GetLiteral(sValue);
+ var oProp = gSProxyRdf.GetResource(sPropertyUri);
+ var aSubject = gSProxyDs.GetSources(oProp, oValue, true);
+ var oSubject = null
+
+ while(aSubject.hasMoreElements()){
+ oSubject = aSubject.getNext().QueryInterface(Components.interfaces.nsIRDFResource);
+ aOut[aOut.length] = oSubject;
+ }
+
+ }catch(err){throw "(mproxy_ds_getElementsForValue)\n" + err}
+
+ return aOut;
+}
+
+//Change element's URI
+function mproxy_ds_changeElementUri(oRes, sNewUri){
+ mproxy_ds_initDataSource();
+
+ try{
+
+ //Get All Properties for element
+ var aProps = mproxy_ds_getPropertyValuesFor(oRes.Value);
+
+ //Remove Element
+ mproxy_ds_removeElement(oRes.Value);
+
+ //Create element again with new URI
+ var newElem = gSProxyRdf.GetResource(sNewUri);
+ gSProxyRdfC.AppendElement(newElem);
+ for(sProp in aProps){
+ gSProxyDs.Assert(newElem, gSProxyRdf.GetResource(sProp), gSProxyRdf.GetLiteral(aProps[sProp]), true);
+ }
+
+ }catch(err){throw "(mproxy_ds_changeElementUri)\n" + err}
+}
+
+//Add element with given sUri, returns added resource
+function mproxy_ds_addElement(sUri){
+ mproxy_ds_initDataSource();
+
+ try{
+
+ return oRes = gSProxyRdfC.AppendElement(gSProxyRdf.GetResource(sUri));
+
+ }catch(err){throw "(mproxy_ds_addElement)\n" + err}
+}
+
+//Remove Element for sUri
+function mproxy_ds_removeElement(sUri){
+ mproxy_ds_initDataSource();
+
+ try{
+ var oRes = gSProxyRdf.GetResource(sUri);
+
+ //Remove All Archs
+ // Loop for duplicates
+ var aArchs = null;
+ var hasArchs = true;
+ while(hasArchs){
+ aArchs = gSProxyDs.ArcLabelsOut(oRes);
+ hasArchs = aArchs.hasMoreElements();
+ while(aArchs.hasMoreElements()){
+ oArch = aArchs.getNext().QueryInterface(Components.interfaces.nsIRDFResource);
+
+ //Remove
+ gSProxyDs.Unassert(oRes, oArch, gSProxyDs.GetTarget(oRes, oArch, true));
+ }
+ }
+
+ //Remove Element
+ gSProxyRdfC.RemoveElement(oRes, true);
+ }catch(err){throw "(mproxy_ds_removeElement)\n" + err}
+}
+
+//Remove property (sUri) from oRes
+function mproxy_ds_removeProperty(sUri, oRes, sValue){
+ mproxy_ds_initDataSource();
+
+ try{
+ var oPred = gSProxyRdf.GetResource(sUri);
+ var aValues = mproxy_ds_getValuesFor(oRes, oPred);
+
+ if(typeof(sValue) == 'undefined'){
+ // Make sure to delete all properites of this sUri
+ for(var i = 0; i < aValues.length; i++){
+ gSProxyDs.Unassert(oRes, oPred, gSProxyRdf.GetLiteral(aValues[i]) );
+ }
+ }
+ else{
+ // Only delete the property with this value
+ sValue = gSProxyRdf.GetLiteral(sValue);
+ if(gSProxyDs.HasAssertion(oRes, oPred, sValue, true)){
+ gSProxyDs.Unassert(oRes, oPred, sValue);
+ }
+ }
+
+ }catch(err){throw "(mproxy_ds_removeProperty)\n" + err}
+}
+
+//Does URI Exist
+function mproxy_ds_doesProxyElementExist(sProxyUri){
+ mproxy_ds_initDataSource();
+
+ try{
+ var aElems = mproxy_ds_getAllElements();
+ for(var e = 0; e < aElems.length; e++){
+ if(aElems[e] == sProxyUri)
+ return true;
+ }
+ }catch(err){throw "(mproxy_ds_doesElementExist)\n" + err}
+}
+
+//Get Index of URI
+function mproxy_ds_indexOf(sProxyUri){
+ mproxy_ds_initDataSource();
+
+ try{
+ return gSProxyRdfC.IndexOf(mproxy_ds_getResource(sProxyUri));
+ }catch(err){throw "(mproxy_ds_indexOf)\n" + err}
+}
+
+//Rename oProp's URI to sNewUri
+function mproxy_ds_renamePropertyUri(oRes, oProp, sNewUri){
+ mproxy_ds_initDataSource();
+
+ try{
+ var sValue = gSProxyDs.GetTarget(oRes, oProp, true).QueryInterface(Components.interfaces.nsIRDFLiteral);
+
+ gSProxyDs.Unassert(oRes, oProp, gSProxyDs.GetTarget(oRes, oProp, true));
+ gSProxyDs.Assert(oRes, gSProxyRdf.GetResource(sNewUri), sValue, true);
+
+ }catch(err){throw "(mproxy_ds_renamePropertyUri)\n" + err}
+}
+
+//Add Property oProp to oRes
+function mproxy_ds_addProperty(oRes, oProp, sValue, overwriteExisting){
+ mproxy_ds_initDataSource();
+
+ try{
+ //Don't overwrite it this property exists
+ if(!overwriteExisting && gSProxyDs.hasArcOut(oRes, oProp))
+ return;
+
+ //Add
+ gSProxyDs.Assert(oRes, oProp, gSProxyRdf.GetLiteral(sValue), true);
+ }catch(err){throw "(mproxy_ds_addProperty)\n" + err}
+}
+
+//Change Property value for sPropUri in oRes
+function mproxy_ds_changePropertyValue(oRes, sPropUri, sValue){
+ mproxy_ds_initDataSource();
+
+ try{
+ var oProp = gSProxyRdf.GetResource(sPropUri);
+
+ //Get old value
+ var sOld = mproxy_ds_getValueFor(oRes, oProp);
+
+ //Change
+ gSProxyDs.Change(oRes, oProp, gSProxyRdf.GetLiteral(sOld), gSProxyRdf.GetLiteral(sValue));
+
+ }catch(err){throw "(mproxy_ds_changePropertyValue)\n" + err}
+}
+
+//Get Property Value for Property oProp
+function mproxy_ds_getValueFor(oRes, oProp){
+ mproxy_ds_initDataSource();
+
+ try{
+ oTrgt = gSProxyDs.GetTarget(oRes, oProp, true);
+
+ if(oTrgt instanceof Components.interfaces.nsIRDFLiteral){
+ return oTrgt.Value;
+ }
+
+ }catch(err){throw "(mproxy_ds_getValueFor)\n" + err}
+
+ return null;
+}
+
+//Get All Property Values for Property oProp
+// This is similiar to mproxy_ds_getValueFor
+// except it returns ALL values for oProp in an array
+// array[index] = sValue
+function mproxy_ds_getValuesFor(oRes, oProp){
+ mproxy_ds_initDataSource();
+
+ var aOut = new Array();
+
+ try{
+ var aTrgts = gSProxyDs.GetTargets(oRes, oProp, true)
+ var oTrgt = null;
+
+ while(aTrgts.hasMoreElements()){
+ oTrgt = aTrgts.getNext()
+
+ if(oTrgt instanceof Components.interfaces.nsIRDFLiteral){
+ aOut[aOut.length] = oTrgt.Value;
+ }
+ }
+ }catch(err){throw "(mproxy_ds_getValueFor)\n" + err}
+
+ return aOut;
+}
+
+//Does Property/Value exist in oRes
+function mproxy_ds_doesPropValueExist(oRes, sPropUri, sValue){
+ mproxy_ds_initDataSource();
+
+ try{
+ var oProp = gSProxyRdf.GetResource(sPropUri);
+ var aValues = mproxy_ds_getValuesFor(oRes, oProp);
+
+ //Find in array
+ for(var i = 0; i < aValues.length; i++){
+ if(aValues[i] == sValue)
+ return true;
+ }
+
+ }catch(err){throw "(mproxy_ds_doesPropValueExist)\n" + err}
+
+ return false;
+}
+
+/*
+* GET PROPERTIES
+*/
+
+ //Get RDF Container
+ function mproxy_ds_getRDFContainer(){
+ mproxy_ds_initDataSource();
+ return gSProxyRdf;
+ }
+
diff --git a/src/chrome/content/dialogs/about.xul b/src/chrome/content/dialogs/about.xul
new file mode 100644
index 0000000..3363c81
--- /dev/null
+++ b/src/chrome/content/dialogs/about.xul
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+
+<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
+
+<!DOCTYPE dialog SYSTEM "chrome://mproxy/locale/locale.dtd">
+
+<dialog buttons="accept"
+ id="aboutmproxy"
+ ondialogaccept="return true"
+ title="&about.title;"
+ xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+ onload="mproxy_setVersion()" >
+
+ <script type="application/x-javascript" src="chrome://mproxy/content/globals.js"></script>
+ <script type="application/x-javascript" src="chrome://mproxy/content/about.js"></script>
+ <script language="JavaScript">
+ <![CDATA[
+ function mproxy_setVersion(){
+ var oLabel = document.getElementById("mproxy-version");
+
+ if(oLabel != null && gmproxy_Version != null){
+ oLabel.value += " "+ gmproxy_Version;
+ }
+ }
+ ]]>
+ </script>
+
+ <vbox style="width: 200px;">
+ <hbox>
+ <label value="&common.product.name;" style="font-weight: bold; margin-right: 2px;" />
+ <label value="v" id="mproxy-version" style="margin-left: 2px;" />
+ </hbox>
+ <label value="Based on SwitchProxy by Jeremy Gillick" />
+ <label value="http://multiproxyswitch.blogspot.com"
+ style="color: #0000FF; text-decoration: underline; cursor: pointer;"
+ onclick="open_tab('http://multiproxyswitch.blogspot.com');" />
+ </vbox>
+</dialog> \ No newline at end of file
diff --git a/src/chrome/content/dialogs/editcommon.js b/src/chrome/content/dialogs/editcommon.js
new file mode 100644
index 0000000..c24b619
--- /dev/null
+++ b/src/chrome/content/dialogs/editcommon.js
@@ -0,0 +1,18 @@
+//Has Special Chars
+// + returns true if it only
+// + contains allowed chars
+function mproxy_allowedChars(str){
+ //var regex = new RegExp("[\\s\\.a-zA-Z0-9_]", "g"); //This does not allow utf-8 text!
+ var regex = new RegExp("[(){}\\\[\\\]<>,;:/~`'\"*?^$#&\\t\\n\\r\\\\]", "g");
+ return !regex.test(str);
+}
+
+// Used to test strings
+// + converts space to underscore
+// + and converts to lowercase
+function mproxy_simplify(str){
+ str = str.replace(new RegExp("\\s{2,}", "g"), " ");
+ str = str.replace(new RegExp("\\s", "g"), "_");
+ str = str.toLowerCase();
+ return str;
+} \ No newline at end of file
diff --git a/src/chrome/content/dialogs/editproxy.js b/src/chrome/content/dialogs/editproxy.js
new file mode 100644
index 0000000..3e01c58
--- /dev/null
+++ b/src/chrome/content/dialogs/editproxy.js
@@ -0,0 +1,311 @@
+
+var gIsEdit = false;
+var gList;
+var mproxyURI;
+var mproxy;
+var mproxyConfig;
+var mproxyNameField;
+var gFromProxyManager;
+
+function mproxy_initVals(){
+
+
+ //Set Globals
+ mproxyNameField = document.getElementById("proxy-name");
+
+ //Edit
+ if(window.arguments.length > 1 && window.arguments[0] == "edit" && !mproxy_isEmpty(window.arguments[1])){
+
+ //Proxy URI
+ mproxyURI = window.arguments[1];
+
+ gIsEdit = true;
+ try{
+ mproxy = mproxy_ds_getResource(mproxyURI);
+
+ //Load Fields
+ var mproxyConfig = mproxy_ds_getPropertyValuesFor(mproxyURI);
+ for(key in gmproxy_options){
+ var oField = document.getElementById(key);
+ var sValue = mproxyConfig[gSProxyRdfNodeUriRoot + "#" + key];
+
+ oField.value = sValue;
+ }
+
+ //Label
+ mproxyNameField.value = mproxyConfig[gSProxyRdfNodeName];
+
+ //Set Socks Radio
+ oSocks = document.getElementById("networkProxySOCKSVersion");
+ if(oSocks.value == "4")
+ oSocks.selectedItem = document.getElementById("networkProxySOCKSVersion4");
+ else
+ oSocks.selectedItem = document.getElementById("networkProxySOCKSVersion5");
+
+ //Share one proxy
+ oShare = document.getElementById("networkProxyHTTPShare");
+ if (oShare.value == "true")
+ //oShare.checked = true;
+ document.getElementById("networkProxyHTTPShare").checked = oShare.value;
+
+ else
+ oShare.checked = false;
+
+ //Sharing box
+ //if (document.getElementById("networkProxyHTTPShare").value == "true");
+
+
+
+ }catch(err){ alert(mproxy_getString("error.unknown")); self.close(); }
+ }
+
+ //Enable Fields
+
+ mproxy_enableShareSettingOnStart();
+ mproxy_enableOptions();
+
+ // Thunderbird
+ if(navigator.userAgent.search(/Thunderbird/gi) > -1){
+ document.getElementById("ftp_row").style.display = "none";
+ document.getElementById("gopher_row").style.display = "none";
+ document.getElementById("none_row").style.display = "none";
+ document.getElementById("none_example_row").style.display = "none";
+ }
+}
+
+function mproxy_saveProxy(){
+
+ try{
+
+ /*
+ * Validation
+ */
+ //Empty
+ if(mproxyNameField.value == ""){
+ alert(mproxy_getString("error.add.empty"));
+
+ mproxyNameField.focus();
+ mproxyNameField.setSelectionRange(0, mproxyNameField.textLength);
+
+ return false;
+ }
+ //Special Chars
+ else if(!mproxy_allowedChars(mproxyNameField.value)){
+ alert(mproxy_getString("error.add.invalid"));
+ return false;
+ }
+ //Can't be named 'None' or 'tor'
+ else if(mproxy_simplify(mproxyNameField.value) == mproxy_simplify(mproxy_getString("common.proxy.none"))){
+ alert(mproxy_getString("error.add.duplicate"));
+ return false;
+ }
+ //else if((!gIsEdit) && (mproxy_simplify(mproxyNameField.value) == mproxy_simplify("tor"))){
+ // alert(mproxy_getString("error.add.duplicate"));
+ // return false;
+ // }
+ // else if((!gIsEdit) && (mproxy_simplify(mproxyNameField.value) == mproxy_simplify(mproxy_getString("common.proxy.tor")))){
+ // alert(mproxy_getString("error.add.duplicate"));
+ // return false;
+ // }
+
+ //Is This a Duplicate Label?
+ var oTestProxy = mproxy_ds_getElementForValue(gSProxyRdfNodeName, mproxyNameField.value);
+ if(oTestProxy != null && (!gIsEdit || oTestProxy.Value != mproxy.Value)){
+ alert(mproxy_getString("error.add.duplicate"));
+ return false;
+ }
+
+ //save share setting
+ document.getElementById("networkProxyHTTPShare").value = document.getElementById("networkProxyHTTPShare").checked;
+
+ /*
+ * Edit
+ */
+ if(gIsEdit){
+ //Update RDF Properties
+ for(key in gmproxy_options){
+ mproxy_ds_changePropertyValue(mproxy, (gSProxyRdfNodeUriRoot + "#" + key), document.getElementById(key).value);
+ }
+
+ //Update Name
+ mproxy_ds_changePropertyValue(mproxy, gSProxyRdfNodeName, mproxyNameField.value);
+ }
+ /*
+ * Add
+ */
+ else{
+ var sProxyUri = opener.mproxy_getUniqueProxyUri();
+ var oProxy = mproxy_ds_getResource(sProxyUri);
+
+ //Add Element
+ mproxy_ds_addElement(sProxyUri);
+
+ //Add Properties
+ for(key in gmproxy_options){
+ var oProp = mproxy_ds_getResource(gSProxyRdfNodeUriRoot + "#" + key);
+ mproxy_ds_addProperty(oProxy, oProp, document.getElementById(key).value, true);
+ }
+
+ //Add Name
+ mproxy_ds_addProperty(oProxy, mproxy_ds_getResource(gSProxyRdfNodeName), mproxyNameField.value, true);
+ }
+ /*
+ * Finish
+ */
+ opener.mproxy_populateList();
+
+ if(gIsEdit){
+
+ //Is this proxy is in use, refresh proxy
+ var oPrefs = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch);
+ if(oPrefs.prefHasUserValue("mproxy.proxy.current")
+ && oPrefs.getCharPref("mproxy.proxy.current") == mproxy.Value){
+
+ opener.mproxy_doCommand("mproxy_setProxy()");
+ }
+ //If not in use, select proxy
+ else{
+ opener.mproxy_doCommand("mproxy_selectItem('"+ mproxyNameField.value +"')");
+ }
+
+ //alert("Proxy Info Changed");
+ }
+ else{
+ opener.mproxy_doCommand("mproxy_selectItem('"+ mproxyNameField.value +"')");
+ //alert("Proxy Added");
+ }
+
+
+ }catch(e){
+ alert(mproxy_getString("error.unknown") +"\n("+ e +")");
+ return;
+ }
+
+ mproxy_openerFocus()
+ return true;
+}
+
+
+//Enable or disable Manual
+// + config options
+function mproxy_enableOptions(){
+
+ var disable = !(document.getElementById("networkProxyType").value == "1"); //if 1 then manual is selected
+
+ //Set Radios
+ oType = document.getElementById("networkProxyType");
+ if(!disable){
+ oType.selectedItem = document.getElementById("type-manual-radio");
+
+ }
+ else{
+ oType.selectedItem = document.getElementById("type-auto-radio");
+ }
+ if (document.getElementById("networkProxyType").value == "2"){
+
+ //Manual Options
+ document.getElementById("networkProxyHTTP").disabled = true;
+ document.getElementById("networkProxyHTTP_Port").disabled = true;
+ document.getElementById("networkProxyHTTPShare").disabled = true;
+ document.getElementById("networkProxySSL").disabled = true;
+ document.getElementById("networkProxySSL_Port").disabled = true;
+ document.getElementById("networkProxyFTP").disabled = true;
+ document.getElementById("networkProxyFTP_Port").disabled = true;
+ document.getElementById("networkProxyGopher").disabled = true;
+ document.getElementById("networkProxyGopher_Port").disabled = true;
+ document.getElementById("networkProxySOCKS").disabled = true;
+ document.getElementById("networkProxySOCKS_Port").disabled = true;
+ document.getElementById("networkProxySOCKSVersion4").disabled = true;
+ document.getElementById("networkProxySOCKSVersion5").disabled = true;
+ document.getElementById("networkProxyNone").disabled = true;
+
+ //Auto
+ document.getElementById("networkProxyAutoconfigURL").disabled = false;
+
+}
+else{
+//When manual setting is checked
+ mproxy_enableShareSetting();
+ document.getElementById("networkProxyHTTP").disabled = false;
+ document.getElementById("networkProxyHTTP_Port").disabled = false;
+ document.getElementById("networkProxyHTTPShare").disabled = false;
+ document.getElementById("networkProxyNone").disabled = false;
+ document.getElementById("networkProxyAutoconfigURL").disabled = true;
+}
+}
+//Set setting on start-up
+function mproxy_enableShareSettingOnStart(){
+var disabletextbox = (document.getElementById("networkProxyHTTPShare").value == "true");
+
+ document.getElementById("networkProxySSL").disabled = disabletextbox;
+ document.getElementById("networkProxySSL_Port").disabled = disabletextbox;
+ document.getElementById("networkProxyFTP").disabled = disabletextbox;
+ document.getElementById("networkProxyFTP_Port").disabled = disabletextbox;
+ document.getElementById("networkProxyGopher").disabled = disabletextbox;
+ document.getElementById("networkProxyGopher_Port").disabled = disabletextbox;
+ document.getElementById("networkProxySOCKS").disabled = disabletextbox;
+ document.getElementById("networkProxySOCKS_Port").disabled = disabletextbox;
+ document.getElementById("networkProxySOCKSVersion4").disabled = disabletextbox;
+ document.getElementById("networkProxySOCKSVersion5").disabled = disabletextbox;
+
+}
+//Disable below when check sharing setting
+function mproxy_enableShareSetting(){
+var disabletextbox = (document.getElementById("networkProxyHTTPShare").checked == true);
+
+ document.getElementById("networkProxySSL").disabled = disabletextbox;
+ document.getElementById("networkProxySSL_Port").disabled = disabletextbox;
+ document.getElementById("networkProxyFTP").disabled = disabletextbox;
+ document.getElementById("networkProxyFTP_Port").disabled = disabletextbox;
+ document.getElementById("networkProxyGopher").disabled = disabletextbox;
+ document.getElementById("networkProxyGopher_Port").disabled = disabletextbox;
+ document.getElementById("networkProxySOCKS").disabled = disabletextbox;
+ document.getElementById("networkProxySOCKS_Port").disabled = disabletextbox;
+ document.getElementById("networkProxySOCKSVersion4").disabled = disabletextbox;
+ document.getElementById("networkProxySOCKSVersion5").disabled = disabletextbox;
+
+ //if (document.getElementById("networkProxyHTTPShare").value == "true"){
+ //mproxy_copySetting();
+//}
+}
+function mproxy_enableShareSettingSelect(){
+var disabletextbox = (document.getElementById("networkProxyHTTPShare").checked == true);
+
+ document.getElementById("networkProxySSL").disabled = disabletextbox;
+ document.getElementById("networkProxySSL_Port").disabled = disabletextbox;
+ document.getElementById("networkProxyFTP").disabled = disabletextbox;
+ document.getElementById("networkProxyFTP_Port").disabled = disabletextbox;
+ document.getElementById("networkProxyGopher").disabled = disabletextbox;
+ document.getElementById("networkProxyGopher_Port").disabled = disabletextbox;
+ document.getElementById("networkProxySOCKS").disabled = disabletextbox;
+ document.getElementById("networkProxySOCKS_Port").disabled = disabletextbox;
+ document.getElementById("networkProxySOCKSVersion4").disabled = disabletextbox;
+ document.getElementById("networkProxySOCKSVersion5").disabled = disabletextbox;
+
+ //if (document.getElementById("networkProxyHTTPShare").value == "true"){
+ mproxy_copySetting();
+//}
+}
+//Copy http proxy
+function mproxy_copySetting(){
+if (document.getElementById("networkProxyHTTPShare").checked == true){
+ document.getElementById("networkProxySSL").value = document.getElementById("networkProxyHTTP").value;
+ document.getElementById("networkProxySSL_Port").value = document.getElementById("networkProxyHTTP_Port").value;
+ document.getElementById("networkProxyFTP").value = document.getElementById("networkProxyHTTP").value;
+ document.getElementById("networkProxyFTP_Port").value = document.getElementById("networkProxyHTTP_Port").value;
+ document.getElementById("networkProxyGopher").value = document.getElementById("networkProxyHTTP").value;
+ document.getElementById("networkProxyGopher_Port").value = document.getElementById("networkProxyHTTP_Port").value;
+ document.getElementById("networkProxySOCKS").value = document.getElementById("networkProxyHTTP").value;
+ document.getElementById("networkProxySOCKS_Port").value = document.getElementById("networkProxyHTTP_Port").value;
+}
+else{
+ document.getElementById("networkProxySSL").value = "";
+ document.getElementById("networkProxySSL_Port").value = "";
+ document.getElementById("networkProxyFTP").value = "";
+ document.getElementById("networkProxyFTP_Port").value = "";
+ document.getElementById("networkProxyGopher").value = "";
+ document.getElementById("networkProxyGopher_Port").value = "";
+ document.getElementById("networkProxySOCKS").value = "";
+ document.getElementById("networkProxySOCKS_Port").value = "";
+}
+}
diff --git a/src/chrome/content/dialogs/editproxy.xul b/src/chrome/content/dialogs/editproxy.xul
new file mode 100644
index 0000000..1a1cb01
--- /dev/null
+++ b/src/chrome/content/dialogs/editproxy.xul
@@ -0,0 +1,119 @@
+<?xml version="1.0"?>
+
+<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
+
+<!DOCTYPE dialog SYSTEM "chrome://mproxy/locale/locale.dtd">
+
+<dialog buttons="accept, cancel"
+ id="mproxyCookieDialog"
+ ondialogaccept="return mproxy_saveProxy()"
+ ondialogcancel="mproxy_openerFocus(); return true;"
+ onload="mproxy_initVals();"
+ title="&add.title;"
+ xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+
+ <script type="application/x-javascript" src="chrome://mproxy/content/globals.js"></script>
+ <script type="application/x-javascript" src="chrome://mproxy/content/datasource.js"></script>
+ <script type="application/x-javascript" src="chrome://mproxy/content/dialogs/editcommon.js"></script>
+ <script type="application/x-javascript" src="chrome://mproxy/content/dialogs/editproxy.js"></script>
+
+ <hbox>
+ <label value="&add.proxyLabel;" id="proxy-name-label" />
+ <textbox id="proxy-name" size="30" flex="0" />
+ </hbox>
+ <groupbox>
+ <radiogroup id="networkProxyType" value="1" persist="value">
+ <radio value="1" label="&add.option.manual;" oncommand="mproxy_enableOptions();" id="type-manual-radio" />
+
+ <grid class="indent" flex="1">
+ <columns>
+ <column/>
+ <column flex="1"/>
+ </columns>
+
+ <rows>
+ <row align="center">
+ <hbox align="center" pack="end">
+ <label value="&add.http.proxy.label;" accesskey="&add.http.proxy.key;" control="networkProxyHTTP"/>
+ </hbox>
+ <hbox align="center">
+ <textbox id="networkProxyHTTP" flex="1" oninput="mproxy_copySetting();"/>
+ <label value="&add.port.label;" control="networkProxyHTTP_Port"/>
+ <textbox id="networkProxyHTTP_Port" size="5" oninput="mproxy_copySetting();"/>
+ </hbox>
+ </row>
+
+<row align="center">
+<hbox align="center" pack="end">
+<label value=""/>
+</hbox>
+<hbox align="center">
+<checkbox id="networkProxyHTTPShare" label ="&add.sharing.proxy.label;" checked="false" oncommand="mproxy_enableShareSettingSelect();"/>
+</hbox>
+</row>
+
+ <row align="center">
+ <hbox align="center" pack="end">
+ <label value="&add.ssl.proxy.label;" accesskey="&add.ssl.proxy.key;" control="networkProxySSL"/>
+ </hbox>
+ <hbox align="center">
+ <textbox id="networkProxySSL" flex="1"/>
+ <label value="&add.port.label;" control="networkProxySSL_Port"/>
+ <textbox id="networkProxySSL_Port" size="5"/>
+ </hbox>
+ </row>
+ <row align="center" id="ftp_row">
+ <hbox align="center" pack="end">
+ <label value="&add.ftp.proxy.label;" accesskey="&add.ftp.proxy.key;" control="networkProxyFTP"/>
+ </hbox>
+ <hbox align="center">
+ <textbox id="networkProxyFTP" flex="1"/>
+ <label value="&add.port.label;" control="networkProxyFTP_Port"/>
+ <textbox id="networkProxyFTP_Port" size="5"/>
+ </hbox>
+ </row>
+ <row align="center" id="gopher_row">
+ <hbox align="center" pack="end">
+ <label value="&add.gopher.proxy.label;" accesskey="&add.gopher.proxy.key;" control="networkProxyGopher"/>
+ </hbox>
+ <hbox align="center">
+ <textbox id="networkProxyGopher" flex="1"/>
+ <label value="&add.port.label;" control="networkProxyGopher_Port"/>
+ <textbox id="networkProxyGopher_Port" size="5"/>
+ </hbox>
+ </row>
+ <row align="center">
+ <hbox align="center" pack="end">
+ <label value="&add.socks.proxy.label;" accesskey="&add.socks.proxy.key;" control="networkProxySOCKS"/>
+ </hbox>
+ <hbox align="center">
+ <textbox id="networkProxySOCKS" flex="1"/>
+ <label value="&add.port.label;" control="networkProxySOCKS_Port"/>
+ <textbox id="networkProxySOCKS_Port" size="5"/>
+ </hbox>
+ </row>
+ <row>
+ <spacer/>
+ <radiogroup id="networkProxySOCKSVersion" orient="horizontal">
+ <radio id="networkProxySOCKSVersion4" value="4" label="&add.socks.option.v4;" />
+ <radio id="networkProxySOCKSVersion5" value="5" label="&add.socks.option.v5;" />
+ </radiogroup>
+ </row>
+
+ <row align="center" id="none_row">
+ <hbox align="center" pack="end">
+ <label value="&add.none.label;" accesskey="&add.none.key;" control="networkProxyNone"/>
+ </hbox>
+ <textbox id="networkProxyNone" value="localhost, 127.0.0.1" />
+ </row>
+ <row id="none_example_row">
+ <spacer/>
+ <label value="&add.none.example;" control="networkProxyNone"/>
+ </row>
+ </rows>
+ </grid>
+ <radio value="2" label="&add.option.auto;" oncommand="mproxy_enableOptions();" id="type-auto-radio" />
+ <textbox id="networkProxyAutoconfigURL" size="50" flex="0" disabled="true" />
+ </radiogroup>
+ </groupbox>
+</dialog> \ No newline at end of file
diff --git a/src/chrome/content/dialogs/manager.xul b/src/chrome/content/dialogs/manager.xul
new file mode 100644
index 0000000..3cd0cdd
--- /dev/null
+++ b/src/chrome/content/dialogs/manager.xul
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
+
+<!DOCTYPE dialog SYSTEM "chrome://mproxy/locale/locale.dtd">
+
+<dialog buttons="accept"
+ id="mproxyCookieDialog"
+ ondialogaccept="mproxy_managerClose(); mproxy_openerFocus(); return true;"
+ ondialogcancel="mproxy_openerFocus(); return true;"
+ onload="mproxy_initProxy();"
+ title="&common.manage.label;" persist="height, width"
+ xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+
+ <script type="application/x-javascript" src="chrome://mproxy/content/globals.js"></script>
+ <script type="application/x-javascript" src="chrome://mproxy/content/datasource.js"></script>
+ <script type="application/x-javascript" src="chrome://mproxy/content/proxy.js"></script>
+ <script>
+ <![CDATA[
+ function mproxy_managerClose(){
+ try{
+ var oPrefs = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch);
+ oPrefs.setIntPref("mproxy.proxy.rdf.lastupdate", (new Date()).getTime());
+ } catch(e){ alert(e); }
+ }
+ ]]>
+ </script>
+
+ <hbox align="top" flex="1" style="overflow: auto;">
+ <listbox id="manage-proxy-list" flex="2" rows="10"></listbox>
+ <vbox>
+ <button id="new-button" label=" &common.add.label;" oncommand="mproxy_editProxyDialog(true)" image="chrome://mproxy/content/icons/new.png" />
+ <button id="edit-button" label=" &common.edit.label;" oncommand="mproxy_editProxyDialog(false)" image="chrome://mproxy/content/icons/pencil.png" />
+ <button id="remove-button" label=" &common.remove.label;" oncommand="mproxy_removeProxy(false)" image="chrome://mproxy/content/icons/cross.png" />
+ </vbox>
+ </hbox>
+</dialog> \ No newline at end of file
diff --git a/src/chrome/content/globals.js b/src/chrome/content/globals.js
new file mode 100644
index 0000000..ba46c76
--- /dev/null
+++ b/src/chrome/content/globals.js
@@ -0,0 +1,152 @@
+
+var gSProxyRdfDataSouce = "rdf:local-store";
+const gSProxyRdfRoot = "http://mozilla.org/package/mproxy/rdf/all";
+const gSProxyRdfNodeUriRoot = "http://mozilla.org/package/mproxy/rdf"
+const gSProxyRdfNodeId = gSProxyRdfNodeUriRoot+ "#id";
+const gSProxyRdfNodeName = gSProxyRdfNodeUriRoot+ "#name";
+const gSProxyRdfNodeProxy = gSProxyRdfNodeUriRoot+ "#proxy";
+
+const gmproxy_Version = "1.33";
+const gmproxy_DownloadSite = "http://switchproxy.googlepages.com";
+
+var gSProxyStrBundle = null;
+
+var gmproxy_options = new Array();
+ gmproxy_options['networkProxyType'] = "network.proxy.type";
+ gmproxy_options['networkProxyHTTP'] = "network.proxy.http";
+ gmproxy_options['networkProxyHTTP_Port'] = "network.proxy.http_port";
+ gmproxy_options['networkProxyHTTPShare'] = "network.proxy.share_proxy_settings";
+ gmproxy_options['networkProxySSL'] = "network.proxy.ssl";
+ gmproxy_options['networkProxySSL_Port'] = "network.proxy.ssl_port";
+ gmproxy_options['networkProxyFTP'] = "network.proxy.ftp";
+ gmproxy_options['networkProxyFTP_Port'] = "network.proxy.ftp_port";
+ gmproxy_options['networkProxyGopher'] = "network.proxy.gopher";
+ gmproxy_options['networkProxyGopher_Port'] = "network.proxy.gopher_port";
+ gmproxy_options['networkProxySOCKS'] = "network.proxy.socks";
+ gmproxy_options['networkProxySOCKS_Port'] = "network.proxy.socks_port";
+ gmproxy_options['networkProxySOCKSVersion'] = "network.proxy.socks_version";
+ gmproxy_options['networkProxyNone'] = "network.proxy.no_proxies_on";
+ gmproxy_options['networkProxyAutoconfigURL'] = "network.proxy.autoconfig_url";
+
+var gmproxy_options_defaults = new Array();
+ gmproxy_options_defaults['networkProxyType'] = 1;
+ gmproxy_options_defaults['networkProxyHTTP'] = "";
+ gmproxy_options_defaults['networkProxyHTTP_Port'] = 0;
+ gmproxy_options_defaults['networkProxyHTTPShare'] = false;
+ gmproxy_options_defaults['networkProxySSL'] = "";
+ gmproxy_options_defaults['networkProxySSL_Port'] = 0;
+ gmproxy_options_defaults['networkProxyFTP'] = "";
+ gmproxy_options_defaults['networkProxyFTP_Port'] = 0;
+ gmproxy_options_defaults['networkProxyGopher'] = "";
+ gmproxy_options_defaults['networkProxyGopher_Port'] = 0;
+ gmproxy_options_defaults['networkProxySOCKS'] = "127.0.0.1";
+ gmproxy_options_defaults['networkProxySOCKS_Port'] = 9050;
+ gmproxy_options_defaults['networkProxySOCKSVersion'] = 5;
+ gmproxy_options_defaults['networkProxyNone'] = "localhost, 127.0.0.1";
+ gmproxy_options_defaults['networkProxyAutoconfigURL'] = "";
+
+/*
+* Global Functions
+*/
+ //Get String Bundle
+ function mproxy_getString(sKey){
+ try{
+
+ if(gSProxyStrBundle == null){
+ var oBundle = Components.classes['@mozilla.org/intl/stringbundle;1'].getService(Components.interfaces.nsIStringBundleService);
+ gSProxyStrBundle = oBundle.createBundle('chrome://mproxy/locale/locale.properties');
+ }
+
+ return gSProxyStrBundle.GetStringFromName(sKey);
+
+ }catch(err){}
+
+ return "";
+ }
+
+ // Focus Opener
+ function mproxy_openerFocus(){
+ try{
+ if(opener != null && opener.focus != null){
+ opener.focus();
+ }
+ } catch(err) { }
+ }
+
+ //Is string empty
+ function mproxy_isEmpty(str){
+ var oRegExp = new RegExp("([^\\s])", "g");
+
+ if(str == "")
+ return true;
+
+ return !oRegExp.test(str);
+ }
+
+ // Does this sValue exist in oList
+ function mproxy_existsInList(oList, sValue){
+
+ for(var i = 0; i < oList.getRowCount(); i++){
+ if(oList.getItemAtIndex(i).value == sValue){
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ // Trims space from both sides of str
+ function mproxy_trim(str){
+ str = str.replace(new RegExp("^[\\s\\n\\r]*", "g"), "");
+ str = str.replace(new RegExp("[\\s\\n\\r]*$", "g"), "");
+
+ return str;
+ }
+
+ // Splits a domain or IP from it's port number
+ // returns array[1]
+ // array[0] = (String) Domain or IP
+ // array[1] = (String) Port Number
+ function mproxy_splitDomain(sDomain){
+ var aOut = new Array();
+ var iPort = -1;
+
+ if( (iPort = sDomain.indexOf(":")) > -1){
+ aOut[0] = sDomain.substring(0, iPort);
+ aOut[1] = sDomain.substring(iPort + 1);
+ }
+ else{
+ aOut[0] = sDomain;
+ aOut[1] = "80";
+ }
+
+ return aOut;
+ }
+
+ // Returns if str is valid domain or IP address
+ function mproxy_isValidDomain(str){
+
+ var oValidDomain = new RegExp("^[a-zA-Z0-9][a-zA-Z0-9-\\.:]{0,63}[a-zA-Z0-9]?$", "i");
+
+ return oValidDomain.test(str);
+ }
+
+/*
+* Debug Functions
+*/
+ //Get Properties for an object
+ function mproxy_debug_getProps(obj){
+ var props = "";
+ var i = -1;
+ for(prop in obj){
+ i++;
+ props += prop + " | ";
+
+ if(i > 3){
+ i = -1;
+ props += "\n";
+ }
+ }
+ alert(props);
+ }
+
diff --git a/src/chrome/content/icons/Thumbs.db b/src/chrome/content/icons/Thumbs.db
new file mode 100644
index 0000000..20e4541
--- /dev/null
+++ b/src/chrome/content/icons/Thumbs.db
Binary files differ
diff --git a/src/chrome/content/icons/arrow-dn.gif b/src/chrome/content/icons/arrow-dn.gif
new file mode 100644
index 0000000..62edbfd
--- /dev/null
+++ b/src/chrome/content/icons/arrow-dn.gif
Binary files differ
diff --git a/src/chrome/content/icons/check.png b/src/chrome/content/icons/check.png
new file mode 100644
index 0000000..59b12c3
--- /dev/null
+++ b/src/chrome/content/icons/check.png
Binary files differ
diff --git a/src/chrome/content/icons/cross.png b/src/chrome/content/icons/cross.png
new file mode 100644
index 0000000..ed39e19
--- /dev/null
+++ b/src/chrome/content/icons/cross.png
Binary files differ
diff --git a/src/chrome/content/icons/isp.png b/src/chrome/content/icons/isp.png
new file mode 100644
index 0000000..2ede6f5
--- /dev/null
+++ b/src/chrome/content/icons/isp.png
Binary files differ
diff --git a/src/chrome/content/icons/new.png b/src/chrome/content/icons/new.png
new file mode 100644
index 0000000..acaf5f4
--- /dev/null
+++ b/src/chrome/content/icons/new.png
Binary files differ
diff --git a/src/chrome/content/icons/options.png b/src/chrome/content/icons/options.png
new file mode 100644
index 0000000..9469f4e
--- /dev/null
+++ b/src/chrome/content/icons/options.png
Binary files differ
diff --git a/src/chrome/content/icons/pencil.png b/src/chrome/content/icons/pencil.png
new file mode 100644
index 0000000..7422be2
--- /dev/null
+++ b/src/chrome/content/icons/pencil.png
Binary files differ
diff --git a/src/chrome/content/options/options.js b/src/chrome/content/options/options.js
new file mode 100644
index 0000000..ecd4ea9
--- /dev/null
+++ b/src/chrome/content/options/options.js
@@ -0,0 +1,80 @@
+
+var oMain = null;
+var inMozOptions = false;
+
+function initOptions(){
+ try{
+
+ //Prefs
+ var oPrefs = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefService).getBranch("");
+
+ //Get Opener
+ if(opener.mproxy_menuShowing){
+ oMain = opener;
+ }
+ else if(opener.parent.opener && opener.parent.opener.mproxy_menuShowing){
+ oMain = opener.parent.opener
+ inMozOptions = true;
+ }
+
+ //Prefill
+ if(oPrefs.prefHasUserValue("mproxy.clear.cookies"))
+ document.getElementById("mproxy.clear.cookies").checked = oPrefs.getBoolPref("mproxy.clear.cookies");
+ if(oPrefs.prefHasUserValue("mproxy.reload.tab"))
+ document.getElementById("mproxy.reload.tab").checked = oPrefs.getBoolPref("mproxy.reload.tab");
+ if(oPrefs.prefHasUserValue("mproxy.display.context"))
+ document.getElementById("mproxy.display.context").checked = oPrefs.getBoolPref("mproxy.display.context");
+ if(oPrefs.prefHasUserValue("mproxy.display.statusbar"))
+ document.getElementById("mproxy.display.statusbar").checked = oPrefs.getBoolPref("mproxy.display.statusbar");
+
+ /*if(oPrefs.prefHasUserValue("mproxy.tabs.manager"))
+ document.getElementById("mproxy.tabs.manager").checked = oPrefs.getBoolPref("mproxy.tabs.manager");*/
+
+ //Set menushowing options
+ if(oMain != null){
+ document.getElementById("mproxy.display.toolbar").checked = oMain.mproxy_menuShowing("toolbar");
+ }
+ else{
+ document.getElementById("mproxy.display.toolbar").style.display = "none";
+ }
+
+ // Thunderbird
+ if(navigator.userAgent.search(/Thunderbird/gi) > -1){
+ document.getElementById("mproxy.display.context").style.display = "none";
+ document.getElementById("mproxy.display.toolbar").style.display = "none";
+ }
+
+ }catch(err){ alert(mproxy_getString("error.unknown") +"\n"+ err); }
+}
+
+function saveOptions(){
+
+ try{
+
+ //Save
+ var oPrefs = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefService).getBranch("");
+
+ oPrefs.setBoolPref("mproxy.clear.cookies", document.getElementById("mproxy.clear.cookies").checked);
+ oPrefs.setBoolPref("mproxy.reload.tab", document.getElementById("mproxy.reload.tab").checked);
+ oPrefs.setBoolPref("mproxy.display.statusbar", document.getElementById("mproxy.display.statusbar").checked);
+
+ // Not Thunderbird
+ if(navigator.userAgent.search(/Thunderbird/gi) < 0){
+ oPrefs.setBoolPref("mproxy.display.context", document.getElementById("mproxy.display.context").checked);
+
+ if(oMain != null){
+ oPrefs.setBoolPref("mproxy.display.toolbar", document.getElementById("mproxy.display.toolbar").checked);
+ }
+ }
+
+
+ if(oMain != null)
+ oMain.mproxy_showMenus();
+
+ }catch(err){ alert(mproxy_getString("error.unknown") +"\n"+err); }
+
+ if(oMain != null && !inMozOptions)
+ oMain.focus();
+
+ return true;
+}
diff --git a/src/chrome/content/options/options.xul b/src/chrome/content/options/options.xul
new file mode 100644
index 0000000..f555dd5
--- /dev/null
+++ b/src/chrome/content/options/options.xul
@@ -0,0 +1,32 @@
+<?xml version="1.0"?>
+
+<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
+
+<!DOCTYPE dialog SYSTEM "chrome://mproxy/locale/locale.dtd">
+
+<dialog buttons="accept"
+ id="mproxy-options-dialog"
+ ondialogaccept="return saveOptions();"
+ onload="initOptions()"
+ title="&prefs.title;"
+ xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+
+ <script type="application/x-javascript" src="chrome://mproxy/content/globals.js"></script>
+ <script type="application/x-javascript" src="chrome://mproxy/content/options/options.js"></script>
+ <script type="application/x-javascript" src="chrome://mproxy/content/proxy.js"></script>
+
+ <groupbox style="width: 200px;">
+ <caption label="&prefs.general;"/>
+ <checkbox id="mproxy.display.toolbar" label="&prefs.general.toolbar;" checked="false" />
+ <checkbox id="mproxy.display.context" label="&prefs.general.context;" checked="false" />
+ <checkbox id="mproxy.display.statusbar" label="&prefs.general.statusbar;" checked="true" />
+ <!-- <checkbox id="mproxy.tabs.manager" label="Allow the use of different proxies in different tabs & windows." checked="true" /> -->
+ </groupbox>
+
+ <groupbox style="width: 200px;">
+ <caption label="&prefs.switch;"/>
+ <checkbox id="mproxy.clear.cookies" label="&prefs.switch.cookies;" checked="false" />
+ <checkbox id="mproxy.reload.tab" label="&prefs.switch.refresh;" checked="true" />
+ </groupbox>
+
+</dialog>
diff --git a/src/chrome/content/proxy.js b/src/chrome/content/proxy.js
new file mode 100644
index 0000000..8c94d0f
--- /dev/null
+++ b/src/chrome/content/proxy.js
@@ -0,0 +1,1080 @@
+/*
+* 2008
+* Copyright Steve McFred and Jeremy Gillick (author of SwitchProxy)
+*/
+
+/*
+*
+* ERROR CODES
+* 100 - 149: mproxy_setProxy()
+* 150 - 199: mproxy_removeProxy()
+* 200 - 249: mproxy_clearCookies()
+* 250 - 299: mproxy_editProxyDialog()
+* 300 - 349: mproxy_manualUpgradCheck()
+*
+*/
+
+var gSwitchP_List;
+var gSwitchP_ListPopup;
+var gSwitchP_ContextList;
+var gSwitchP_StatusBar;
+var gSwitchP_MenuList;
+var gSwitchP_ManageList;
+var gSwitchP_ElementList;
+var gSwitchP_ElementButton;
+var gSwitchP_LastItem;
+var gSwitchP_ProxyCount = 0;
+var gSwitchP_InManager = false;
+var gSwitchP_Loaded = false;
+var gSwitchP_Cycle = null;
+var gSwitchP_CommandEnd = true;
+var gSwitchP_Prefs = null;
+var gSwitchP_NoneLabel = "None";
+
+var gSwitchPTabMgr = null;
+
+function mproxy_initProxy(event){
+
+ window.removeEventListener("load", mproxy_initProxy, true);
+
+ if(!gSwitchP_Loaded){
+
+ gSwitchP_List = document.getElementById('proxy-list')
+ gSwitchP_ListPopup = document.getElementById('proxy-list-popup');
+ gSwitchP_ManageList = document.getElementById('manage-proxy-list');
+ gSwitchP_ContextList = document.getElementById('context-proxy-list');
+ gSwitchP_StatusBar = document.getElementById('mproxy-status');
+ gSwitchP_MenuList = document.getElementById('mproxy-menu-list');
+ gSwitchP_ElementList = document.getElementById('mproxy-element-list');
+ gSwitchP_ElementButton = document.getElementById('mproxy-element-button');
+ gSwitchP_Prefs = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch);
+
+ gSwitchP_NoneLabel = mproxy_getString("common.proxy.none");
+
+ //Is in Proxy Manager
+ if(gSwitchP_ManageList != null){
+ gSwitchP_InManager = true;
+ gSwitchP_List = gSwitchP_ManageList;
+ }
+
+ mproxy_showMenus(true);
+
+ //Cleanup RDF File
+ mproxy_cleanupRdf();
+
+ //Populate Proxy List
+ mproxy_populateList();
+
+ //Set Last Proxy Selected
+ if(gSwitchP_List != null)
+ gSwitchP_LastItem = gSwitchP_List.selectedItem;
+
+ //Add Preferences Listener
+ var oProxyObserver = {
+ observe : function(subject, topic, data){ mproxy_populateList(); }
+ };
+ var oMenuObserver = {
+ observe : function(subject, topic, data){ mproxy_showMenus(false); }
+ };
+ //var oPrefBranch = Components.classes["@mozilla.org/preferences-service;1"].createInstance(Components.interfaces.nsIPrefBranchInternal);
+ ////oPrefBranch.addObserver("network.proxy", oPrefObserver, false);
+ //oPrefBranch.addObserver("mproxy.proxy.rdf.lastupdate", oProxyObserver, false);
+ //oPrefBranch.addObserver("mproxy.display", oMenuObserver, false);
+
+ //if(navigator.userAgent.search(/Thunderbird/gi) > -1){
+ // oPrefBranch = Components.classes["@mozilla.org/preferences-service;1"].createInstance(Components.interfaces.nsIPrefBranchInternal);
+ //}
+ //Else{
+oPrefBranch = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefService);
+//}
+oPrefBranch.addObserver("mproxy.proxy.rdf.lastupdate", oProxyObserver, false);
+//oPrefBranch.addObserver("mproxy.display", oMenuObserver, false);
+//oPrefBranch.addObserver("network.proxy", oPrefObserver, false);
+
+ //Auto-Update Anonymous Proxy Lists (after 10 minutes)
+ //gAnonUpdateTimout = setTimeout("mproxy_anon_autoUpdateLists()", 600000);
+
+ // Start Anon Rotation
+ //setTimeout("mproxy_anon_nextProxy()", 1000);
+
+ gSwitchP_Loaded = true;
+ }
+}
+
+// Return Tab Manager
+function mproxy_getTabManager(){
+ return gSwitchPTabMgr;
+}
+
+//Used for debugging removed
+
+
+//Displays the context menu based on what
+// the user selects in the options
+function mproxy_showMenus(onStartup){
+ try{
+ //Show/Hide menus
+ var oPrefs = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefService).getBranch("");
+
+ // Status Bar
+ var isHidden = (oPrefs.prefHasUserValue("mproxy.display.statusbar") && !oPrefs.getBoolPref("mproxy.display.statusbar"))
+ document.getElementById("mproxy-status").setAttribute("collapsed", isHidden);
+
+ // If not thunderbird
+ if(navigator.userAgent.search(/Thunderbird/gi) < 0){
+
+ //Context
+ var isHidden = (oPrefs.prefHasUserValue("mproxy.display.context") && !oPrefs.getBoolPref("mproxy.display.context"))
+ document.getElementById("mproxy-context-menu").setAttribute("collapsed", isHidden);
+ document.getElementById("mproxy-context-separator").setAttribute("hidden", isHidden);
+
+ //Toolbar
+ if(onStartup){
+ oPrefs.setBoolPref("mproxy.display.toolbar", (!document.getElementById("proxy-toolbar").getAttribute("collapsed")));
+ }
+ else{
+ var isHidden = (oPrefs.prefHasUserValue("mproxy.display.toolbar") && !oPrefs.getBoolPref("mproxy.display.toolbar"))
+ document.getElementById("proxy-toolbar").setAttribute("collapsed", isHidden);
+ }
+ }
+
+ }catch(err){}
+}
+
+// Show Element List
+function mproxy_showElementList(event){
+
+ var oContext = document.getElementById('context-proxy-list');
+ if(oContext == null){
+ return;
+ }
+
+}
+
+//Returns is the entered menu is currently showing
+// values are 'context' or 'toolbar'
+function mproxy_menuShowing(sMenu){
+ var oObj = null;
+
+ if(sMenu == "context"){
+ oObj = document.getElementById("mproxy-context-menu");
+ }
+ else if(sMenu == "toolbar"){
+ oObj = document.getElementById("proxy-toolbar");
+ }
+
+ if(oObj == null)
+ return false;
+
+ return !eval(oObj.getAttribute("collapsed"));
+}
+
+
+//Clears current Proxy List
+function mproxy_clearList(){
+
+ gSwitchP_ProxyCount = 0;
+
+ //Toolbar List
+ if(!gSwitchP_InManager && gSwitchP_List != null && gSwitchP_List.removeAllItems && !gSwitchP_List.open){
+ gSwitchP_List.removeAllItems();
+ }
+ //Manage Proxy Box
+ if(gSwitchP_InManager && gSwitchP_List != null){
+ aNodes = gSwitchP_List.childNodes;
+ for(var i = aNodes.length-1; i >= 0; i--){
+ gSwitchP_List.removeChild(aNodes[i]);
+ }
+ }
+ //Context List
+ if(gSwitchP_ContextList != null){
+ aNodes = gSwitchP_ContextList.childNodes;
+ for(var i = aNodes.length-1; i >= 0; i--){
+ gSwitchP_ContextList.removeChild(aNodes[i]);
+ }
+ }
+ //Toolbar Element List
+ if(gSwitchP_ElementList != null){
+ aNodes = gSwitchP_ElementList.childNodes;
+ for(var i = aNodes.length-1; i >= 0; i--){
+ if(aNodes[i].getAttribute("class") == "proxy-menu-item")
+ gSwitchP_ElementList.removeChild(aNodes[i]);
+ }
+ }
+ // Tools Menu List
+ if(gSwitchP_MenuList != null){
+ aNodes = gSwitchP_MenuList.childNodes;
+ for(var i = aNodes.length-1; i >= 0; i--){
+ if(aNodes[i].getAttribute("class") == "proxy-menu-item")
+ gSwitchP_MenuList.removeChild(aNodes[i]);
+ }
+ }
+}
+
+//Add Item to lists
+function mproxy_appendToList(sLabel, sValue, isSelected, iType){
+ var oItem = null;
+
+ gSwitchP_ProxyCount++;
+
+ try{
+
+ //Toolbar List
+ if(!gSwitchP_InManager && gSwitchP_List != null && !gSwitchP_List.open){
+ oItem = gSwitchP_List.appendItem(sLabel, sValue);
+ oItem.setAttribute("oncommand", "mproxy_selectProxy();"); //mproxy_anon_stopRotation();
+ oItem.setAttribute("proxyType", iType);
+ }
+
+ //Manage Proxy Box
+ if(gSwitchP_InManager && gSwitchP_List != null && sLabel != gSwitchP_NoneLabel){
+ oItem = gSwitchP_List.appendItem(sLabel, sValue);
+ oItem.setAttribute("proxyType", iType);
+ }
+
+ //Context List
+ if(gSwitchP_ContextList != null){
+ oItem = document.createElement("menuitem");
+ oItem.setAttribute("label", sLabel);
+ oItem.setAttribute("value", sValue);
+ oItem.setAttribute("type", "checkbox");
+ oItem.setAttribute("autocheck", "false");
+ oItem.setAttribute("proxyType", iType);
+ oItem.setAttribute("oncommand", "mproxy_queueSetProxy(this);");
+ gSwitchP_ContextList.appendChild(oItem);
+ }
+
+ //Toolbar Element List
+ if(gSwitchP_ElementList != null){
+ //Get separator, which is after proxy list
+ var oSeparator = document.getElementById("mproxy-element-list-separator");
+ oItem = document.createElement("menuitem");
+ oItem.setAttribute("id", sValue);
+ oItem.setAttribute("label", sLabel);
+ oItem.setAttribute("value", sValue);
+ oItem.setAttribute("type", "checkbox");
+ oItem.setAttribute("autocheck", "false");
+ oItem.setAttribute("proxyType", iType);
+ oItem.setAttribute("class", "proxy-menu-item");
+ oItem.setAttribute("oncommand", "mproxy_queueSetProxy(this);");
+ gSwitchP_ElementList.insertBefore(oItem, oSeparator);
+ }
+
+ // Tools Menu List
+ if(gSwitchP_MenuList != null){
+ //Get separator, which is after proxy list
+ var oSeparator = document.getElementById("mproxy-menu-list-separator");
+ oItem = document.createElement("menuitem");
+ oItem.setAttribute("id", sValue);
+ oItem.setAttribute("label", sLabel);
+ oItem.setAttribute("value", sValue);
+ oItem.setAttribute("type", "checkbox");
+ oItem.setAttribute("autocheck", "false");
+ oItem.setAttribute("proxyType", iType);
+ oItem.setAttribute("class", "proxy-menu-item");
+ oItem.setAttribute("oncommand", "mproxy_queueSetProxy(this);");
+ gSwitchP_MenuList.insertBefore(oItem, oSeparator);
+ }
+
+ //Select
+ if(isSelected)
+ mproxy_selectItem(sLabel);
+
+ }catch(err){}
+}
+
+//Sets List item with labe sLabel, to be selected/checked
+function mproxy_selectItem(sLabel){
+
+ try{
+
+ //Toolbar List
+ if(!gSwitchP_InManager && gSwitchP_List != null){
+ oItem = gSwitchP_List.getElementsByAttribute("label", sLabel);
+ if(oItem != null){
+ oItem = oItem[0];
+ gSwitchP_List.selectedItem = oItem;
+ oItem.setAttribute("selected", true);
+ }
+ }
+
+ //Context
+ if(gSwitchP_ContextList != null){
+ oItem = gSwitchP_ContextList.getElementsByAttribute("label", sLabel);
+ if(oItem != null){
+ //Uncheck Other
+ var aChecked = gSwitchP_ContextList.getElementsByAttribute("checked", "true");
+ for(var c = 0; c < aChecked.length; c++){
+ aChecked[c].setAttribute("checked", false);
+ }
+
+ //Select
+ oItem = oItem[0];
+ gSwitchP_ContextList.selectedItem = oItem;
+ oItem.setAttribute("checked", true);
+ }
+ }
+
+ //Toolbar Element List
+ if(gSwitchP_ElementList != null){
+ oItem = gSwitchP_ElementList.getElementsByAttribute("label", sLabel);
+ if(oItem != null && oItem.length > 0){
+
+ //Uncheck Other
+ var aChecked = gSwitchP_ElementList.getElementsByAttribute("checked", "true");
+ for(var c = 0; c < aChecked.length; c++){
+ aChecked[c].setAttribute("checked", false);
+ }
+
+ //Check Selected
+ oItem = oItem[0];
+ gSwitchP_ElementList.selectedItem = oItem;
+ oItem.setAttribute("selected", true);
+ oItem.setAttribute("checked", true);
+
+ //Change Button Label
+ gSwitchP_ElementButton = document.getElementById('mproxy-element-button');
+ if(gSwitchP_ElementButton != null){
+ gSwitchP_ElementButton.setAttribute("label", sLabel);
+ }
+ }
+ }
+
+ // Tools Menu List
+ if(gSwitchP_MenuList != null){
+ oItem = gSwitchP_MenuList.getElementsByAttribute("label", sLabel);
+ if(oItem != null && oItem.length > 0){
+
+ //Uncheck Other
+ var aChecked = gSwitchP_MenuList.getElementsByAttribute("checked", "true");
+ for(var c = 0; c < aChecked.length; c++){
+ aChecked[c].setAttribute("checked", false);
+ }
+
+ //Check Selected
+ oItem = oItem[0];
+ gSwitchP_MenuList.selectedItem = oItem;
+ oItem.setAttribute("selected", true);
+ oItem.setAttribute("checked", true);
+ }
+ }
+
+ // Status Bar
+ if(gSwitchP_StatusBar != null){
+ gSwitchP_StatusBar.setAttribute("label", mproxy_getString("common.label.proxy")+" "+sLabel);
+ }
+ mproxy_clearTimeout(gSwitchP_Cycle);
+
+ }catch(err){
+ mproxy_debug(err);
+ }
+}
+
+//Return menuitem for the given sUri
+function mproxy_getMenuItem(sUri){
+ var oItem = null;
+
+ //Toolbar
+ oItem = (gSwitchP_List != null) ? gSwitchP_List.getElementsByAttribute("value", sUri) : null;
+ if(oItem != null && oItem[0] != null)
+ return oItem[0];
+
+ //Context
+ oItem = (gSwitchP_List != null) ? gSwitchP_ContextList.getElementsByAttribute("value", sUri) : null;
+ if(oItem != null && oItem[0] != null)
+ return oItem[0];
+
+ //Toolbar Element
+ oItem = (gSwitchP_List != null) ? gSwitchP_ElementList.getElementsByAttribute("value", sUri) : null;
+ if(oItem != null && oItem[0] != null)
+ return oItem[0];
+
+
+ //Default
+ return null;
+}
+
+function mproxy_cycle(sAction){
+ if(gSwitchP_Cycle != null){
+
+ mproxy_clearTimeout(gSwitchP_Cycle);
+ gSwitchP_CommandEnd = true;
+
+ if(sAction == 'change' && gSwitchP_LastItem != null && gSwitchP_List != null && gSwitchP_List.selectedItem.label != gSwitchP_LastItem.label && gSwitchP_List.selectedIndex > 0){
+ gSwitchP_List.label = gSwitchP_LastItem.label;
+ gSwitchP_List.selectedItem = gSwitchP_LastItem;
+ gSwitchP_List.selectedItem.value = gSwitchP_LastItem.value;
+
+ mproxy_setProxy();
+ }
+ else if(sAction == 'select' && gSwitchP_List != null && gSwitchP_List.selectedIndex > -1){
+ mproxy_setStatus(mproxy_getString("toolbar.notApplied"), "#F00");
+ setTimeout("mproxy_setStatus(mproxy_getString('toolbar.loading'))", 3000);
+ setTimeout("mproxy_populateList('"+ gSwitchP_LastItem.label +"');", 4000);
+ setTimeout("mproxy_setProxy();", 4500);
+ }
+
+ }
+}
+
+//When user selects a Proxy from the menu list
+function mproxy_selectProxy(){
+
+ mproxy_clearTimeout(gSwitchP_Cycle);
+ if(gSwitchP_List == null || gSwitchP_List.selectedItem == null || gSwitchP_InManager)
+ return;
+
+ //if(gSwitchP_List.selectedItem.label != gSwitchP_NoneLabel){
+ //document.getElementById('edit-button').disabled = false;
+ //document.getElementById('remove-button').disabled = false;
+ //document.getElementById('edit-button').image = "chrome://mproxy/content/icons/pencil.png";
+ //document.getElementById('remove-button').image = "chrome://mproxy/content/icons/cross.png";
+
+ //}
+ //else{
+ //document.getElementById('edit-button').disabled = true;
+ //document.getElementById('remove-button').disabled = true;
+ //document.getElementById('edit-button').image = "chrome://mproxy/content/icons/pencil_disabled.png";
+ //document.getElementById('remove-button').image = "chrome://mproxy/content/icons/cross_disabled.png";
+ //}
+
+ if(typeof(gSwitchP_List.selectedItem.value) != 'undefined'){
+ //If this item is not being used by the browser,
+ // show a helpful message and cycle
+ var oPrefs = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefService).getBranch("");
+ if((!oPrefs.prefHasUserValue("mproxy.proxy.current") || oPrefs.getCharPref("mproxy.proxy.current") != gSwitchP_List.selectedItem.value) && gSwitchP_LastItem != null && gSwitchP_LastItem != gSwitchP_List.selectedItem){
+ mproxy_setStatus(mproxy_getString("toolbar.clickApply"), "#060");
+
+ //Cycle if user doesn't click 'Apply'
+ //if(gSwitchP_Cycle == null)
+ // gSwitchP_Cycle = setTimeout("mproxy_cycle('select')", 10000);
+ }
+ //If it is being used by the browser
+ else if(oPrefs.prefHasUserValue("mproxy.proxy.current") && oPrefs.getCharPref("mproxy.proxy.current") == gSwitchP_List.selectedItem.value){
+ mproxy_clearTimeout(gSwitchP_Cycle);
+
+ //Anonomous
+ if(gSwitchP_List.selectedItem.getAttribute("proxyType") == "3"){
+ // if(mproxy_anon_getCurrent() == "unknown")
+ // mproxy_setProxy(false);
+ //
+ // mproxy_setStatus(mproxy_getString("toolbar.using") +" "+ gSwitchP_List.selectedItem.label +" ["+ mproxy_anon_getCurrent() +"] ("+ mproxy_anon_getCurrentCount() +")");
+ }
+ //Standard
+ else{
+ mproxy_setStatus(mproxy_getString("toolbar.using") +" "+ gSwitchP_List.selectedItem.label);
+ }
+ }
+ else{
+ mproxy_clearTimeout(gSwitchP_Cycle);
+ mproxy_setStatus(mproxy_getString("toolbar.using.none"));
+ }
+ }
+
+ return true;
+}
+
+//Queue Set Proxy
+function mproxy_queueSetProxy(oMenuItem){
+ mproxy_clearTimeout(gSwitchP_Cycle);
+ setTimeout("mproxy_setProxy(true, true, null, '"+ oMenuItem.label +"', '"+ oMenuItem.getAttribute("value") +"', '"+ oMenuItem.getAttribute("proxyType") +"')", 10);
+}
+
+//Set Proxy
+function mproxy_setProxy(bClean, fromContextMenu, oMenuItem, sLabel, sUri, sType){
+
+ //Start Command
+ gSwitchP_CommandEnd = false;
+ mproxy_clearTimeout(gSwitchP_Cycle);
+ //mproxy_anon_stopRotation();
+
+ //If in Proxy Manager, do nothing
+ if(gSwitchP_InManager){
+ gSwitchP_CommandEnd = true;
+ return;
+ }
+
+ var hasError = false;
+
+ //Set fromContextMenu
+ if(fromContextMenu == null)
+ fromContextMenu = false;
+
+ //Get Proxy URI & Label
+ var sProxyUri = "";
+ var sProxyLabel = "";
+ var sProxyType = 0;
+ if(sUri != null && sLabel != null){
+ sProxyUri = sUri;
+ sProxyLabel = sLabel;
+
+ if(sType) sProxyType = sType;
+ }
+ else if(oMenuItem != null){
+ sProxyUri = oMenuItem.getAttribute("value");
+ sProxyLabel = oMenuItem.getAttribute("label");
+ sProxyType = oMenuItem.getAttribute("proxyType");
+ }
+ else{
+ if(fromContextMenu == true){
+ sProxyUri = gSwitchP_ContextList.selectedItem.value;
+ sProxyLabel = gSwitchP_ContextList.selectedItem.label;
+ sProxyType = gSwitchP_ContextList.selectedItem.getAttribute("proxyType");
+ }
+ else if(gSwitchP_List != null){
+ sProxyUri = gSwitchP_List.selectedItem.value;
+ sProxyLabel = gSwitchP_List.selectedItem.label;
+ sProxyType = gSwitchP_List.selectedItem.getAttribute("proxyType");
+ }
+ }
+
+ //Branch if Anonomous
+ if(sProxyType == "3"){
+ //mproxy_setStatus(mproxy_getString("toolbar.loading"));
+ //mproxy_anon_loadProxy(sProxyUri, true);
+ }
+ else if(sProxyUri != ""){
+ mproxy_setStatus(mproxy_getString("toolbar.loading"));
+ try{
+ //Always clear proxy settings first - this may mess up with selection...
+ //gSwitchP_Prefs.setIntPref("network.proxy.type", 0);
+
+ //Change Browser Preferences
+ var aProps = mproxy_ds_getPropertyValuesFor(sProxyUri);
+
+ for(key in gmproxy_options){
+
+ //Get pref type and update preference
+ var sPrefVal = "";
+ if(typeof(gmproxy_options_defaults[key]) == "number"){
+ gSwitchP_Prefs.setIntPref(gmproxy_options[key], parseInt(aProps[gSProxyRdfNodeUriRoot +"#"+ key]));
+ }
+ else if(typeof(gmproxy_options_defaults[key]) == "boolean"){
+ gSwitchP_Prefs.setBoolPref(gmproxy_options[key], eval(aProps[gSProxyRdfNodeUriRoot +"#"+ key]));
+ }
+ else{ //String
+ gSwitchP_Prefs.setCharPref(gmproxy_options[key], aProps[gSProxyRdfNodeUriRoot +"#"+ key]);
+ }
+ }
+
+ //Get Proxy Label
+ sProxyLabel = aProps[gSProxyRdfNodeName];
+
+ //Update Status
+ mproxy_setStatus(mproxy_getString("toolbar.using") +" "+ sProxyLabel);
+
+ //Update Preference
+ gSwitchP_Prefs.setCharPref("mproxy.proxy.current", sProxyUri);
+ }
+ catch(err){
+ alert("100: "+ mproxy_getString("error.unknown")+ "\n("+ err +")");
+ hasError = true;
+
+ //Cycle back to 'None'
+ //if(gSwitchP_Cycle == null && !fromContextMenu)
+ // gSwitchP_Cycle = setTimeout("mproxy_cycle('change')", 500);
+ }
+ }
+ else{
+ //Turn off proxy pref
+ try{
+ gSwitchP_Prefs.setIntPref("network.proxy.type", 0);
+
+ //Update Status
+ mproxy_setStatus(mproxy_getString("toolbar.using.none"));
+
+
+ //Update Preference
+ gSwitchP_Prefs.setCharPref("mproxy.proxy.current", "");
+
+ }catch(e){
+ alert("101: "+ mproxy_getString("error.unknown"));
+ hasError = true;
+ }
+ }
+
+ // Finalize
+ if(hasError){
+ //Update Status
+ mproxy_setStatus(mproxy_getString("error.proxy.load") +" " + sProxyLabel, "#F00");
+ }
+ else{
+
+ //mproxy_tab_notify(sProxyUri);
+
+ //Select this proxy in all lists
+ mproxy_selectItem(sProxyLabel);
+
+ //Set Last Proxy
+ gSwitchP_LastItem = mproxy_getMenuItem(sProxyUri);
+
+ //Options
+ try{
+ if(bClean){
+ // Clear Cookies
+ if(typeof(gBrowser) != 'undefined' && gSwitchP_Prefs.prefHasUserValue("mproxy.clear.cookies") && gSwitchP_Prefs.getBoolPref("mproxy.clear.cookies")){
+ mproxy_clearCookies();
+ }
+
+ // Reload Page
+ if((typeof(gBrowser) != 'undefined' && (!gSwitchP_Prefs.prefHasUserValue("mproxy.reload.tab") || gSwitchP_Prefs.getBoolPref("mproxy.reload.tab")))){
+ try{
+ var oTab = gBrowser.mCurrentBrowser;
+ oTab.webNavigation.reload(nsIWebNavigation.LOAD_FLAGS_BYPASS_PROXY | nsIWebNavigation.LOAD_FLAGS_BYPASS_CACHE);
+ } catch(err) { }
+ }
+
+ // Set Update Pref
+ gSwitchP_Prefs.setIntPref("mproxy.proxy.rdf.lastupdate", (new Date()).getTime());
+ }
+
+ }catch(err){alert("102: "+ mproxy_getString("error.unknown") + "\n("+err+")");}
+ }
+
+ //End Command
+ gSwitchP_CommandEnd = true;
+
+}
+
+//Test if the RDF Element, oRef, is the current proxy being used
+function mproxy_isSelected(oRef){
+
+ try{
+ var oPrefs = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch);
+ var aProps = mproxy_ds_getPropertyValuesFor(oRef.Value);
+ var sCurrUri = "";
+ var iType = parseInt(aProps[gSProxyRdfNodeUriRoot + "#networkProxyType"]);
+
+ if(oPrefs.prefHasUserValue("mproxy.proxy.current") && (sCurrUri = oPrefs.getCharPref("mproxy.proxy.current")) == oRef.Value){
+
+ //Verify this is really what's being used in the browser
+ if(iType == oPrefs.getIntPref("network.proxy.type")){
+ if(iType == 1){
+ for(key in gmproxy_options){
+
+ //Skip These Keys
+ if(key == "networkProxyType" || key == "networkProxyAutoconfigURL" || key == "networkProxyHTTPShare" )
+ continue;
+
+ //Skip if RDF has Default Values
+ if( (key == "networkProxySOCKSVersion" && (aProps[gSProxyRdfNodeUriRoot +"#"+ key] == "5" || aProps[gSProxyRdfNodeUriRoot +"#"+ key] == ""))
+ || (key == "networkProxyNone" && aProps[gSProxyRdfNodeUriRoot +"#"+ key] == "localhost, 127.0.0.1")){
+ continue;
+ }
+
+ //If Pref and RDF doesn't have a value for this
+ if(!oPrefs.prefHasUserValue(gmproxy_options[key])
+ && (aProps[gSProxyRdfNodeUriRoot +"#"+ key] == "" || aProps[gSProxyRdfNodeUriRoot +"#"+ key] == "0")){
+ continue;
+ }
+
+ // If pref doesn't have this and the RDF record does
+ // return false
+ if(!oPrefs.prefHasUserValue(gmproxy_options[key])
+ && (aProps[gSProxyRdfNodeUriRoot +"#"+ key] != "" && aProps[gSProxyRdfNodeUriRoot +"#"+ key] != "0")){
+ return false;
+ }
+
+
+ //Get pref and convert to string
+ var sPrefVal = "";
+ if(oPrefs.getPrefType(gmproxy_options[key]) == Components.interfaces.nsIPrefBranch.PREF_INT)
+ sPrefVal = oPrefs.getIntPref(gmproxy_options[key]) + "";
+ if(oPrefs.getPrefType(gmproxy_options[key]) == Components.interfaces.nsIPrefBranch.PREF_BOOL)
+ sPrefVal = oPrefs.getBoolPref(gmproxy_options[key]) + "";
+ if(oPrefs.getPrefType(gmproxy_options[key]) == Components.interfaces.nsIPrefBranch.PREF_STRING)
+ sPrefVal = oPrefs.getCharPref(gmproxy_options[key]);
+
+ //Return false if isn't equal
+ if(sPrefVal != aProps[gSProxyRdfNodeUriRoot +"#"+ key]){
+ return false;
+ }
+ }
+ return true;
+ }
+ //If type is 2 and the PAC url is the same
+ else if(iType == 2 && oPrefs.prefHasUserValue("mproxy.proxy.current")
+ && oPrefs.getCharPref("network.proxy.autoconfig_url") == aProps[gSProxyRdfNodeUriRoot + "#networkProxyAutoconfigURL"]){
+ return true;
+ }
+ }
+ //Anonomous
+ else if(iType == 3 && oPrefs.prefHasUserValue("network.proxy.http") && oPrefs.prefHasUserValue("network.proxy.http_port")){
+ //var sProxy = oPrefs.getCharPref("network.proxy.http") +":"+ oPrefs.getIntPref("network.proxy.http_port");
+
+ //is sProxy in proxy list
+ //oTestRes = mproxy_ds_getElementForValue(gSProxyRdfNodeUriRoot +"#proxy", sProxy);
+
+ //if(oTestRes instanceof Components.interfaces.nsIRDFResource && oTestRes.Value == oRes.Value){
+ //mproxy_anon_loadProxy(oRef.Value, true);
+ //return true;
+ //}
+
+ return false;
+ }
+ }
+
+ }catch(err){}
+
+
+ return false;
+}
+
+function mproxy_removeProxy(){
+ mproxy_clearTimeout(gSwitchP_Cycle);
+ var oItem = gSwitchP_List.selectedItem;
+
+ //Can't delete 'None'
+ if((gSwitchP_List.selectedItem != null) &&
+ (gSwitchP_List.selectedItem.label == gSwitchP_NoneLabel) ){
+ alert("150: "+ mproxy_getString("error.remove.forbidden"));
+ return;
+ }
+
+ if(!confirm(mproxy_getString("confirm.remove")))
+ return;
+
+ try{
+ //RDF
+ //Remove
+ mproxy_ds_removeElement(oItem.value);
+
+ //Cleanup
+ mproxy_cleanupRdf();
+
+ //Update List
+ mproxy_populateList();
+ setTimeout("mproxy_setProxy();", 300);
+ }
+ catch(err){
+ alert("151: "+ mproxy_getString("error.remove") + "\n("+ err +")");
+ }
+}
+
+function mproxy_clearCookies(){
+ try{
+ var oCookies = Components.classes["@mozilla.org/cookiemanager;1"].createInstance(Components.interfaces.nsICookieManager);
+ oCookies.removeAll();
+ }catch(err){
+ alert("200: "+ mproxy_getString("error.cookie"));
+ }
+ return true;
+}
+
+function mproxy_add_proxy(sName, sPort, issocks, toset){
+ try{
+
+ var oTestProxy = mproxy_ds_getElementForValue(gSProxyRdfNodeName, sName);
+ if(oTestProxy != null){
+ return false;
+ }
+
+ var sProxyUri = mproxy_getUniqueProxyUri();
+ var oProxy = mproxy_ds_getResource(sProxyUri);
+ mproxy_ds_addElement(sProxyUri);
+
+ if (issocks) { //socks
+ mproxy_ds_addProperty(oProxy, mproxy_ds_getResource(gSProxyRdfNodeUriRoot+"#networkProxyType"), "1", true);
+ mproxy_ds_addProperty(oProxy, mproxy_ds_getResource(gSProxyRdfNodeUriRoot+"#networkProxyHTTP"), "", true);
+ mproxy_ds_addProperty(oProxy, mproxy_ds_getResource(gSProxyRdfNodeUriRoot+"#networkProxyHTTP_Port"), "", true);
+ mproxy_ds_addProperty(oProxy, mproxy_ds_getResource(gSProxyRdfNodeUriRoot+"#networkProxyHTTPShare"), false, true);
+ mproxy_ds_addProperty(oProxy, mproxy_ds_getResource(gSProxyRdfNodeUriRoot+"#networkProxySSL"), "", true);
+ mproxy_ds_addProperty(oProxy, mproxy_ds_getResource(gSProxyRdfNodeUriRoot+"#networkProxySSL_Port"), "", true);
+ mproxy_ds_addProperty(oProxy, mproxy_ds_getResource(gSProxyRdfNodeUriRoot+"#networkProxyFTP"), "", true);
+ mproxy_ds_addProperty(oProxy, mproxy_ds_getResource(gSProxyRdfNodeUriRoot+"#networkProxyFTP_Port"), "", true);
+ mproxy_ds_addProperty(oProxy, mproxy_ds_getResource(gSProxyRdfNodeUriRoot+"#networkProxyGopher"), "", true);
+ mproxy_ds_addProperty(oProxy, mproxy_ds_getResource(gSProxyRdfNodeUriRoot+"#networkProxyGopher_Port"), "", true);
+ mproxy_ds_addProperty(oProxy, mproxy_ds_getResource(gSProxyRdfNodeUriRoot+"#networkProxySOCKS"), "127.0.0.1", true);
+ mproxy_ds_addProperty(oProxy, mproxy_ds_getResource(gSProxyRdfNodeUriRoot+"#networkProxySOCKS_Port"), sPort, true);
+ mproxy_ds_addProperty(oProxy, mproxy_ds_getResource(gSProxyRdfNodeUriRoot+"#networkProxySOCKSVersion"), "5", true);
+ mproxy_ds_addProperty(oProxy, mproxy_ds_getResource(gSProxyRdfNodeUriRoot+"#networkProxyNone"), "localhost, 127.0.0.1", true);
+ mproxy_ds_addProperty(oProxy, mproxy_ds_getResource(gSProxyRdfNodeUriRoot+"#networkProxyAutoconfigURL"), "", true);
+ mproxy_ds_addProperty(oProxy, mproxy_ds_getResource(gSProxyRdfNodeUriRoot+"#name"), sName, true);
+ }
+ else { //regular http for all
+ mproxy_ds_addProperty(oProxy, mproxy_ds_getResource(gSProxyRdfNodeUriRoot+"#networkProxyType"), "1", true);
+ mproxy_ds_addProperty(oProxy, mproxy_ds_getResource(gSProxyRdfNodeUriRoot+"#networkProxyHTTP"), "127.0.0.1", true);
+ mproxy_ds_addProperty(oProxy, mproxy_ds_getResource(gSProxyRdfNodeUriRoot+"#networkProxyHTTP_Port"), sPort, true);
+ mproxy_ds_addProperty(oProxy, mproxy_ds_getResource(gSProxyRdfNodeUriRoot+"#networkProxyHTTPShare"), true, true);
+ mproxy_ds_addProperty(oProxy, mproxy_ds_getResource(gSProxyRdfNodeUriRoot+"#networkProxySSL"), "127.0.0.1", true);
+ mproxy_ds_addProperty(oProxy, mproxy_ds_getResource(gSProxyRdfNodeUriRoot+"#networkProxySSL_Port"), sPort, true);
+ mproxy_ds_addProperty(oProxy, mproxy_ds_getResource(gSProxyRdfNodeUriRoot+"#networkProxyFTP"), "127.0.0.1", true);
+ mproxy_ds_addProperty(oProxy, mproxy_ds_getResource(gSProxyRdfNodeUriRoot+"#networkProxyFTP_Port"), sPort, true);
+ mproxy_ds_addProperty(oProxy, mproxy_ds_getResource(gSProxyRdfNodeUriRoot+"#networkProxyGopher"), "127.0.0.1", true);
+ mproxy_ds_addProperty(oProxy, mproxy_ds_getResource(gSProxyRdfNodeUriRoot+"#networkProxyGopher_Port"), sPort, true);
+ mproxy_ds_addProperty(oProxy, mproxy_ds_getResource(gSProxyRdfNodeUriRoot+"#networkProxySOCKS"), "", true);
+ mproxy_ds_addProperty(oProxy, mproxy_ds_getResource(gSProxyRdfNodeUriRoot+"#networkProxySOCKS_Port"), "", true);
+ mproxy_ds_addProperty(oProxy, mproxy_ds_getResource(gSProxyRdfNodeUriRoot+"#networkProxySOCKSVersion"), "5", true);
+ mproxy_ds_addProperty(oProxy, mproxy_ds_getResource(gSProxyRdfNodeUriRoot+"#networkProxyNone"), "localhost, 127.0.0.1", true);
+ mproxy_ds_addProperty(oProxy, mproxy_ds_getResource(gSProxyRdfNodeUriRoot+"#networkProxyAutoconfigURL"), "", true);
+ mproxy_ds_addProperty(oProxy, mproxy_ds_getResource(gSProxyRdfNodeUriRoot+"#name"), sName, true);
+ }
+ if (toset) {
+ mproxy_setProxy(true, null, null, sName, sProxyUri, 1);
+ mproxy_selectItem(sName);
+ }
+ return true;
+ }catch(e){
+ alert(mproxy_getString("error.unknown") +"\n("+ e +")");
+ return false;
+ }
+}
+
+function mproxy_populateList(sSelectedLabel){
+ mproxy_clearTimeout(gSwitchP_Cycle);
+
+ var sProxyUri = "";
+ var iSelected = (gSwitchP_List != null) ? gSwitchP_List.selectedIndex : -1;
+ var aProxies = new Array();
+
+ //Don't populate if a local command has not finished or if list is open
+ if(!gSwitchP_CommandEnd){
+ gSwitchP_CommandEnd = true; //reset
+ return;
+ }
+ else{ //Start Command
+ gSwitchP_CommandEnd = false;
+ }
+
+ //Load Elements
+ try{
+
+ //Remove List Items & Add 'None'
+ mproxy_clearList();
+ mproxy_appendToList(gSwitchP_NoneLabel, "", true, 0);
+ mproxy_selectItem(gSwitchP_NoneLabel);
+
+ //Add Tor as default proxy, and set proxy to it
+ //mproxy_add_proxy(mproxy_getString("common.proxy.tor"), "9050", true, true);
+
+ //Get and Sort Elements
+ var aProxies = mproxy_ds_getAllElements();
+ aProxies.sort(mproxy_sortProxies);
+
+ //Add to list
+ for(i = 0; i < aProxies.length; i++){
+
+ if(typeof(aProxies[i]) == 'undefined')
+ continue;
+
+ try{
+
+ oRes = mproxy_ds_getResource(aProxies[i]);
+ sProxyName = mproxy_ds_getValueFor(oRes, mproxy_ds_getResource(gSProxyRdfNodeName));
+ sProxyType = mproxy_ds_getValueFor(oRes, mproxy_ds_getResource(gSProxyRdfNodeUriRoot+ "#networkProxyType"));
+
+ if(sProxyName != null){
+ oItem = mproxy_appendToList(sProxyName, aProxies[i], false, sProxyType);
+
+ //Select Item
+ if((sSelectedLabel != null && sSelectedLabel == sProxyName) || (sSelectedLabel == null && mproxy_isSelected(oRes))){
+ mproxy_selectItem(sProxyName);
+ }
+ }
+
+ } catch(err) {}
+ }
+
+ //Finish
+ gSwitchP_CommandEnd = true;
+ setTimeout("mproxy_selectProxy();", 300);
+
+ }catch(err){}
+}
+
+/*
+* Sort Proxy List
+* + oResA and oResB are RDF URIs
+*/
+function mproxy_sortProxies(oResA, oResB){
+ try{
+ //Get Proxy Names
+ sValA = mproxy_ds_getValueFor(mproxy_ds_getResource(oResA), mproxy_ds_getResource(gSProxyRdfNodeName));
+ sValB = mproxy_ds_getValueFor(mproxy_ds_getResource(oResB), mproxy_ds_getResource(gSProxyRdfNodeName));
+
+
+ if (sValA < sValB)
+ return -1;
+ if (sValA == sValB)
+ return 0;
+ if (sValA > sValB)
+ return 1;
+ }
+ catch(e){ return 0; }
+}
+
+/* Cleanup unused mproxy data in RDF
+* + Remove resources that have not been applied or used
+*/
+function mproxy_cleanupRdf(){
+
+ try{
+
+ var aElements = mproxy_ds_getAllElements();
+ for(var e = 0; e < aElements.length; e++){
+ oRes = mproxy_ds_getResource(aElements[e]);
+ aProps = mproxy_ds_getPropertyValuesFor(aElements[e]);
+
+ //If does not have a name property,
+ // then it is not listed -- so it's junk
+ if(aProps[gSProxyRdfNodeName] == null){
+ mproxy_ds_removeElement(aElements[e]);
+ }
+ }
+ }catch(err){}
+}
+
+// Automatic Upgrade
+/*
+* From Version 0.4
+* + Add preference 'mproxy.version'
+* + Add preference 'mproxy.proxy.current'
+* + Change proxy's URI to random number
+* + Convert #proxy to networkProxyAutoconfigURL
+* + Add elements for full manual proxy configuration
+* + view the globals.js gmproxy_options array for full list
+*/
+
+
+//Generates random number for proxy URI
+function mproxy_getUniqueProxyUri(){
+ var sUri = gSProxyRdfRoot + "/mproxy_" + Math.round((Math.random() * 200000));
+
+ if(mproxy_ds_doesProxyElementExist(sUri))
+ return mproxy_getUniqueProxyUri();
+
+ return sUri;
+}
+
+function mproxy_setStatus(sMsg, sColor){
+ if(!sColor)
+ sColor = "#000";
+
+ oStatus = document.getElementById('status-text');
+
+ if(oStatus != null){
+ document.getElementById('status-text').style.color = sColor;
+ document.getElementById('status-text').value = sMsg;
+ }
+}
+
+//Clear Timeout
+function mproxy_clearTimeout(){
+ clearTimeout(gSwitchP_Cycle);
+ gSwitchP_Cycle = null;
+}
+
+//Execute a command when system is ready
+// iCurrCount is for internal use, do not
+// pass this argument
+function mproxy_doCommand(sCommand, iLimitCount){
+
+ if(iLimitCount == null)
+ iLimitCount = 0;
+
+ //Wait for current command to end
+ if(!gSwitchP_CommandEnd && iLimitCount < 10){
+ iLimitCount++
+ setTimeout("mproxy_doCommand('"+ sCommand +"', "+ iCurrCount +")", 100);
+ }
+ else{
+ gSwitchP_CommandEnd = true;
+ setTimeout(sCommand, 100);
+ }
+}
+
+/*
+* Launch Dialogs
+*/
+
+ //Edit Proxy Dialog
+ function mproxy_editProxyDialog(isNew){
+ mproxy_clearTimeout(gSwitchP_Cycle);
+
+ var sAction = null;
+
+ //Nothing Selected
+ var oEditItem = null
+ if(!isNew && (oEditItem = gSwitchP_List.selectedItem) == null){
+ alert("250: "+ mproxy_getString("error.edit.select"));
+ return;
+ }
+
+ //Can't edit 'None'
+ if(!gSwitchP_InManager && !isNew && gSwitchP_List != null && gSwitchP_List.selectedItem != null && gSwitchP_List.selectedItem.label == gSwitchP_NoneLabel){
+ alert("251: "+ mproxy_getString("error.edit.forbidden"));
+ return;
+ }
+
+ //Edit
+ if(!isNew){
+
+ //Anon
+ //if(oEditItem.getAttribute("proxyType") == "3"){
+ // window.openDialog("chrome://mproxy/content/dialogs/editanon.xul","editproxy","centerscreen, chrome", "edit", oEditItem.value);
+ //}
+ //Standard
+ //else{
+ window.openDialog("chrome://mproxy/content/dialogs/editproxy.xul","editproxy","centerscreen, chrome", "edit", oEditItem.value);
+ //}
+ }
+ //Add
+ else{
+ //window.openDialog("chrome://mproxy/content/dialogs/addproxytype.xul","editproxy","centerscreen, chrome", "add");
+ window.openDialog("chrome://mproxy/content/dialogs/editproxy.xul","addproxy","centerscreen, chrome", "add", gSwitchP_InManager);
+ }
+ }
+
+ //Manage Proxy Dialog
+ function mproxy_openProxyManager(){
+ window.openDialog("chrome://mproxy/content/dialogs/manager.xul","manageproxies","centerscreen, chrome, resizable");
+ }
+
+/*
+* Options
+*/
+ function mproxy_openmproxyPrefs(){
+ window.openDialog("chrome://mproxy/content/options/options.xul","mproxyPrefs","centerscreen, chrome");
+ }
+
+ function mproxy_goTomproxySite(fromDialog){
+
+ // If Thunderbird
+ if(navigator.userAgent.search(/Thunderbird/gi) > -1){
+ var messenger = Components.classes["@mozilla.org/messenger;1"].createInstance();
+ messenger = messenger.QueryInterface(Components.interfaces.nsIMessenger);
+ messenger.launchExternalURL(gmproxy_DownloadSite +"?r=mproxy");
+ }
+ else{
+ opener.gBrowser.selectedTab = opener.getBrowser().addTab(gmproxy_DownloadSite +"?r=mproxy");
+ }
+ self.close();
+ }
+
+ function mproxy_goTomproxyAbout(){
+ window.openDialog("chrome://mproxy/content/dialogs/about.xul","mproxyAbout","centerscreen, chrome, modal");
+ }
+
+/*
+* Automatic Updator
+*/
+
+ //If there is a new version, returns the XPI url, else returns false
+
+ //The user selects to check for updates
+
+/*
+* UNINSTALL
+*/
+ function mproxy_uninstall(oLogger){
+ try{
+ var oPrefs = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch);
+ oPrefs.deleteBranch("mproxy");
+
+ oLogger.addLog(new window.ExtuninstallLogItem(oLogger.REMOVE_ACTION, oLogger.SUCCESS_STATUS, "Preferences Branch 'mproxy'", null, null));
+ }catch(err){
+ oLogger.addLog(new window.ExtuninstallLogItem(oLogger.REMOVE_ACTION, oLogger.WARN_STATUS, "Preferences Branch 'mproxy'", 1001, err));
+ throw 1001;
+ }
+ }
+
diff --git a/src/chrome/content/proxy.xul b/src/chrome/content/proxy.xul
new file mode 100644
index 0000000..b0cb91a
--- /dev/null
+++ b/src/chrome/content/proxy.xul
@@ -0,0 +1,125 @@
+<?xml version="1.0"?>
+<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
+
+<!DOCTYPE overlay SYSTEM "chrome://mproxy/locale/locale.dtd" >
+
+<overlay id="mproxyOverlay"
+ title="Multiproxy Switch Overlay"
+ xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+
+ <script type="application/x-javascript" src="chrome://mproxy/content/globals.js"></script>
+ <script type="application/x-javascript" src="chrome://mproxy/content/datasource.js"></script>
+ <script type="application/x-javascript" src="chrome://mproxy/content/tabmanager.js"></script>
+ <script type="application/x-javascript" src="chrome://mproxy/content/proxy.js"></script>
+ <script language="JavaScript">
+ //Window Event Handers
+ try{window.addEventListener("load", mproxy_initProxy, true);}catch(e){}
+ //try{window.addEventListener("focus", mproxy_tab_windowFocus, true);}catch(e){}
+ </script>
+
+ <!-- Toolbar -->
+ <toolbox id="navigator-toolbox" context="toolbar-context-menu">
+ <toolbar id="proxy-toolbar"
+ accesskey="&toolbar.name.key;"
+ context="toolbar-context-menu"
+ customizable="true"
+ iconsize="small"
+ mode="full"
+ collapsed="false" persist="collapsed"
+ toolbarname="&toolbar.name.label;"
+ class="chromeclass">
+
+ <hbox align="center" flex="2">
+ <label value="&toolbar.proxy.label;" style="margin-right: 0;" />
+
+ <menulist id="proxy-list" popup="proxy-list-popup">
+ <menupopup id="proxy-list-popup" position="after_start">
+ <menuitem value="" label="&common.none;" oncommand="mproxy_selectProxy(this)" />
+ </menupopup>
+ </menulist>
+
+ <toolbarbutton id="apply-button" label="&common.apply.label;" default="true" onclick="mproxy_setProxy(true)" image="chrome://mproxy/content/icons/check.png" tooltiptext="&common.apply.tip;" />
+ <spacer width="25" />
+
+ <groupbox orient="horizontal" style="padding: 1px;">
+ <description id="status-label" value="&toolbar.status;" style="font-weight: bold;" />
+ <description id="status-text" value="&toolbar.using.none;" />
+ </groupbox>
+
+ <spacer width="25" />
+ <toolbarbutton id="options-list" label="&common.manage.label;" onclick="mproxy_openProxyManager();" image="chrome://mproxy/content/icons/isp.png" />
+ <spacer width="12" />
+ <toolbarbutton id="options-list" label="&common.preferences.label;" onclick="mproxy_openmproxyPrefs();" image="chrome://mproxy/content/icons/options.png" />
+ </hbox>
+ </toolbar>
+ </toolbox>
+
+ <!-- Toolbar Element -->
+ <toolbarpalette id="BrowserToolbarPalette">
+ <toolbaritem id="mproxy-container" title="&common.product.name;" align="center">
+ <button id="mproxy-element-button" tooltiptext="&toolelement.tip;" label="" popup="mproxy-element-list"
+ image="chrome://mproxy/content/icons/arrow-dn.gif" dir="rtl" />
+ </toolbaritem>
+ </toolbarpalette>
+
+ <!-- Statusbar -->
+ <statusbar id="status-bar" class="chromeclass-status">
+ <statusbarpanel id="mproxy-status"
+ insertbefore="statusbar-updates"
+ label="" collapsed="false"
+ context="mproxy-element-list"
+ popup="mproxy-element-list"
+ tooltiptext="&common.product.name;" />
+
+ </statusbar>
+
+ <!-- Firefox Tools Menu -->
+ <menupopup id="menu_ToolsPopup">
+ <menu id="mproxy-tools-menu" label="&common.product.name;"
+ accesskey="M" class="menuitem-iconic"
+ insertafter="devToolsSeparator">
+ <menupopup id="mproxy-menu-list" position="end_before" onpopupshowing="mproxy_showElementList(event);">
+ <menuitem label="&common.none;" type="checkbox" checked="true" oncommand="mproxy_queueSetProxy(this);" class="proxy-menu-item"/>
+ <menuseparator id="mproxy-menu-list-separator" />
+ <menuitem image="chrome://mproxy/content/icons/isp.png" label="&common.manage.label;" accesskey="&common.manage.key;" oncommand="mproxy_openProxyManager();" />
+ <menuseparator />
+ <menuitem image="chrome://mproxy/content/icons/options.png" label="&common.preferences.label;" accesskey="&common.preferences.key;" oncommand="mproxy_openmproxyPrefs();" />
+
+ <menuitem label="&common.about.label;" accesskey="&common.about.key;" oncommand="mproxy_goTomproxyAbout()" />
+ </menupopup>
+ </menu>
+ </menupopup>
+
+ <!-- Context Menu -->
+ <popup id="contentAreaContextMenu">
+ <menuseparator id="mproxy-context-separator"/>
+ <menu label="&context.label;" id="mproxy-context-menu" accesskey="&context.key;">
+ <menupopup id="mproxy-context-menu-popup;" onpopupshowing="mproxy_showElementList(event);">
+ <menu label="&context.proxies.label;" accesskey="&context.proxies.key;" id="mproxy-context-proxylist">
+ <menupopup id="context-proxy-list">
+ <menuitem label="&common.none;" type="checkbox" checked="true" oncommand="mproxy_setProxy(true, true);" />
+ </menupopup>
+ </menu>
+ <menuseparator />
+ <menuitem label="&common.manage.label;" accesskey="&common.manage.key;" oncommand="mproxy_openProxyManager();" />
+ <menuseparator />
+ <menuitem label="&common.preferences.label;" accesskey="&common.preferences.key;" oncommand="mproxy_openmproxyPrefs();" />
+
+ <menuitem label="&common.about.label;" accesskey="&common.about.key;" oncommand="mproxy_goTomproxyAbout()" />
+ </menupopup>
+ </menu>
+ </popup>
+
+ <!-- Popups -->
+ <popupset id="mainPopupSet">
+ <popup id="mproxy-element-list" position="after_start" onpopupshowing="mproxy_showElementList(event);">
+ <menuitem label="&common.none;" type="checkbox" checked="true" oncommand="mproxy_queueSetProxy(this);" class="proxy-menu-item"/>
+ <menuseparator id="mproxy-element-list-separator" />
+ <menuitem label="&common.manage.label;" accesskey="&common.manage.key;" oncommand="mproxy_openProxyManager();" />
+ <menuseparator />
+ <menuitem label="&common.preferences.label;" accesskey="&common.preferences.key;" oncommand="mproxy_openmproxyPrefs();" />
+
+ <menuitem label="&common.about.label;" accesskey="&common.about.key;" oncommand="mproxy_goTomproxyAbout()" />
+ </popup>
+ </popupset>
+</overlay> \ No newline at end of file
diff --git a/src/chrome/content/proxy_moz.xul b/src/chrome/content/proxy_moz.xul
new file mode 100644
index 0000000..27562bd
--- /dev/null
+++ b/src/chrome/content/proxy_moz.xul
@@ -0,0 +1,118 @@
+<?xml version="1.0"?>
+<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
+
+<!DOCTYPE overlay SYSTEM "chrome://mproxy/locale/locale.dtd" >
+
+<overlay id="mproxyOverlay"
+ title="Multi-proxy Switch Overlay"
+ xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+
+ <script type="application/x-javascript" src="chrome://mproxy/content/globals.js"></script>
+ <script type="application/x-javascript" src="chrome://mproxy/content/datasource.js"></script>
+ <script type="application/x-javascript" src="chrome://mproxy/content/tabmanager.js"></script>
+ <script type="application/x-javascript" src="chrome://mproxy/content/proxy.js"></script>
+ <script language="JavaScript">
+ //Window Event Handers
+ try{window.addEventListener("load", mproxy_initProxy, true);}catch(e){}
+ //try{window.addEventListener("focus", mproxy_tab_windowFocus, true);}catch(e){}
+ </script>
+
+ <!-- Toolbar -->
+ <toolbox id="navigator-toolbox" context="toolbar-context-menu">
+ <toolbar id="proxy-toolbar"
+ accesskey="&toolbar.name.key;"
+ context="toolbar-context-menu"
+ customizable="true"
+ iconsize="small"
+ mode="full"
+ collapsed="false" persist="collapsed"
+ toolbarname="&toolbar.name.label;"
+ class="chromeclass">
+
+ <hbox align="center" flex="2">
+ <label value="&toolbar.proxy.label;" style="margin-right: 0;" />
+
+ <menulist id="proxy-list" popup="proxy-list-popup">
+ <menupopup id="proxy-list-popup" position="after_start">
+ <menuitem value="" label="&common.none;" oncommand="mproxy_selectProxy(this)" />
+ </menupopup>
+ </menulist>
+
+ <toolbarbutton id="apply-button" label="&common.apply.label;" default="true" onclick="mproxy_setProxy(true)" image="chrome://mproxy/content/icons/check.png" tooltiptext="&common.apply.tip;" />
+
+ <spacer width="25" />
+
+ <groupbox orient="horizontal" style="padding: 1px;">
+ <description id="status-label" value="&toolbar.status;" style="font-weight: bold;" />
+ <description id="status-text" value="&toolbar.using.none;" />
+ </groupbox>
+
+ <spacer width="25" />
+ <toolbarbutton id="options-list" label="&common.manage.label;" onclick="mproxy_openProxyManager();" image="chrome://mproxy/content/icons/isp.png" />
+ <spacer width="12" />
+ <toolbarbutton id="options-list" label="&common.preferences.label;" onclick="mproxy_openmproxyPrefs();" image="chrome://mproxy/content/icons/options.png" />
+ </hbox>
+ </toolbar>
+ </toolbox>
+
+ <!-- Statusbar -->
+ <statusbar id="status-bar" class="chromeclass-status">
+ <statusbarpanel id="mproxy-status"
+ insertbefore="statusbar-updates"
+ label="" collapsed="false"
+ context="mproxy-element-list"
+ popup="mproxy-element-list"
+ tooltiptext="&common.product.name;" />
+
+ </statusbar>
+
+ <!-- Firefox Tools Menu -->
+ <menupopup id="menu_ToolsPopup">
+ <menu id="mproxy-tools-menu" label="&common.product.name;"
+ accesskey="P" class="menuitem-iconic"
+ insertafter="devToolsSeparator">
+ <menupopup id="mproxy-menu-list" position="end_before" onpopupshowing="mproxy_showElementList(event);">
+ <menuitem label="&common.none;" type="checkbox" checked="true" oncommand="mproxy_queueSetProxy(this);" class="proxy-menu-item"/>
+ <menuseparator id="mproxy-menu-list-separator" />
+ <menuitem label="&common.manage.label;" accesskey="&common.manage.key;" oncommand="mproxy_openProxyManager();" />
+ <menuseparator />
+ <menuitem label="&common.preferences.label;" accesskey="&common.preferences.key;" oncommand="mproxy_openmproxyPrefs();" />
+ <menuitem label="&common.updates.label;" accesskey="&common.updates.key;" oncommand="mproxy_manualUpgradCheck()" />
+ <menuitem label="&common.about.label;" accesskey="&common.about.key;" oncommand="mproxy_goTomproxyAbout()" />
+ </menupopup>
+ </menu>
+ </menupopup>
+
+ <!-- Context Menu -->
+ <popup id="contentAreaContextMenu">
+ <menuseparator id="mproxy-context-separator"/>
+ <menu label="&context.label;" id="mproxy-context-menu" accesskey="&context.key;">
+ <menupopup id="mproxy-context-menu-popup;" onpopupshowing="mproxy_showElementList(event);">
+ <menu label="&context.proxies.label;" accesskey="&context.proxies.key;" id="mproxy-context-proxylist">
+ <menupopup id="context-proxy-list">
+ <menuitem label="&common.none;" type="checkbox" checked="true" oncommand="mproxy_setProxy(true, true);" />
+ </menupopup>
+ </menu>
+ <menuseparator />
+ <menuitem label="&common.manage.label;" accesskey="&common.manage.key;" oncommand="mproxy_openProxyManager();" />
+ <menuseparator />
+ <menuitem label="&common.preferences.label;" accesskey="&common.preferences.key;" oncommand="mproxy_openmproxyPrefs();" />
+ <menuitem label="&common.updates.label;" accesskey="&common.updates.key;" oncommand="mproxy_manualUpgradCheck()" />
+ <menuitem label="&common.about.label;" accesskey="&common.about.key;" oncommand="mproxy_goTomproxyAbout()" />
+ </menupopup>
+ </menu>
+ </popup>
+
+ <!-- Popups -->
+ <popupset id="mainPopupSet">
+ <popup id="mproxy-element-list" position="after_start" onpopupshowing="mproxy_showElementList(event);">
+ <menuitem label="&common.none;" type="checkbox" checked="true" oncommand="mproxy_queueSetProxy(this);" class="proxy-menu-item"/>
+ <menuseparator id="mproxy-element-list-separator" />
+ <menuitem label="&common.manage.label;" accesskey="&common.manage.key;" oncommand="mproxy_openProxyManager();" />
+ <menuseparator />
+ <menuitem label="&common.preferences.label;" accesskey="&common.preferences.key;" oncommand="mproxy_openmproxyPrefs();" />
+ <menuitem label="&common.updates.label;" accesskey="&common.updates.key;" oncommand="mproxy_manualUpgradCheck()" />
+ <menuitem label="&common.about.label;" accesskey="&common.about.key;" oncommand="mproxy_goTomproxyAbout()" />
+ </popup>
+ </popupset>
+</overlay> \ No newline at end of file
diff --git a/src/chrome/content/proxy_thunder.xul b/src/chrome/content/proxy_thunder.xul
new file mode 100644
index 0000000..90f8072
--- /dev/null
+++ b/src/chrome/content/proxy_thunder.xul
@@ -0,0 +1,60 @@
+<?xml version="1.0"?>
+<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
+
+<!DOCTYPE overlay SYSTEM "chrome://mproxy/locale/locale.dtd" >
+
+<overlay id="mproxyOverlay"
+ title="Multi-proxy Switch Overlay"
+ xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+
+ <script type="application/x-javascript" src="chrome://mproxy/content/globals.js"></script>
+ <script type="application/x-javascript" src="chrome://mproxy/content/datasource.js"></script>
+ <script type="application/x-javascript" src="chrome://mproxy/content/tabmanager.js"></script>
+ <script type="application/x-javascript" src="chrome://mproxy/content/proxy.js"></script>
+ <script language="JavaScript">
+ //Window Event Handers
+ try{window.addEventListener("load", mproxy_initProxy, true);}catch(e){}
+ //try{window.addEventListener("focus", mproxy_tab_windowFocus, true);}catch(e){}
+ </script>
+
+ <!-- Statusbar -->
+ <statusbar id="status-bar" class="chromeclass-status">
+ <statusbarpanel id="mproxy-status"
+ insertbefore="statusbar-updates"
+ label="" collapsed="false"
+ context="mproxy-element-list"
+ popup="mproxy-element-list"
+ tooltiptext="&common.product.name;" />
+
+ </statusbar>
+
+ <!-- Popups -->
+ <popupset id="ContextMenus">
+ <popup id="mproxy-element-list" position="end_before">
+ <menuitem label="&common.none;" type="checkbox" checked="true" oncommand="mproxy_queueSetProxy(this);" class="proxy-menu-item"/>
+ <menuseparator id="mproxy-element-list-separator" />
+ <menuitem label="&common.manage.label;" accesskey="&common.manage.key;" oncommand="mproxy_openProxyManager();" />
+ <menuseparator />
+ <menuitem label="&common.preferences.label;" accesskey="&common.preferences.key;" oncommand="mproxy_openmproxyPrefs();" />
+
+ <menuitem label="&common.about.label;" accesskey="&common.about.key;" oncommand="mproxy_goTomproxyAbout()" />
+ </popup>
+ </popupset>
+
+ <!-- Tools Menu -->
+ <menupopup id="taskPopup">
+ <menu id="mproxy-tools-menu" label="&common.product.name;"
+ accesskey="P" class="menuitem-iconic"
+ insertafter="devToolsSeparator">
+ <menupopup id="mproxy-menu-list" position="end_before">
+ <menuitem label="&common.none;" type="checkbox" checked="true" oncommand="mproxy_queueSetProxy(this);" class="proxy-menu-item"/>
+ <menuseparator id="mproxy-menu-list-separator" />
+ <menuitem label="&common.manage.label;" accesskey="&common.manage.key;" oncommand="mproxy_openProxyManager();" />
+ <menuseparator />
+ <menuitem label="&common.preferences.label;" accesskey="&common.preferences.key;" oncommand="mproxy_openmproxyPrefs();" />
+
+ <menuitem label="&common.about.label;" accesskey="&common.about.key;" oncommand="mproxy_goTomproxyAbout()" />
+ </menupopup>
+ </menu>
+ </menupopup>
+</overlay> \ No newline at end of file
diff --git a/src/chrome/content/tabmanager.js b/src/chrome/content/tabmanager.js
new file mode 100644
index 0000000..297cf9f
--- /dev/null
+++ b/src/chrome/content/tabmanager.js
@@ -0,0 +1,146 @@
+
+/*
+* Tab Manager Object
+*/
+function mproxy_TabManager(){
+ this.manage = false;
+ this.tabs = new Array();
+
+ // Read Preferences (toggle manager on/off)
+ try{
+ var oPrefs = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch);
+ manage = (oPrefs.prefHasUserValue("mproxy.tabs.manager") && oPrefs.getBoolPref("mproxy.tabs.manager") == true);
+
+ // Add Pref Observer
+ var oTabManagerPrefObserver = {
+ observe : function(subject, topic, data){ if(data == true && manage == false) { manage = true; /*mproxy_setProxy(false)*/; } }
+ };
+ oPrefs = Components.classes["@mozilla.org/preferences-service;1"].createInstance(Components.interfaces.nsIPrefBranchInternal);
+ oPrefs.addObserver("mproxy.tabs.manager", oTabManagerPrefObserver, false);
+ } catch(err){}
+
+
+ this.getTabForBrowser = mproxy_tab_getTabForBrowser;
+ this.getTabForDocument = mproxy_tab_getTabForDocument;
+ this.tabLoading = mproxy_tab_tabLoading;
+}
+
+// Called on new Window/Tab
+function mproxy_tab_tabLoading(){
+
+ try{
+ // Verify all tabs are in list
+ var aBrowsers = gBrowser.browsers;
+ for(var i = 0; i < aBrowsers.length; i++){
+ if(this.getTabForBrowser(aBrowsers[i]) == null){
+ var index = this.tabs.length;
+ this.tabs[index] = new mproxy_Tab(aBrowsers[i], null, index);
+ }
+ }
+ } catch(err) {alert(err)}
+
+}
+
+// Return mproxy_Tab object for oBrowser
+function mproxy_tab_getTabForBrowser(oBrowser){
+ for(var t = 0; t < this.tabs.length; t++){
+ if(this.tabs[t].browser == oBrowser)
+ return this.tabs[t];
+ }
+ return null;
+}
+
+// Return mproxy_Tab object for oDocument
+function mproxy_tab_getTabForDocument(oDocument){
+ for(var t = 0; t < this.tabs.length; t++){
+ if(this.tabs[t].browser.contentDocument == oDocument)
+ return this.tabs[t];
+ }
+ return null;
+}
+
+/*
+* Tab Object
+*/
+function mproxy_Tab(browser, proxy, index){
+ this.browser = browser;
+ this.proxy = proxy;
+ this.title = "";
+ this.index = index;
+
+ //alert(this.browser.contentDocument)
+
+ if(this.browser != null){
+ try{
+ this.browser.addEventListener("focus", mproxy_tab_onfocus, true);
+ this.browser.addEventListener("unload", mproxy_tab_onunload, true);
+ this.browser.addEventListener("load", mproxy_tab_onloaded, true);
+ } catch(err) { alert(err); }
+ }
+
+ this.updateTitle = function(){
+
+ if(this.proxy != null && this.proxy != ""){
+
+ // Get label for proxy uri
+ var oRes = mproxy_ds_getResource(aProxies[i]);
+ var sProxyName = mproxy_ds_getValueFor(oRes, mproxy_ds_getResource(gSProxyRdfNodeName));
+
+ // Set title
+ if(sProxyName != null){
+ this.browser.contentDocument.title = "["+ sProxyName +"] " +this.title;
+ }
+ }
+ }
+}
+
+
+/*
+* Utilities
+*/
+ // Notify current tab of proxy change
+ function mproxy_tab_notify(sUri){
+ var oTab = mproxy_getTabManager().getTabForBrowser(gBrowser.selectedBrowser);
+
+ oTab.proxyUri = sUri;
+ oTab.updateTitle();
+ }
+
+/*
+* Event Handlers
+*/
+
+ // On Tab Focus
+ function mproxy_tab_onfocus(event){
+ try{
+ var oTab = mproxy_getTabManager().getTabForBrowser(gBrowser.selectedBrowser)
+ //oTab.browser.contentDocument.title = oTab.index;
+
+ //mproxy_setProxy();
+ }catch(err) { }
+ }
+
+ // On Window Focus
+ function mproxy_tab_windowFocus(event){
+ try{
+ if(event.target.nodeName = "tabbrowser"){
+
+ }
+ }catch(err) { }
+ }
+
+ // On tab unload
+ function mproxy_tab_onunload(event){
+ try{
+ var oTab = mproxy_getTabManager().getTabForDocument(event.target);
+ //oTab.browser.contentDocument.title = "Refreshing...";
+ }catch(err) { }
+ }
+
+ // On tab load
+ function mproxy_tab_onloaded(event){
+ try{
+ var oTab = mproxy_getTabManager().getTabForDocument(event.target);
+ //oTab.browser.contentDocument.title = "Loaded";
+ }catch(err) { }
+ } \ No newline at end of file
diff --git a/src/chrome/locale/README.txt b/src/chrome/locale/README.txt
new file mode 100644
index 0000000..72c28c6
--- /dev/null
+++ b/src/chrome/locale/README.txt
@@ -0,0 +1,12 @@
+These are the translation files for Multiproxy Switch
+
+chrome/locale/en-US/
+chrome/locale/cs-CZ/
+chrome/locale/de-DE/
+chrome/locale/fa-IR/ Persian (Farsi) Iran
+chrome/locale/fr-FR/
+chrome/locale/is-IS/
+chrome/locale/it-IT/
+chrome/locale/ja-JP/
+chrome/locale/zh-CN/
+chrome/locale/zh-TW/ \ No newline at end of file
diff --git a/src/chrome/locale/cs-CZ/contents.rdf b/src/chrome/locale/cs-CZ/contents.rdf
new file mode 100644
index 0000000..a204f04
--- /dev/null
+++ b/src/chrome/locale/cs-CZ/contents.rdf
@@ -0,0 +1,19 @@
+<?xml version="1.0"?>
+
+<RDF:RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:chrome="http://www.mozilla.org/rdf/chrome#">
+
+ <!-- list all the packages being supplied by this jar -->
+ <RDF:Seq about="urn:mozilla:locale:root">
+ <RDF:li resource="urn:mozilla:locale:cs-CZ"/>
+ </RDF:Seq>
+
+ <!-- locale information -->
+ <RDF:Description about="urn:mozilla:locale:cs-CZ">
+ <chrome:packages>
+ <RDF:Seq about="urn:mozilla:locale:cs-CZ:packages">
+ <RDF:li resource="urn:mozilla:locale:cs-CZ:mproxy"/>
+ </RDF:Seq>
+ </chrome:packages>
+ </RDF:Description>
+</RDF:RDF>
diff --git a/src/chrome/locale/cs-CZ/locale.dtd b/src/chrome/locale/cs-CZ/locale.dtd
new file mode 100644
index 0000000..3addeb9
--- /dev/null
+++ b/src/chrome/locale/cs-CZ/locale.dtd
@@ -0,0 +1,118 @@
+<!-- COMMON -->
+<!ENTITY common.product.name "Multiproxy Switch">
+<!ENTITY common.product.homepage "Domovská stránka">
+
+<!ENTITY common.apply.label "Použít">
+<!ENTITY common.apply.tip "Použít zvolený proxy server">
+<!ENTITY common.edit.label "Upravit">
+<!ENTITY common.edit.tip "Upravit zvolený proxy server">
+<!ENTITY common.remove.label "Odebrat">
+<!ENTITY common.remove.tip "Odebrat zvolený proxy server">
+<!ENTITY common.add.label "Přidat">
+<!ENTITY common.add.tip "Přidat zvolený proxy server">
+
+<!ENTITY common.next "Další">
+<!ENTITY common.save "Uložit">
+<!ENTITY common.cancel "Storno">
+
+<!ENTITY common.none "Nic">
+
+<!ENTITY common.options "Možnosti">
+<!ENTITY common.preferences.label "Možnosti">
+<!ENTITY common.preferences.key "O">
+<!ENTITY common.updates.label "Zjistit aktualizace">
+<!ENTITY common.updates.key "Z">
+<!ENTITY common.about.label "O Multiproxy Switch">
+<!ENTITY common.about.key "O">
+<!ENTITY common.manage.label "Spravovat proxy servery">
+<!ENTITY common.manage.key "R">
+
+<!-- TOOLBAR -->
+<!ENTITY toolbar.name.label "Lišta Multiproxy Switch">
+<!ENTITY toolbar.proxy.label "Proxy: " >
+<!ENTITY toolbar.name.key "S">
+<!ENTITY toolbar.status "Stav:">
+<!ENTITY toolbar.using.none "Nepoužíváte proxy server">
+
+<!-- TOOLBAR ELEMENT -->
+<!ENTITY toolelement.tip "Zvolte proxy server">
+
+<!-- CONTEXT MENU -->
+<!ENTITY context.label "Multiproxy Switch">
+<!ENTITY context.key "P">
+<!ENTITY context.proxies.label "Proxy server">
+<!ENTITY context.proxies.key "P">
+<!ENTITY context.options.label "Možnosti...">
+<!ENTITY context.options.key "O">
+
+<!-- DIALOGS -->
+
+ <!-- ADD/EDIT PROXY -->
+ <!ENTITY add.sharing.proxy.label "Use this proxy server for all protocols">
+ <!ENTITY add.title "Informace o proxy serveru">
+ <!ENTITY add.proxyLabel "Název proxy serveru:">
+ <!ENTITY add.option.manual "Ruční konfigurace proxy serverů:">
+ <!ENTITY add.option.auto "Používat skript pro automatickou konfiguraci:">
+ <!ENTITY add.port.label "Port">
+ <!ENTITY add.http.proxy.label "HTTP Proxy">
+ <!ENTITY add.http.proxy.key "H">
+ <!ENTITY add.ssl.proxy.label "SSL Proxy">
+ <!ENTITY add.ssl.proxy.key "S">
+ <!ENTITY add.ftp.proxy.label "FTP Proxy">
+ <!ENTITY add.ftp.proxy.key "F">
+ <!ENTITY add.gopher.proxy.label "Gopher Proxy">
+ <!ENTITY add.gopher.proxy.key "G">
+ <!ENTITY add.socks.proxy.label "SOCKS Host">
+ <!ENTITY add.socks.proxy.key "C">
+ <!ENTITY add.socks.option.v4 "SOCKS v4">
+ <!ENTITY add.socks.option.v5 "SOCKS v5">
+ <!ENTITY add.none.label "Nepoužívat proxy server pro">
+ <!ENTITY add.none.example "Příklad: .firma.com, .domena.cz, 192.168.1.0/24">
+ <!ENTITY add.none.key "N">
+
+ <!-- ADD PROXY - STEP 1 (GET TYPE) -->
+ <!ENTITY add.type.title "Zvolte typ proxy serveru">
+ <!ENTITY add.type.describe "Zvolte způsob konfigurace proxy serveru:">
+ <!ENTITY add.type.standard "Běžný">
+ <!ENTITY add.type.standard.description "Nejrozšířenější druh proxy serveru">
+ <!ENTITY add.type.anonymous "Anonymní">
+ <!ENTITY add.type.anonymous.description "Pro ty, kdo kvůli anonymitě používají pro prohlížení webu více proxy serverů">
+
+ <!-- ABOUT -->
+ <!ENTITY about.title "O Multiproxy Switch">
+ <!ENTITY about.version "verze">
+
+ <!-- PREFERENCES -->
+ <!ENTITY prefs.title "Options" >
+ <!ENTITY prefs.title "Možnosti">
+ <!ENTITY prefs.general "Obecné">
+ <!ENTITY prefs.general.notify "Upozornit na aktualizace">
+ <!ENTITY prefs.general.context "Zobrazit místní nabídku">
+ <!ENTITY prefs.general.toolbar "Zobrazit lištu">
+ <!ENTITY prefs.general.statusbar "Zobrazit ve stavovém řádku">
+ <!ENTITY prefs.switch "Když změním proxy">
+ <!ENTITY prefs.switch.cookies "Vymazat cookies">
+ <!ENTITY prefs.switch.refresh "Obnovit aktuální stránku">
+
+ <!-- UPDATE -->
+ <!ENTITY update.title "Aktualizace Multiproxy Switch">
+ <!ENTITY update.message "Byla nalezena aktualizace pro Lištu Multiproxy Switch. Přejete si ji nyní nainstalovat?">
+ <!ENTITY update.dontshow "Tento dialog již nezobrazovat">
+
+ <!-- ADD ANONYMOUS PROXY -->
+ <!ENTITY add.anon.title "Přidat Anonymní Proxy" >
+ <!ENTITY add.anon.imort.caption "Importovat z" >
+ <!ENTITY add.anon.import.describe "Import ze souboru co-řádek-to-proxy." >
+ <!ENTITY add.anon.import.file "Soubor" >
+ <!ENTITY add.anon.import.file.browse "Procházet" >
+ <!ENTITY add.anon.import.file.load "Načíst" >
+ <!ENTITY add.anon.import.url "URL" >
+ <!ENTITY add.anon.import.url.load "Načíst" >
+ <!ENTITY add.anon.import.url.auto "Načítat toto URL každý den" >
+ <!ENTITY add.anon.import.url.auto.note "toto odebere jakékoliv ručně přidané záznamy" >
+ <!ENTITY add.anon.single.add "Přidat" >
+ <!ENTITY add.anon.single.add.example "Příklad: 12.9.1.242:80" >
+ <!ENTITY add.anon.increment.title "Změnit proxy každých:" >
+ <!ENTITY add.anon.increment.seconds "sekund" >
+ <!ENTITY add.anon.increment.title "Přidat Anonymní Proxy" >
+ <!ENTITY add.anon.title "Přidat Anonymní Proxy" >
diff --git a/src/chrome/locale/cs-CZ/locale.properties b/src/chrome/locale/cs-CZ/locale.properties
new file mode 100644
index 0000000..4b87de3
--- /dev/null
+++ b/src/chrome/locale/cs-CZ/locale.properties
@@ -0,0 +1,56 @@
+# COMMON
+common.product.name = Multiproxy Switch
+common.proxy.none = Nic
+common.buttons.cancel = Storno
+common.buttons.load = Na\u010D\u00EDst
+common.label.proxy = Proxy:
+
+# TOOLBAR
+toolbar.proxy.label = Proxy:
+toolbar.status = Stav:
+toolbar.loading = Na\u010D\u00EDt\u00E1n\u00ED...
+toolbar.using = Pou\u017E\u00EDv\u00E1:
+toolbar.using.none = Bez proxy serveru
+toolbar.clickApply = Klepn\u0115te na Pou\u017E\u00EDt pro pou\u017Eit\u00ED tohoto proxy serveru
+toolbar.notApplied = Proxy server nebyl pou\u017Eit, p\u0159ech\u00E1z\u00EDm zp\u0115t k p\u016Fvodn\u00EDímu
+
+# CONFIRMATIONS
+confirm.remove = Opravdu chcete smazat tento proxy server?
+
+# UPGRADE
+upgrade.none = Zat\u00EDm neexistuj\u00ED \u017E\u00E1dn\u00E9 aktualizace
+upgrade.install = Aktualizace byla nalezena.\nP\u0159ejete si ji nyn\u00ED nainstalovat?
+
+
+# ERRORS
+error.unknown = Objevila se nezn\u00E1m\u00E1 chyba
+error.proxy.load = Nepoda\u0159ilo se na\u010D\u00EDst
+error.cookie = Nepoda\u0159ilo se vymazat cookies
+
+error.remove = Nepoda\u0159ilo se vymazat proxy server
+error.remove.forbidden = Tento z\u00E1znam nem\u016F\u017Eete vymazat.
+
+error.add.empty = Pole N\u00E1zev proxy serveru nesm\u00ED b\u00FDt pr\u00E1zdn\u00E9
+error.add.invalid = Pole N\u00E1zev proxy serveru obsahuje nepovolen\u00E9 znaky
+error.add.duplicate = Takov\u00FD N\u00E1zev proxy serveru ji\u017E existuje
+
+error.edit.select = Zvolte proxy server k editaci
+error.edit.forbidden = Tento z\u00E1znam nem\u016F\u017Eete editovat.
+
+error.update = Nepoda\u0159ilo se aktualizovat
+
+error.prefs.display = Nem\u016F\u017Eete skr\u00FDt m\u00EDstn\u00ED nab\u00EDdku i li\u0161tu.\nPros\u00EDm zvolte jedno
+
+# ANONYMOUS
+add.anon.validate.label = Mus\u00EDte vlo\u017Eit N\u00E1zev proxy serveru
+add.anon.validate.rotation = Mus\u00EDte zvolit dobu cyklu
+add.anon.validate.rotation.type = Doba cyklu mus\u00ED b\u00FDt \u010D\u00EDslo
+add.anon.validate.remove = Zvolte pros\u00EDm z\u00E1znam k odebr\u00E1n\u00ED
+add.anon.validate.empty = Do tohoto pole vlo\u017Ete proxy server
+add.anon.validate.duplicate = Takov\u00FD proxy server ji\u017E ve va\u0161em seznamu existuje
+add.anon.validate.domain = Zadali jste neplatnou IP adresu nebo dom\u00E9nu
+add.anon.import.file.validate.empty = Soubor neobsahuje \u017E\u00E1dn\u00FD platn\u00FD proxy server
+add.anon.import.url.validate.empty = URL neobsahuje \u017E\u00E1dn\u00FD platn\u00FD proxy server
+add.anon.import.validate.old = \u017D\u00E1dn\u00FD nov\u00FD proxy server nebyl nalezeny
+
+anon.config.empty = \u017D\u00E1dn\u00E9 nov\u00E9 proxy servery nebyly p\u0159id\u00E1ny k Anonymn\u00EDmu nastaven\u00ED.
diff --git a/src/chrome/locale/de-DE/contents.rdf b/src/chrome/locale/de-DE/contents.rdf
new file mode 100644
index 0000000..57b2553
--- /dev/null
+++ b/src/chrome/locale/de-DE/contents.rdf
@@ -0,0 +1,19 @@
+<?xml version="1.0"?>
+
+<RDF:RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:chrome="http://www.mozilla.org/rdf/chrome#">
+
+ <!-- list all the packages being supplied by this jar -->
+ <RDF:Seq about="urn:mozilla:locale:root">
+ <RDF:li resource="urn:mozilla:locale:de-DE"/>
+ </RDF:Seq>
+
+ <!-- locale information -->
+ <RDF:Description about="urn:mozilla:locale:de-DE">
+ <chrome:packages>
+ <RDF:Seq about="urn:mozilla:locale:de-DE:packages">
+ <RDF:li resource="urn:mozilla:locale:de-DE:mproxy"/>
+ </RDF:Seq>
+ </chrome:packages>
+ </RDF:Description>
+</RDF:RDF>
diff --git a/src/chrome/locale/de-DE/locale.dtd b/src/chrome/locale/de-DE/locale.dtd
new file mode 100644
index 0000000..9c14fa2
--- /dev/null
+++ b/src/chrome/locale/de-DE/locale.dtd
@@ -0,0 +1,117 @@
+<!-- COMMON -->
+<!ENTITY common.product.name "Multiproxy Switch">
+<!ENTITY common.product.homepage "Webseite">
+
+<!ENTITY common.apply.label "Anwenden">
+<!ENTITY common.apply.tip "Selektierten Proxy anwenden">
+<!ENTITY common.edit.label "Bearbeiten">
+<!ENTITY common.edit.tip "Selektierten Proxy bearbeiten">
+<!ENTITY common.remove.label "Entfernen">
+<!ENTITY common.remove.tip "Selektierten Proxy entfrenen">
+<!ENTITY common.add.label "Hinzufügen">
+<!ENTITY common.add.tip "Neuen Proxy hinzufügen">
+
+<!ENTITY common.next "Nächster">
+<!ENTITY common.save "Speichern">
+<!ENTITY common.cancel "Abbrechen">
+
+<!ENTITY common.none "Kein">
+
+<!ENTITY common.options "Optionen">
+<!ENTITY common.preferences.label "Einstellungen">
+<!ENTITY common.preferences.key "P">
+<!ENTITY common.updates.label "Auf Updates überprüfen">
+<!ENTITY common.updates.key "U">
+<!ENTITY common.about.label "Über">
+<!ENTITY common.about.key "A">
+<!ENTITY common.manage.label "Proxies Verwalten">
+<!ENTITY common.manage.key "M">
+
+<!-- TOOLBAR -->
+<!ENTITY toolbar.name.label "Multiproxy Switch Toolbar">
+<!ENTITY toolbar.proxy.label "Proxy: " >
+<!ENTITY toolbar.name.key "S">
+<!ENTITY toolbar.status "Status:">
+<!ENTITY toolbar.using.none "Benutze kein Proxy">
+
+<!-- TOOLBAR ELEMENT -->
+<!ENTITY toolelement.tip "Selektiere Proxy">
+
+<!-- CONTEXT MENU -->
+<!ENTITY context.label "Multiproxy Switch">
+<!ENTITY context.key "M">
+<!ENTITY context.proxies.label "Proxies">
+<!ENTITY context.proxies.key "P">
+<!ENTITY context.options.label "Optionen...">
+<!ENTITY context.options.key "O">
+
+<!-- DIALOGS -->
+
+<!-- ADD/EDIT PROXY -->
+<!ENTITY add.sharing.proxy.label "Use this proxy server for all protocols">
+<!ENTITY add.title "Proxy Info">
+<!ENTITY add.proxyLabel "Proxy Label:">
+<!ENTITY add.option.manual "Manuelle Proxy Konfiguration">
+<!ENTITY add.option.auto "Automatische Proxy konfigurations URL">
+<!ENTITY add.port.label "Port">
+<!ENTITY add.http.proxy.label "HTTP Proxy">
+<!ENTITY add.http.proxy.key "H">
+<!ENTITY add.ssl.proxy.label "SSL Proxy">
+<!ENTITY add.ssl.proxy.key "S">
+<!ENTITY add.ftp.proxy.label "FTP Proxy">
+<!ENTITY add.ftp.proxy.key "F">
+<!ENTITY add.gopher.proxy.label "Gopher Proxy">
+<!ENTITY add.gopher.proxy.key "G">
+<!ENTITY add.socks.proxy.label "SOCKS Proxy">
+<!ENTITY add.socks.proxy.key "C">
+<!ENTITY add.socks.option.v4 "SOCKS v4">
+<!ENTITY add.socks.option.v5 "SOCKS v5">
+<!ENTITY add.none.label "Kein Proxy für">
+<!ENTITY add.none.example "Beispiel: local.website.com, .myschool.edu">
+<!ENTITY add.none.key "N">
+
+<!-- ADD PROXY - STEP 1 (GET TYPE) -->
+<!ENTITY add.type.title "Selektiere Proxytyp">
+<!ENTITY add.type.describe "Selektiere eine Proxy Konfigurationsart:">
+<!ENTITY add.type.standard "Standard">
+<!ENTITY add.type.standard.description "Der häufigste Proxytyp. Multiproxy Switch benutzt diesen Typ.">
+<!ENTITY add.type.anonymous "Anonymous">
+<!ENTITY add.type.anonymous.description "Für Leute die mehrere Proxies für anonymes browsen benutzen">
+
+<!-- ABOUT -->
+<!ENTITY about.title "Über">
+<!ENTITY about.version "Version">
+
+<!-- PREFERENCES -->
+<!ENTITY prefs.title "Options" >
+<!ENTITY prefs.general "Allgemeines">
+<!ENTITY prefs.general.notify "Bei verfügbaren Updates benachrichtigen">
+<!ENTITY prefs.general.context "Zeige Kontext Menü">
+<!ENTITY prefs.general.toolbar "Zeige Toolbar">
+<!ENTITY prefs.general.statusbar "Zeige in der Status Bar" >
+<!ENTITY prefs.switch "Wenn ich den Proxy wechsle">
+<!ENTITY prefs.switch.cookies "Lösche meine cookies">
+<!ENTITY prefs.switch.refresh "Aktuelle Seite neuladen">
+
+<!-- UPDATE -->
+<!ENTITY update.title "Update für Multi-proxy Switch">
+<!ENTITY update.message "Für MultiProxy ist ein neues Update vorhanden. Möchtest du in jetzt installieren?">
+<!ENTITY update.dontshow "Diesen Dialog nicht mehr anzeigen">
+
+<!-- ADD ANONYMOUS PROXY -->
+<!ENTITY add.anon.title "Anonyme Proxy hinzufügen" >
+<!ENTITY add.anon.imort.caption "Importiere von" >
+<!ENTITY add.anon.import.describe "Importiere eine ein-proxy-pro-zeile Datei." >
+<!ENTITY add.anon.import.file "Datei" >
+<!ENTITY add.anon.import.file.browse "Browse" >
+<!ENTITY add.anon.import.file.load "Lade" >
+<!ENTITY add.anon.import.url "Url" >
+<!ENTITY add.anon.import.url.load "Lade" >
+<!ENTITY add.anon.import.url.auto "Täglich von dieser url automatisch importieren" >
+<!ENTITY add.anon.import.url.auto.note "Das wird alle manuell eingefügten Einträge löschen" >
+<!ENTITY add.anon.single.add "Hinzufügen" >
+<!ENTITY add.anon.single.add.example "Beispiel: 12.9.1.242:80" >
+<!ENTITY add.anon.increment.title "Ändere Proxy alle:" >
+<!ENTITY add.anon.increment.seconds "Sekunden" >
+<!ENTITY add.anon.increment.title "Anonyme Proxies hinzufügen" >
+<!ENTITY add.anon.title "Anonyme Proxies hinzufügen" >
diff --git a/src/chrome/locale/de-DE/locale.properties b/src/chrome/locale/de-DE/locale.properties
new file mode 100644
index 0000000..207bb1b
--- /dev/null
+++ b/src/chrome/locale/de-DE/locale.properties
@@ -0,0 +1,56 @@
+# COMMON
+common.product.name = Multiproxy Switch
+common.proxy.none = Kein
+common.buttons.cancel = Abbrechen
+common.buttons.load = Lade
+common.label.proxy = Proxy:
+
+# TOOLBAR
+toolbar.proxy.label = Proxy:
+toolbar.status = Status:
+toolbar.loading = Laden...
+toolbar.using = Benutze
+toolbar.using.none = Benutze kein Proxy
+toolbar.clickApply = Drücke auf Anwenden um diesen Proxy zu benutzen
+toolbar.notApplied = Proxy nicht angewendet, schalte zum letzt benutztem Proxy
+
+# CONFIRMATIONS
+confirm.remove = Diesen Proxy wirklich löschen?
+
+# UPGRADE
+upgrade.none = Kein Upgrade verfügbar
+upgrade.install = Ein Upgrade existiert.\nMöchtest du in jetzt installieren?
+
+
+# ERRORS
+error.unknown = Ein unbekanter Fehler aufgetreten
+error.proxy.load = Konnte nicht laden
+error.cookie = Konnte cookies nicht löschen
+
+error.remove = Konnte Proxy nicht entfernen
+error.remove.forbidden = Du kannst diesen Eintrag nicht entfernen.
+
+error.add.empty = Das Proxy Labelfeld darf nicht leer sein
+error.add.invalid = Das Proxy Labelfeld enthält ungültige zeichen
+error.add.duplicate = Das Proxy Label exestiert bereits
+
+error.edit.select = Selektiere einen Proxy für die bearbeitung
+error.edit.forbidden = Du kannst diesen Eintrag nicht bearbeiten.
+
+error.update = Konnte nicht upgraden
+
+error.prefs.display = Du kannst nicht beides, kontext menü und toolbar, verstecken.\nBitte selektiere eins
+
+# ANONYMOUS
+add.anon.validate.label = Du mußt einen Proxylabel eingeben
+add.anon.validate.rotation = Du mußt einen rotations interval angeben
+add.anon.validate.rotation.type = Der rotations interval muß eine Nummer sein
+add.anon.validate.remove = Bitte ein Element zum löschen selektieren
+add.anon.validate.empty = Einen Proxy in das Feld eintragen
+add.anon.validate.duplicate = Dieser Proxy ist in deiner Liste bereits vorhanden
+add.anon.validate.domain = Das ist eine ungültige IP-Addresse oder Domainname
+add.anon.import.file.validate.empty = Diese Datei beinhaltet keine gültigen Proxies
+add.anon.import.url.validate.empty = Diese url beinhaltet keine gültigen Proxies
+add.anon.import.validate.old = Keine neuen Proxies gefunden
+
+anon.config.empty = Es wurden keine Proxies in die anonyme Konfiguration hinzugefügt.
diff --git a/src/chrome/locale/en-US/contents.rdf b/src/chrome/locale/en-US/contents.rdf
new file mode 100644
index 0000000..2594ac4
--- /dev/null
+++ b/src/chrome/locale/en-US/contents.rdf
@@ -0,0 +1,19 @@
+<?xml version="1.0"?>
+
+<RDF:RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:chrome="http://www.mozilla.org/rdf/chrome#">
+
+ <!-- list all the packages being supplied by this jar -->
+ <RDF:Seq about="urn:mozilla:locale:root">
+ <RDF:li resource="urn:mozilla:locale:en-US"/>
+ </RDF:Seq>
+
+ <!-- locale information -->
+ <RDF:Description about="urn:mozilla:locale:en-US">
+ <chrome:packages>
+ <RDF:Seq about="urn:mozilla:locale:en-US:packages">
+ <RDF:li resource="urn:mozilla:locale:en-US:mproxy"/>
+ </RDF:Seq>
+ </chrome:packages>
+ </RDF:Description>
+</RDF:RDF>
diff --git a/src/chrome/locale/en-US/locale.dtd b/src/chrome/locale/en-US/locale.dtd
new file mode 100644
index 0000000..0e6310f
--- /dev/null
+++ b/src/chrome/locale/en-US/locale.dtd
@@ -0,0 +1,117 @@
+<!-- COMMON -->
+<!ENTITY common.product.name "Multiproxy Switch">
+<!ENTITY common.product.homepage "Website">
+
+<!ENTITY common.apply.label "Apply">
+<!ENTITY common.apply.tip "Apply selected proxy">
+<!ENTITY common.edit.label "Edit">
+<!ENTITY common.edit.tip "Edit selected proxy">
+<!ENTITY common.remove.label "Remove">
+<!ENTITY common.remove.tip "Remove selected proxy">
+<!ENTITY common.add.label "Add">
+<!ENTITY common.add.tip "Add new proxy">
+
+<!ENTITY common.next "Next">
+<!ENTITY common.save "Save">
+<!ENTITY common.cancel "Cancel">
+
+<!ENTITY common.none "None">
+
+<!ENTITY common.options "Options">
+<!ENTITY common.preferences.label "Preferences">
+<!ENTITY common.preferences.key "P">
+<!ENTITY common.updates.label "Check for Updates">
+<!ENTITY common.updates.key "U">
+<!ENTITY common.about.label "About">
+<!ENTITY common.about.key "A">
+<!ENTITY common.manage.label "Manage Proxies">
+<!ENTITY common.manage.key "M">
+
+<!-- TOOLBAR -->
+<!ENTITY toolbar.name.label "Multiproxy Switch Toolbar">
+<!ENTITY toolbar.proxy.label "Proxy: " >
+<!ENTITY toolbar.name.key "S">
+<!ENTITY toolbar.status "Status:">
+<!ENTITY toolbar.using.none "Using No Proxy">
+
+<!-- TOOLBAR ELEMENT -->
+<!ENTITY toolelement.tip "Select Proxy">
+
+<!-- CONTEXT MENU -->
+<!ENTITY context.label "Multiproxy Switch">
+<!ENTITY context.key "M">
+<!ENTITY context.proxies.label "Proxies">
+<!ENTITY context.proxies.key "P">
+<!ENTITY context.options.label "Options...">
+<!ENTITY context.options.key "O">
+
+<!-- DIALOGS -->
+
+<!-- ADD/EDIT PROXY -->
+<!ENTITY add.sharing.proxy.label "Use this proxy server for all protocols">
+<!ENTITY add.title "Proxy Info">
+<!ENTITY add.proxyLabel "Proxy Label:">
+<!ENTITY add.option.manual "Manual Proxy Configuration">
+<!ENTITY add.option.auto "Automatic proxy configuration URL">
+<!ENTITY add.port.label "Port">
+<!ENTITY add.http.proxy.label "HTTP Proxy">
+<!ENTITY add.http.proxy.key "H">
+<!ENTITY add.ssl.proxy.label "SSL Proxy">
+<!ENTITY add.ssl.proxy.key "S">
+<!ENTITY add.ftp.proxy.label "FTP Proxy">
+<!ENTITY add.ftp.proxy.key "F">
+<!ENTITY add.gopher.proxy.label "Gopher Proxy">
+<!ENTITY add.gopher.proxy.key "G">
+<!ENTITY add.socks.proxy.label "SOCKS Proxy">
+<!ENTITY add.socks.proxy.key "C">
+<!ENTITY add.socks.option.v4 "SOCKS v4">
+<!ENTITY add.socks.option.v5 "SOCKS v5">
+<!ENTITY add.none.label "No Proxy for">
+<!ENTITY add.none.example "Example: local.website.com, .myschool.edu">
+<!ENTITY add.none.key "N">
+
+<!-- ADD PROXY - STEP 1 (GET TYPE) -->
+<!ENTITY add.type.title "Select Proxy Type">
+<!ENTITY add.type.describe "Select a proxy configuration type:">
+<!ENTITY add.type.standard "Standard">
+<!ENTITY add.type.standard.description "Most common proxy type. Multiproxy Switch uses this type.">
+<!ENTITY add.type.anonymous "Anonymous">
+<!ENTITY add.type.anonymous.description "For people who use multiple proxies for anonymous browsing">
+
+<!-- ABOUT -->
+<!ENTITY about.title "About">
+<!ENTITY about.version "Version">
+
+<!-- PREFERENCES -->
+<!ENTITY prefs.title "Options" >
+<!ENTITY prefs.general "General">
+<!ENTITY prefs.general.notify "Notify me of updates">
+<!ENTITY prefs.general.context "Show Context Menu">
+<!ENTITY prefs.general.toolbar "Show Toolbar">
+<!ENTITY prefs.general.statusbar "Show in Status Bar" >
+<!ENTITY prefs.switch "When I switch proxies">
+<!ENTITY prefs.switch.cookies "Clear my cookies">
+<!ENTITY prefs.switch.refresh "Reload current page">
+
+<!-- UPDATE -->
+<!ENTITY update.title "Update for Multi-proxy Switch">
+<!ENTITY update.message "A new update for the Multiproxy Switch is available. Would you like to install it now?">
+<!ENTITY update.dontshow "Don't show this dialog again">
+
+<!-- ADD ANONYMOUS PROXY -->
+<!ENTITY add.anon.title "Add Anonymous Proxies" >
+<!ENTITY add.anon.imort.caption "Import From" >
+<!ENTITY add.anon.import.describe "Import a one-proxy-per-line file." >
+<!ENTITY add.anon.import.file "File" >
+<!ENTITY add.anon.import.file.browse "Browse" >
+<!ENTITY add.anon.import.file.load "Load" >
+<!ENTITY add.anon.import.url "Url" >
+<!ENTITY add.anon.import.url.load "Load" >
+<!ENTITY add.anon.import.url.auto "Automatically import from this url daily" >
+<!ENTITY add.anon.import.url.auto.note "this will remove any manually added entries" >
+<!ENTITY add.anon.single.add "Add" >
+<!ENTITY add.anon.single.add.example "Example: 12.9.1.242:80" >
+<!ENTITY add.anon.increment.title "Change proxy every:" >
+<!ENTITY add.anon.increment.seconds "seconds(s)" >
+<!ENTITY add.anon.increment.title "Add Anonymous Proxies" >
+<!ENTITY add.anon.title "Add Anonymous Proxies" >
diff --git a/src/chrome/locale/en-US/locale.properties b/src/chrome/locale/en-US/locale.properties
new file mode 100644
index 0000000..7f693d0
--- /dev/null
+++ b/src/chrome/locale/en-US/locale.properties
@@ -0,0 +1,56 @@
+# COMMON
+common.product.name = Multiproxy Switch
+common.proxy.none = None
+common.buttons.cancel = Cancel
+common.buttons.load = Load
+common.label.proxy = Proxy:
+
+# TOOLBAR
+toolbar.proxy.label = Proxy:
+toolbar.status = Status:
+toolbar.loading = Loading...
+toolbar.using = Using
+toolbar.using.none = Using No Proxy
+toolbar.clickApply = Click apply to use this proxy
+toolbar.notApplied = Proxy not applied, switching back to last used proxy
+
+# CONFIRMATIONS
+confirm.remove = Are you sure you want to delete this proxy?
+
+# UPGRADE
+upgrade.none = No upgrades currently exist
+upgrade.install = An upgrade exists.\nWould you like to install it now?
+
+
+# ERRORS
+error.unknown = An unknown error occurred
+error.proxy.load = Could not load
+error.cookie = Could not clear cookies
+
+error.remove = Could not remove proxy
+error.remove.forbidden = You cannot remove this entry.
+
+error.add.empty = The Proxy Label field cannot be empty
+error.add.invalid = The Proxy Label field contains invalid characters
+error.add.duplicate = That Proxy Label already exists
+
+error.edit.select = Select a proxy to edit
+error.edit.forbidden = You cannot edit this entry.
+
+error.update = Could not upgrade
+
+error.prefs.display = You cannot hide both the context menu and toolbar.\nPlease select one
+
+# ANONYMOUS
+add.anon.validate.label = You must enter a Proxy Label
+add.anon.validate.rotation = You must enter a rotation interval
+add.anon.validate.rotation.type = The rotation interval must be a number
+add.anon.validate.remove = Please select an item to remove
+add.anon.validate.empty = Enter a proxy into the field
+add.anon.validate.duplicate = This proxy already exists in your list
+add.anon.validate.domain = This is an invalid IP or domain name
+add.anon.import.file.validate.empty = This file did not list any valid proxies
+add.anon.import.url.validate.empty = This url did not list any valid proxies
+add.anon.import.validate.old = No new proxies were found
+
+anon.config.empty = No Proxies have been added to this anonymous configuration.
diff --git a/src/chrome/locale/es-ES/contents.rdf b/src/chrome/locale/es-ES/contents.rdf
new file mode 100644
index 0000000..c292bc8
--- /dev/null
+++ b/src/chrome/locale/es-ES/contents.rdf
@@ -0,0 +1,19 @@
+<?xml version="1.0"?>
+
+<RDF:RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:chrome="http://www.mozilla.org/rdf/chrome#">
+
+ <!-- list all the packages being supplied by this jar -->
+ <RDF:Seq about="urn:mozilla:locale:root">
+ <RDF:li resource="urn:mozilla:locale:es-ES"/>
+ </RDF:Seq>
+
+ <!-- locale information -->
+ <RDF:Description about="urn:mozilla:locale:es-ES">
+ <chrome:packages>
+ <RDF:Seq about="urn:mozilla:locale:es-ES:packages">
+ <RDF:li resource="urn:mozilla:locale:es-ES:mproxy"/>
+ </RDF:Seq>
+ </chrome:packages>
+ </RDF:Description>
+</RDF:RDF>
diff --git a/src/chrome/locale/es-ES/locale.dtd b/src/chrome/locale/es-ES/locale.dtd
new file mode 100644
index 0000000..1394d58
--- /dev/null
+++ b/src/chrome/locale/es-ES/locale.dtd
@@ -0,0 +1,117 @@
+<!-- COMMON -->
+<!ENTITY common.product.name "Multiproxy Switch">
+<!ENTITY common.product.homepage "Página Web">
+
+<!ENTITY common.apply.label "Aplicar">
+<!ENTITY common.apply.tip "Aplicar proxy seleccionado">
+<!ENTITY common.edit.label "Editar">
+<!ENTITY common.edit.tip "Editar proxy seleccionado">
+<!ENTITY common.remove.label "Remover">
+<!ENTITY common.remove.tip "Remover proxy seleccionado">
+<!ENTITY common.add.label "Agregar">
+<!ENTITY common.add.tip "Agregar nuevo proxy">
+
+<!ENTITY common.next "Siguiente">
+<!ENTITY common.save "Salvar">
+<!ENTITY common.cancel "Cancelar">
+
+<!ENTITY common.none "Ninguno">
+
+<!ENTITY common.options "Opciones">
+<!ENTITY common.preferences.label "Preferencias">
+<!ENTITY common.preferences.key "P">
+<!ENTITY common.updates.label "Buscar actualizaciones">
+<!ENTITY common.updates.key "U">
+<!ENTITY common.about.label "Acerca de...">
+<!ENTITY common.about.key "A">
+<!ENTITY common.manage.label "Administrar proxies">
+<!ENTITY common.manage.key "M">
+
+<!-- TOOLBAR -->
+<!ENTITY toolbar.name.label "Multiproxy Switch Toolbar">
+<!ENTITY toolbar.proxy.label "Proxy: " >
+<!ENTITY toolbar.name.key "S">
+<!ENTITY toolbar.status "Estado:">
+<!ENTITY toolbar.using.none "No usando Proxy">
+
+<!-- TOOLBAR ELEMENT -->
+<!ENTITY toolelement.tip "Proxy seleccionado">
+
+<!-- CONTEXT MENU -->
+<!ENTITY context.label "Multiproxy Switch">
+<!ENTITY context.key "M">
+<!ENTITY context.proxies.label "Proxies">
+<!ENTITY context.proxies.key "P">
+<!ENTITY context.options.label "Opciones...">
+<!ENTITY context.options.key "O">
+
+<!-- DIALOGS -->
+
+<!-- ADD/EDIT PROXY -->
+<!ENTITY add.sharing.proxy.label "Usar el mismo proxy para todo">
+<!ENTITY add.title "Información del proxy">
+<!ENTITY add.proxyLabel "Etiqueta del proxy:">
+<!ENTITY add.option.manual "Configuración manual del proxy">
+<!ENTITY add.option.auto "URL para la configuración automática del proxy">
+<!ENTITY add.port.label "Puerto:">
+<!ENTITY add.http.proxy.label "Proxy HTTP:">
+<!ENTITY add.http.proxy.key "H">
+<!ENTITY add.ssl.proxy.label "Proxy SSL:">
+<!ENTITY add.ssl.proxy.key "S">
+<!ENTITY add.ftp.proxy.label "Proxy FTP:">
+<!ENTITY add.ftp.proxy.key "F">
+<!ENTITY add.gopher.proxy.label "Proxy gopher:">
+<!ENTITY add.gopher.proxy.key "G">
+<!ENTITY add.socks.proxy.label "Servidor SOCKS:">
+<!ENTITY add.socks.proxy.key "C">
+<!ENTITY add.socks.option.v4 "SOCKS v4">
+<!ENTITY add.socks.option.v5 "SOCKS v5">
+<!ENTITY add.none.label "No usar proxy para:">
+<!ENTITY add.none.example "Ejemplo: local.paginaweb.com, .miescuela.edu">
+<!ENTITY add.none.key "N">
+
+<!-- ADD PROXY - STEP 1 (GET TYPE) -->
+<!ENTITY add.type.title "Selección del tipo de proxy">
+<!ENTITY add.type.describe "Seleccione un tipo de configuración para el proxy:">
+<!ENTITY add.type.standard "Estándar">
+<!ENTITY add.type.standard.description "Tipo de proxy más común. Multiproxy Switch usa este tipo.">
+<!ENTITY add.type.anonymous "Anónimo">
+<!ENTITY add.type.anonymous.description "Para personas que usan múltiples proxies para navegar anónimamente">
+
+<!-- ABOUT -->
+<!ENTITY about.title "Acerca">
+<!ENTITY about.version "Versión">
+
+<!-- PREFERENCES -->
+<!ENTITY prefs.title "Opciones" >
+<!ENTITY prefs.general "General">
+<!ENTITY prefs.general.notify "Avisarme si hay actualizaciones disponibles">
+<!ENTITY prefs.general.context "Mostrar menú contextual">
+<!ENTITY prefs.general.toolbar "Mostrar barra de herramientas">
+<!ENTITY prefs.general.statusbar "Mostrar en barra de estado" >
+<!ENTITY prefs.switch "Cuando cambie de proxy">
+<!ENTITY prefs.switch.cookies "Eliminar cookies">
+<!ENTITY prefs.switch.refresh "Recargar la página actual">
+
+<!-- UPDATE -->
+<!ENTITY update.title "Actualización para Multi-proxy Switch">
+<!ENTITY update.message "Una actulización para Multiproxy Switch está disponible. Desea instalarla ahora?">
+<!ENTITY update.dontshow "Don't show this dialog again">
+
+<!-- ADD ANONYMOUS PROXY -->
+<!ENTITY add.anon.title "Agregar proxies anónimos" >
+<!ENTITY add.anon.imort.caption "Importar desde" >
+<!ENTITY add.anon.import.describe "Importar un archivo que contiene un proxy por línea." >
+<!ENTITY add.anon.import.file "Archivo" >
+<!ENTITY add.anon.import.file.browse "Explorar" >
+<!ENTITY add.anon.import.file.load "Cargar" >
+<!ENTITY add.anon.import.url "URL" >
+<!ENTITY add.anon.import.url.load "Cargar" >
+<!ENTITY add.anon.import.url.auto "Importar automáticamente desde este URL diariamente" >
+<!ENTITY add.anon.import.url.auto.note "esto eliminará cualquier ingreso manual de datos" >
+<!ENTITY add.anon.single.add "Agregar" >
+<!ENTITY add.anon.single.add.example "Ejemplo: 12.9.1.242:80" >
+<!ENTITY add.anon.increment.title "Cambiar de proxy cada:" >
+<!ENTITY add.anon.increment.seconds "segundo(s)" >
+<!ENTITY add.anon.increment.title "Agregar proxies anónimos" >
+<!ENTITY add.anon.title "Agregar proxies anónimos" >
diff --git a/src/chrome/locale/es-ES/locale.properties b/src/chrome/locale/es-ES/locale.properties
new file mode 100644
index 0000000..f03e53b
--- /dev/null
+++ b/src/chrome/locale/es-ES/locale.properties
@@ -0,0 +1,56 @@
+# COMMON
+common.product.name = Multiproxy Switch
+common.proxy.none = Ninguno
+common.buttons.cancel = Cancelar
+common.buttons.load = Cargar
+common.label.proxy = Proxy:
+
+# TOOLBAR
+toolbar.proxy.label = Proxy:
+toolbar.status = Estado:
+toolbar.loading = Cargando...
+toolbar.using = Usando
+toolbar.using.none = No usando proxy
+toolbar.clickApply = Haga click en aplicar para usar este proxy
+toolbar.notApplied = Proxy no aplicado, devolviendo al último proxy usado
+
+# CONFIRMATIONS
+confirm.remove = Está seguro que desea eliminar este proxy?
+
+# UPGRADE
+upgrade.none = No existen actualizaciones actualmente
+upgrade.install = Una actualización está disponible.\nDesea instalarla ahora?
+
+
+# ERRORS
+error.unknown = Ha ocurrido un error desconocido
+error.proxy.load = No se pudo cargar
+error.cookie = No se pudieron eliminar los cookies
+
+error.remove = No se pudo eliminar el proxy
+error.remove.forbidden = No se puede eliminar esta entrada.
+
+error.add.empty = El campo de la etiqueta del proxy no puede estar vacía
+error.add.invalid = El campo de la etiqueta del proxy contiene caracteres inválidos
+error.add.duplicate = Esa etiqueta del proxy ya existe
+
+error.edit.select = Seleccione un proxy para editar
+error.edit.forbidden = No se puede editar esta entrada.
+
+error.update = No se pudo actualizar
+
+error.prefs.display = No se puede esconder el menú contextual y la barra de herramientas a la vez.\nPor favor seleccione uno
+
+# ANONYMOUS
+add.anon.validate.label = Debe ingresar un etiqueta del proxy
+add.anon.validate.rotation = Debe ingresar un intervalo de rotación
+add.anon.validate.rotation.type = El intervalo de rotación debe ser un número
+add.anon.validate.remove = Por favor seleccione un ítem para eliminar
+add.anon.validate.empty = Ingrese un proxy dentro de este campo
+add.anon.validate.duplicate = Este proxy ya existe en su lista
+add.anon.validate.domain = Ingresó un IP o nombre de dominio inválido
+add.anon.import.file.validate.empty = Este archivo no contiene ningún proxy válido
+add.anon.import.url.validate.empty = Este URL no contiene ningún proxy válido
+add.anon.import.validate.old = No fueron encontrados nuevos proxies
+
+anon.config.empty = No han sido agregados proxies a la configuración anónima.
diff --git a/src/chrome/locale/fa-IR/contents.rdf b/src/chrome/locale/fa-IR/contents.rdf
new file mode 100644
index 0000000..56c7e89
--- /dev/null
+++ b/src/chrome/locale/fa-IR/contents.rdf
@@ -0,0 +1,19 @@
+<?xml version="1.0"?>
+
+<RDF:RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:chrome="http://www.mozilla.org/rdf/chrome#">
+
+ <!-- list all the packages being supplied by this jar -->
+ <RDF:Seq about="urn:mozilla:locale:root">
+ <RDF:li resource="urn:mozilla:locale:fa-IR"/>
+ </RDF:Seq>
+
+ <!-- locale information -->
+ <RDF:Description about="urn:mozilla:locale:fa-IR">
+ <chrome:packages>
+ <RDF:Seq about="urn:mozilla:locale:fa-IR:packages">
+ <RDF:li resource="urn:mozilla:locale:fa-IR:mproxy"/>
+ </RDF:Seq>
+ </chrome:packages>
+ </RDF:Description>
+</RDF:RDF>
diff --git a/src/chrome/locale/fa-IR/locale.dtd b/src/chrome/locale/fa-IR/locale.dtd
new file mode 100644
index 0000000..d530c67
--- /dev/null
+++ b/src/chrome/locale/fa-IR/locale.dtd
@@ -0,0 +1,118 @@
+<!-- COMMON -->
+<!ENTITY common.product.name "Multiproxy Switch">
+<!ENTITY common.product.homepage "وب سايت">
+
+<!ENTITY common.apply.label "اعمال">
+<!ENTITY common.apply.tip "پراکسي منتخب را اعمال کن">
+<!ENTITY common.edit.label "ويرايش">
+<!ENTITY common.edit.tip "پراکسي منتخب را ويرايش کن">
+<!ENTITY common.remove.label "حذف">
+<!ENTITY common.remove.tip "پراکسي منتخب را حذف کن">
+<!ENTITY common.add.label "اضافه">
+<!ENTITY common.add.tip "پراکسي جديد اضافه کن">
+
+<!ENTITY common.next "بعدي">
+<!ENTITY common.save "ضبط">
+<!ENTITY common.cancel "لغو">
+
+<!ENTITY common.none "هيچکدام">
+<!ENTITY common.gpass "جيپَس">
+
+<!ENTITY common.options "انتخابات">
+<!ENTITY common.preferences.label "ترجيحات">
+<!ENTITY common.preferences.key "پ">
+<!ENTITY common.updates.label "چک کن آپگريدي هاست">
+<!ENTITY common.updates.key "و">
+<!ENTITY common.about.label "در مورد جيپراکسي">
+<!ENTITY common.about.key "الف">
+<!ENTITY common.manage.label "پراکسي ها را ترتيب بده">
+<!ENTITY common.manage.key "م">
+
+<!-- TOOLBAR -->
+<!ENTITY toolbar.name.label "تولبار جيپراکسي">
+<!ENTITY toolbar.proxy.label "پراکسي: " >
+<!ENTITY toolbar.name.key "س">
+<!ENTITY toolbar.status "وضعيت:">
+<!ENTITY toolbar.using.none "استفاده از هيچ جيپراکسي">
+
+<!-- TOOLBAR ELEMENT -->
+<!ENTITY toolelement.tip "پراکسي منتخب">
+
+<!-- CONTEXT MENU -->
+<!ENTITY context.label "ترتيب دهنده ي پراکسي جيپَس (جيپراکسي) ">
+<!ENTITY context.key "پ">
+<!ENTITY context.proxies.label "پراکسي ها">
+<!ENTITY context.proxies.key "P">
+<!ENTITY context.options.label "انتخابات...">
+<!ENTITY context.options.key "ي">
+
+<!-- DIALOGS -->
+
+<!-- ADD/EDIT PROXY -->
+<!ENTITY add.sharing.proxy.label "Use this proxy server for all protocols">
+<!ENTITY add.title "اطلاعات پراکسي">
+<!ENTITY add.proxyLabel "نام پراکسي:">
+<!ENTITY add.option.manual "تنظيمات پراکسي دستي">
+<!ENTITY add.option.auto "يو آر ال تنظيمات پراکسي خودکار">
+<!ENTITY add.port.label "پُرت">
+<!ENTITY add.http.proxy.label "پراکسي اچ تي تي پي">
+<!ENTITY add.http.proxy.key "ح">
+<!ENTITY add.ssl.proxy.label "پراکسي اس اس ال">
+<!ENTITY add.ssl.proxy.key "س">
+<!ENTITY add.ftp.proxy.label "پراکسي اف تي پي">
+<!ENTITY add.ftp.proxy.key "ف">
+<!ENTITY add.gopher.proxy.label "پراکسي گروفِر">
+<!ENTITY add.gopher.proxy.key "ج">
+<!ENTITY add.socks.proxy.label "پراکسي ساکس">
+<!ENTITY add.socks.proxy.key "ث">
+<!ENTITY add.socks.option.v4 "4ساکس وي ">
+<!ENTITY add.socks.option.v5 "ساکس وي5">
+<!ENTITY add.none.label "هيچ پراکسي نيست براي">
+<!ENTITY add.none.example "مثال: local.website.com, myschool.edu">
+<!ENTITY add.none.key "ن">
+
+<!-- ADD PROXY - STEP 1 (GET TYPE) -->
+<!ENTITY add.type.title "نوع پراکسي را انتخاب کنيد">
+<!ENTITY add.type.describe "نوع نتضيمات پراکسي را انتخاب کنيد:">
+<!ENTITY add.type.standard "استاندارد(جيپَس)">
+<!ENTITY add.type.standard.description "معمول ترين پراکسي. جيپَس اين نوع را استفاده مي کند. ">
+<!ENTITY add.type.anonymous "بي نام و نشان">
+<!ENTITY add.type.anonymous.description "براي آنهايي که از چند پراکسي براي اينترنت گردي بي نام و نشان استفاده مي کنند">
+
+<!-- ABOUT -->
+<!ENTITY about.title "در مورد جيپراکسي">
+<!ENTITY about.version "نسخه">
+
+<!-- PREFERENCES -->
+<!ENTITY prefs.title "Options" >
+<!ENTITY prefs.general "کلي">
+<!ENTITY prefs.general.notify "اگر آپگِريدي بود مار با خبر کن">
+<!ENTITY prefs.general.context "فهرست محتويات را نشان بده">
+<!ENTITY prefs.general.toolbar "تولبار را نشان بده">
+<!ENTITY prefs.general.statusbar "در اِستَتوس بار نشان بده" >
+<!ENTITY prefs.switch "وقتي پراکسي عوض کردم">
+<!ENTITY prefs.switch.cookies "کوکي هايم را پاک کن">
+<!ENTITY prefs.switch.refresh "صفحه ي کنوني را دوباره باز کن">
+
+<!-- UPDATE -->
+<!ENTITY update.title "آپديت برا جيپراکسي">
+<!ENTITY update.message "يک آپديت جديد برا جيپراکسي آماده است. مي خواهيد اکنون آنرا نصب کنيد؟">
+<!ENTITY update.dontshow "اين پياپ را ديگر نشان ندي">
+
+<!-- ADD ANONYMOUS PROXY -->
+<!ENTITY add.anon.title "پراکسي هاي بي نام و نشان اضافه کن" >
+<!ENTITY add.anon.imort.caption "وارد کن از" >
+<!ENTITY add.anon.import.describe "فايل يک پراکسي در هر خط وارد کن" >
+<!ENTITY add.anon.import.file "فايل" >
+<!ENTITY add.anon.import.file.browse "گشتن" >
+<!ENTITY add.anon.import.file.load "باز کردن" >
+<!ENTITY add.anon.import.url "يو آر ال" >
+<!ENTITY add.anon.import.url.load "باز کردن" >
+<!ENTITY add.anon.import.url.auto "روزانه به طور خودکار از اين يو آر ال وارد کن" >
+<!ENTITY add.anon.import.url.auto.note "اين کار همه ي داده هايي که دستي وارد شده ان را پاک مي کند" >
+<!ENTITY add.anon.single.add "اضافه کن" >
+<!ENTITY add.anon.single.add.example "Example: 12.9.1.242:80" >
+<!ENTITY add.anon.increment.title "Change proxy every:" >
+<!ENTITY add.anon.increment.seconds "ثانيه" >
+<!ENTITY add.anon.increment.title "پراکسي هاي بي نام و نشان اضافه کن" >
+<!ENTITY add.anon.title "پراکسي هاي بي نام و نشان اضافه کن" >
diff --git a/src/chrome/locale/fa-IR/locale.properties b/src/chrome/locale/fa-IR/locale.properties
new file mode 100644
index 0000000..19dee63
--- /dev/null
+++ b/src/chrome/locale/fa-IR/locale.properties
@@ -0,0 +1,47 @@
+# COMMON
+common.product.name = Multiproxy Switch
+common.proxy.none = None
+common.buttons.cancel = لغو
+common.buttons.load = باز کردن
+common.label.proxy = پراکسي:
+
+# TOOLBAR
+toolbar.proxy.label = پراکسي:
+toolbar.status = وضعيت:
+toolbar.loading = در حال باز کردن...
+toolbar.using = در حال استفاده
+toolbar.using.none = بدون استفاده از پراکسي
+toolbar.clickApply = براي استفاده از اين پراکسي اعمال را کليک کنيد.
+notApplied = پراکسي استفاده نشد، برگشت به آخرين پراکسي که مورد استفاده قرار گرفت
+
+# CONFIRMATIONS
+confirm.remove = آيا مطمئنيد مي خواهيد اين پراکسي را پاک کنيد؟
+upgrade.none = در حال حاضر آپگريدي موجود نيست
+upgrade.install = يک آپگِرِيد موجود است. \nمي خواهيد آنرا نصب کنيد؟
+
+
+# ERRORS
+error.unknown = خطايي نا شناس رخ داد
+error.proxy.load = باز نشد error.cookie = کوکي ها پاک نشدند
+error.remove = پراکسي حذف نشد
+error.remove.forbidden = نمي توانيد اين داده را حذف کنيد.
+error.add.empty = محل نام پراکسي نمي تواند خالي باشد
+error.add.invalid = محل نام پراکسي کاراکتر هاي غير معتبر دارد
+error.add.duplicate = اين نام پراکسي از قبل مورد استفاده است
+
+error.edit.select = پراکسي برا ويرايش انتخاب کنيد
+error.edit.forbidden = شما نميتوانيد اين داده را ويرايش کنيد .
+
+error.update = قادر به به هنگام دار آوردن نبود
+error.prefs.display = شما نمي توانيد هم فهرست محتويات و هام تولبار را مخفي کنيد. \nلطفا يکي را انتخاب کنيد
+add.anon.validate.label = شما بايد نامي براي پراکسي وارد کنيد
+add.anon.validate.rotation = شما بايد مدت گردش را وارد کنيد
+add.anon.validate.rotation.type = مدت گردش بايد عدد باشد
+add.anon.validate.remove = لطفا براي حذف کردن آيتمي را انتخاب کنيد.
+add.anon.validate.empty = يک پراکسي در اين جا وارد کنيد
+add.anon.validate.duplicate = اين پراکسي در ليستتان از قبل وجود دارد
+add.anon.validate.domain = اين نام آي پي يا دُمِين با اعتباري نيست
+add.anon.import.file.validate.empty = This file did not list any valid proxies
+add.anon.import.url.validate.empty = اين يو آر ال پراکسي معتبري ارائه نکرد
+add.anon.import.validate.old = پراکسي جديدي پيدا نشد
+config.empty = هيچ پراکسي به اين تنظيمات بي نام و نشان اضافه نشده است
diff --git a/src/chrome/locale/fr-FR/contents.rdf b/src/chrome/locale/fr-FR/contents.rdf
new file mode 100644
index 0000000..7ee80a2
--- /dev/null
+++ b/src/chrome/locale/fr-FR/contents.rdf
@@ -0,0 +1,19 @@
+<?xml version="1.0"?>
+
+<RDF:RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:chrome="http://www.mozilla.org/rdf/chrome#">
+
+ <!-- list all the packages being supplied by this jar -->
+ <RDF:Seq about="urn:mozilla:locale:root">
+ <RDF:li resource="urn:mozilla:locale:fr-FR"/>
+ </RDF:Seq>
+
+ <!-- locale information -->
+ <RDF:Description about="urn:mozilla:locale:fr-FR">
+ <chrome:packages>
+ <RDF:Seq about="urn:mozilla:locale:fr-FR:packages">
+ <RDF:li resource="urn:mozilla:locale:fr-FR:mproxy"/>
+ </RDF:Seq>
+ </chrome:packages>
+ </RDF:Description>
+</RDF:RDF>
diff --git a/src/chrome/locale/fr-FR/locale.dtd b/src/chrome/locale/fr-FR/locale.dtd
new file mode 100644
index 0000000..578680d
--- /dev/null
+++ b/src/chrome/locale/fr-FR/locale.dtd
@@ -0,0 +1,118 @@
+<!-- COMMON -->
+<!ENTITY common.product.name "Multiproxy Switch">
+<!ENTITY common.product.homepage "site web">
+
+<!ENTITY common.apply.label "Utiliser">
+<!ENTITY common.apply.tip "Utilise la configuration de proxy s&#233;lectionn&#233;e">
+<!ENTITY common.edit.label "Modifier">
+<!ENTITY common.edit.tip "Modifie la configuration de proxy s&#233;lectionn&#233;e">
+<!ENTITY common.remove.label "Supprimer">
+<!ENTITY common.remove.tip "Suprimme la configuration de proxy s&#233;lectionn&#233;e">
+<!ENTITY common.add.label "Ajouter">
+<!ENTITY common.add.tip "Ajoute une nouvelle configuration de proxy">
+
+<!ENTITY common.next "Suivant">
+<!ENTITY common.save "Sauvegarder">
+<!ENTITY common.cancel "Annuler">
+
+<!ENTITY common.none "Aucun">
+
+<!ENTITY common.options "Options">
+<!ENTITY common.preferences.label "Pr&#233;f&#233;rences">
+<!ENTITY common.preferences.key "P">
+<!ENTITY common.updates.label "V&#233;rifier les mises &#224; jour">
+<!ENTITY common.updates.key "V">
+<!ENTITY common.about.label "A propos de">
+<!ENTITY common.about.key "A">
+<!ENTITY common.manage.label "G&#233;rer les configurations de proxy">
+<!ENTITY common.manage.key "G">
+
+<!-- TOOLBAR -->
+<!ENTITY toolbar.name.label "Barre d'outil Multiproxy Switch">
+<!ENTITY toolbar.proxy.label "Proxy: " >
+<!ENTITY toolbar.name.key "S">
+<!ENTITY toolbar.status "Statut :">
+<!ENTITY toolbar.using.none "Connexion directe &#224; Internet">
+
+<!-- TOOLBAR ELEMENT -->
+<!ENTITY toolelement.tip "S&#233;lectionnez la configuration de proxy">
+
+<!-- CONTEXT MENU -->
+<!ENTITY context.label "Multiproxy Switch">
+<!ENTITY context.key "M">
+<!ENTITY context.proxies.label "Proxy">
+<!ENTITY context.proxies.key "P">
+<!ENTITY context.options.label "Options...">
+<!ENTITY context.options.key "O">
+
+<!-- DIALOGS -->
+
+ <!-- ADD/EDIT PROXY -->
+ <!ENTITY add.sharing.proxy.label "Use this proxy server for all protocols">
+ <!ENTITY add.title "Param&#232;tres de la configuration de proxy">
+ <!ENTITY add.proxyLabel "Nom de la configuration:">
+ <!ENTITY add.option.manual "Configuration manuelle du proxy">
+ <!ENTITY add.option.auto "Adresse de configuration proxy automatique">
+ <!ENTITY add.port.label "Port">
+ <!ENTITY add.http.proxy.label "Proxy HTTP">
+ <!ENTITY add.http.proxy.key "H">
+ <!ENTITY add.ssl.proxy.label "Proxy SSL">
+ <!ENTITY add.ssl.proxy.key "S">
+ <!ENTITY add.ftp.proxy.label "Proxy FTP">
+ <!ENTITY add.ftp.proxy.key "F">
+ <!ENTITY add.gopher.proxy.label "Proxy Gopher">
+ <!ENTITY add.gopher.proxy.key "G">
+ <!ENTITY add.socks.proxy.label "H&#244;te SOCKS">
+ <!ENTITY add.socks.proxy.key "C">
+ <!ENTITY add.socks.option.v4 "SOCKS v4">
+ <!ENTITY add.socks.option.v5 "SOCKS v5">
+ <!ENTITY add.none.label "Pas de proxy pour">
+ <!ENTITY add.none.example "Exemples: jgillick.nettripper.com, .net.nz">
+ <!ENTITY add.none.key "N">
+
+ <!-- ADD PROXY - STEP 1 (GET TYPE) -->
+ <!ENTITY add.type.title "S&#233;lectionnez le type de proxy">
+ <!ENTITY add.type.describe "S&#233;lectionnez le type de configuration proxy:">
+ <!ENTITY add.type.standard "Standard">
+ <!ENTITY add.type.standard.description "Pour une utilisation standard d'un proxy">
+ <!ENTITY add.type.anonymous "Anonyme">
+ <!ENTITY add.type.anonymous.description "Pour les personnes qui utilisent plusieurs proxy afin de naviguer sur internet de fa&#231;on anonyme">
+
+ <!-- ABOUT -->
+ <!ENTITY about.title "A propos de">
+ <!ENTITY about.version "version">
+
+ <!-- PREFERENCES -->
+ <!ENTITY prefs.title "Options" >
+ <!ENTITY prefs.general "G&#233;n&#233;ral">
+ <!ENTITY prefs.general.notify "Me pr&#233;venir des mises &#224; jour">
+ <!ENTITY prefs.general.context "Afficher dans le menu contextuel">
+ <!ENTITY prefs.general.toolbar "Afficher la barre d'outil">
+ <!ENTITY prefs.general.statusbar "Show in Status Bar" >
+ <!ENTITY prefs.switch "Quand je change de configuration de proxy :">
+ <!ENTITY prefs.switch.cookies "Effacer mes cookies">
+ <!ENTITY prefs.switch.refresh "Actualiser la page en cours">
+
+ <!-- UPDATE -->
+ <!ENTITY update.title "Mise &#224; jour de Multiproxy Switch">
+ <!ENTITY update.message "Une nouvelle version de Multiproxy Switch est disponible. Souhaitez-vous l'installer maintenant?">
+ <!ENTITY update.dontshow "Ne plus afficher cette bo&#238;te de dialogue">
+
+ <!-- ADD ANONYMOUS PROXY -->
+ <!ENTITY add.anon.title "Ajouter des proxy anonymes" >
+ <!ENTITY add.anon.imort.caption "Importer depuis" >
+ <!ENTITY add.anon.import.describe "Importer depuis un fichier (un proxy par ligne)." >
+ <!ENTITY add.anon.import.file "Fichier" >
+ <!ENTITY add.anon.import.file.browse "S&#233;lectionner" >
+ <!ENTITY add.anon.import.file.load "Charger" >
+ <!ENTITY add.anon.import.url "Url" >
+ <!ENTITY add.anon.import.url.load "Charger" >
+ <!ENTITY add.anon.import.url.auto "Importer automatiquement depuis cette URL tous les jours" >
+ <!ENTITY add.anon.import.url.auto.note "Cette option supprimera les entr&#233;es ajout&#233;es manuellement" >
+ <!ENTITY add.anon.single.add "Ajouter" >
+ <!ENTITY add.anon.single.add.example "Exemple: 12.9.1.242:80" >
+ <!ENTITY add.anon.increment.title "Changer de proxy toutes les :" >
+ <!ENTITY add.anon.increment.seconds "seconde(s)" >
+ <!ENTITY add.anon.increment.title "Ajouter des proxy anonymes" >
+ <!ENTITY add.anon.title "Ajouter des proxy anonymes" >
+ \ No newline at end of file
diff --git a/src/chrome/locale/fr-FR/locale.properties b/src/chrome/locale/fr-FR/locale.properties
new file mode 100644
index 0000000..5f29064
--- /dev/null
+++ b/src/chrome/locale/fr-FR/locale.properties
@@ -0,0 +1,55 @@
+# COMMON
+common.product.name = Multiproxy Switch
+common.proxy.none = Aucun
+common.buttons.cancel = Cancel
+common.buttons.load = Load
+common.label.proxy = Proxy:
+
+# TOOLBAR
+toolbar.proxy.label = Proxy:
+toolbar.status = Statut :
+toolbar.loading = Chargement...
+toolbar.using = Utilisation de
+toolbar.using.none = Aucun proxy utilis&#233;.
+toolbar.clickApply = Cliquez sur Utiliser pour activer cette configuration.
+toolbar.notApplied = Changement de configuration abandonn&#233;, retour &#224; la configuration pr&#233;c&#233;dente.
+
+# CONFIRMATIONS
+confirm.remove = Etes-vous certain de vouloir supprimer cette configuration de proxy ?
+
+# UPGRADE
+upgrade.none = Pas de mise &#224; jour disponible actuellement.
+upgrade.install = Une mise &#224; jour est disponible.\nSouhaitez-vous l'installer maintenant ?
+
+# ERRORS
+error.unknown = Une erreur inconnue est intervenue.
+error.proxy.load = Chargement de la configuration impossible.
+error.cookie = Suppression des cookies impossible.
+
+error.remove = Suppression de la configuration de proxy impossible.
+error.remove.forbidden = Vous ne pouvez pas supprimer cettte configuration de proxy.
+
+error.add.empty = Vous devez donner un nom &#224; la configuration de proxy
+error.add.invalid = Le nom de la configuration de proxy contient des caract&#232;res interdits.
+error.add.duplicate = Ce nom de configuration de proxy existe d&#233;j&#224;.
+
+error.edit.select = S&#233;lectionnez une configuration &#224; modifier.
+error.edit.forbidden = Vous ne pouvez pas modifier cette configuation.
+
+error.update = Mise &#224; jour impossible.
+
+error.prefs.display = Vous ne pouvez pas masquer &#224; la fois le menu contextuel et la barre d'outil.
+
+# ANONYMOUS
+add.anon.validate.label = Vous devez donner un nom &#224; la configuration de proxy
+add.anon.validate.rotation = Vous devez saisir un interval de rotation des proxy
+add.anon.validate.rotation.type = L'interval de rotation des proxy doit &#234;tre un chiffre
+add.anon.validate.remove = S&#233;lectionnez une entr&#233;e &#224; supprimer
+add.anon.validate.empty = Saisissez un proxy dans le champ
+add.anon.validate.duplicate = Ce proxy existe d&#233;j&#224; dans votre liste
+add.anon.validate.domain = Nom de domaine ou adresse IP invalide
+add.anon.import.file.validate.empty = Ce fichier ne contient aucune liste de proxy valide
+add.anon.import.url.validate.empty = Cette URL ne contient aucune liste de proxy valide
+add.anon.import.validate.old = Aucun proxy trouv&#233;
+
+anon.config.empty = Aucun proxy n'a &#233;t&#233; ajout&#233; &#224; cette configuration de proxy anonyme \ No newline at end of file
diff --git a/src/chrome/locale/hu-HU/contents.rdf b/src/chrome/locale/hu-HU/contents.rdf
new file mode 100644
index 0000000..41c118d
--- /dev/null
+++ b/src/chrome/locale/hu-HU/contents.rdf
@@ -0,0 +1,19 @@
+<?xml version="1.0"?>
+
+<RDF:RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:chrome="http://www.mozilla.org/rdf/chrome#">
+
+ <!-- list all the packages being supplied by this jar -->
+ <RDF:Seq about="urn:mozilla:locale:root">
+ <RDF:li resource="urn:mozilla:locale:hu-HU"/>
+ </RDF:Seq>
+
+ <!-- locale information -->
+ <RDF:Description about="urn:mozilla:locale:hu-HU">
+ <chrome:packages>
+ <RDF:Seq about="urn:mozilla:locale:hu-HU:packages">
+ <RDF:li resource="urn:mozilla:locale:hu-HU:mproxy"/>
+ </RDF:Seq>
+ </chrome:packages>
+ </RDF:Description>
+</RDF:RDF>
diff --git a/src/chrome/locale/hu-HU/locale.dtd b/src/chrome/locale/hu-HU/locale.dtd
new file mode 100644
index 0000000..d8cdced
--- /dev/null
+++ b/src/chrome/locale/hu-HU/locale.dtd
@@ -0,0 +1,117 @@
+<!-- COMMON -->
+<!ENTITY common.product.name "Multiproxy Switch">
+<!ENTITY common.product.homepage "Honlap">
+
+<!ENTITY common.apply.label "Alkalmaz">
+<!ENTITY common.apply.tip "Kiválasztott proxy használata">
+<!ENTITY common.edit.label "Szerkeszt">
+<!ENTITY common.edit.tip "Kiválasztott proxy szerkesztése">
+<!ENTITY common.remove.label "Eltávolít">
+<!ENTITY common.remove.tip "Kiválasztott proxy eltávolítása">
+<!ENTITY common.add.label "Hozzáad">
+<!ENTITY common.add.tip "Új proxy hozzáadása">
+
+<!ENTITY common.next "Következő">
+<!ENTITY common.save "Ment">
+<!ENTITY common.cancel "Mégsem">
+
+<!ENTITY common.none "Nincs">
+
+<!ENTITY common.options "Opciók">
+<!ENTITY common.preferences.label "Beállítások">
+<!ENTITY common.preferences.key "B">
+<!ENTITY common.updates.label "Frissítés keresése">
+<!ENTITY common.updates.key "F">
+<!ENTITY common.about.label "Multiproxy Switch névjegye">
+<!ENTITY common.about.key "N">
+<!ENTITY common.manage.label "Proxyk menedzselése">
+<!ENTITY common.manage.key "M">
+
+<!-- TOOLBAR -->
+<!ENTITY toolbar.name.label "Multiproxy Switch eszköztár">
+<!ENTITY toolbar.proxy.label "Proxy: " >
+<!ENTITY toolbar.name.key "E">
+<!ENTITY toolbar.status "Állapot:">
+<!ENTITY toolbar.using.none "Nincs proxy használat">
+
+<!-- TOOLBAR ELEMENT -->
+<!ENTITY toolelement.tip "Proxy választása">
+
+<!-- CONTEXT MENU -->
+<!ENTITY context.label "Multiproxy Switch">
+<!ENTITY context.key "M">
+<!ENTITY context.proxies.label "Proxyk">
+<!ENTITY context.proxies.key "P">
+<!ENTITY context.options.label "Opciók...">
+<!ENTITY context.options.key "O">
+
+<!-- DIALOGS -->
+
+ <!-- ADD/EDIT PROXY -->
+ <!ENTITY add.sharing.proxy.label "Use this proxy server for all protocols">
+ <!ENTITY add.title "Proxy info">
+ <!ENTITY add.proxyLabel "Proxy címke:">
+ <!ENTITY add.option.manual "Kézi proxy beállítás">
+ <!ENTITY add.option.auto "Automatikus proxy beállítás URL">
+ <!ENTITY add.port.label "Port">
+ <!ENTITY add.http.proxy.label "HTTP proxy">
+ <!ENTITY add.http.proxy.key "H">
+ <!ENTITY add.ssl.proxy.label "SSL proxy">
+ <!ENTITY add.ssl.proxy.key "S">
+ <!ENTITY add.ftp.proxy.label "FTP proxy">
+ <!ENTITY add.ftp.proxy.key "F">
+ <!ENTITY add.gopher.proxy.label "Gopher proxy">
+ <!ENTITY add.gopher.proxy.key "G">
+ <!ENTITY add.socks.proxy.label "SOCKS proxy">
+ <!ENTITY add.socks.proxy.key "C">
+ <!ENTITY add.socks.option.v4 "SOCKS v4">
+ <!ENTITY add.socks.option.v5 "SOCKS v5">
+ <!ENTITY add.none.label "Nincs proxy ezekre">
+ <!ENTITY add.none.example "Például: local.website.com, .myschool.edu">
+ <!ENTITY add.none.key "N">
+
+ <!-- ADD PROXY - STEP 1 (GET TYPE) -->
+ <!ENTITY add.type.title "Proxy típus választása">
+ <!ENTITY add.type.describe "Válassz egy proxy beállítás típust:">
+ <!ENTITY add.type.standard "Standard">
+ <!ENTITY add.type.standard.description "Legáltalánosabb proxy típusokhoz">
+ <!ENTITY add.type.anonymous "Anonim">
+ <!ENTITY add.type.anonymous.description "Anonim szörfölésre többszörös proxyt használóknak">
+
+ <!-- ABOUT -->
+ <!ENTITY about.title "Multiproxy Switch névjegye">
+ <!ENTITY about.version "verzió">
+
+ <!-- PREFERENCES -->
+ <!ENTITY prefs.title "Options" >
+ <!ENTITY prefs.general "Általános">
+ <!ENTITY prefs.general.notify "Értesít az elérhető frissítésről">
+ <!ENTITY prefs.general.context "Helyi menüben megjelenik">
+ <!ENTITY prefs.general.toolbar "Eszköztár mutatása">
+ <!ENTITY prefs.general.statusbar "Állapotsoron megjelenik">
+ <!ENTITY prefs.switch "Amikor proxyt váltok">
+ <!ENTITY prefs.switch.cookies "Sütik törlése">
+ <!ENTITY prefs.switch.refresh "Jelenlegi oldal újratöltése">
+
+ <!-- UPDATE -->
+ <!ENTITY update.title "Multiproxy Switch frissítése">
+ <!ENTITY update.message "A Multiproxy Switch újabb verziója elérhető. Szeretnéd most telepíteni?">
+ <!ENTITY update.dontshow "Ne mutasd újra ezt az ablakot">
+
+ <!-- ADD ANONYMOUS PROXY -->
+ <!ENTITY add.anon.title "Anonim proxyk hozzáadása" >
+ <!ENTITY add.anon.imort.caption "Importálás innen" >
+ <!ENTITY add.anon.import.describe "Egy-proxy-egy-sor típusú fájl importálása." >
+ <!ENTITY add.anon.import.file "Fájl" >
+ <!ENTITY add.anon.import.file.browse "Böngészés" >
+ <!ENTITY add.anon.import.file.load "Betöltés" >
+ <!ENTITY add.anon.import.url "Url" >
+ <!ENTITY add.anon.import.url.load "Betölt" >
+ <!ENTITY add.anon.import.url.auto "Automatikusan importálja naponta ezt az url-t" >
+ <!ENTITY add.anon.import.url.auto.note "ez eltávolít minden kézileg hozzáadott elemet" >
+ <!ENTITY add.anon.single.add "Hozzáad" >
+ <!ENTITY add.anon.single.add.example "Például: 12.9.1.242:80" >
+ <!ENTITY add.anon.increment.title "Válts proxyt minden:" >
+ <!ENTITY add.anon.increment.seconds "másodpercben" >
+ <!ENTITY add.anon.increment.title "Anonim proxyk hozzáadása" >
+ <!ENTITY add.anon.title "Anonim proxyk hozzáadása" >
diff --git a/src/chrome/locale/hu-HU/locale.properties b/src/chrome/locale/hu-HU/locale.properties
new file mode 100644
index 0000000..27220a3
--- /dev/null
+++ b/src/chrome/locale/hu-HU/locale.properties
@@ -0,0 +1,55 @@
+# COMMON
+common.product.name = Multiproxy Switch
+common.proxy.none = Nincs
+common.buttons.cancel = Mégsem
+common.buttons.load = Tölt
+common.label.proxy = Proxy:
+
+# TOOLBAR
+toolbar.proxy.label = Proxy:
+toolbar.status = Állapot:
+toolbar.loading = Töltés...
+toolbar.using = Használatban:
+toolbar.using.none = Nem használ proxyt
+toolbar.clickApply = Kattints az Alkalmaz gombra ennek a proxynak a használatához
+toolbar.notApplied = Proxy nincs alkalmazva, visszaváltás az utolsó használt proxyra
+
+# CONFIRMATIONS
+confirm.remove = Biztos törölni akarod ezt a proxyt?
+
+# UPGRADE
+upgrade.none = Jelenleg nincs újabb frissítés
+upgrade.install = Van eléhető frissítés.\nAkarod most telepíteni?
+
+# ERRORS
+error.unknown = Egy ismeretlen hiba lépett fel
+error.proxy.load = Nem lehet betölteni
+error.cookie = Nem lehet a sütiket törölni
+
+error.remove = Nem lehet eltávolítani a proxyt
+error.remove.forbidden = Nem lehet eltávolítani a entry.
+
+error.add.empty = A proxy címke mező nem lehet üres
+error.add.invalid = A proxy címke mező érvénytelen karaktert tartalmaz
+error.add.duplicate = Ilyen proxy címke már létezik
+
+error.edit.select = A szerkesztéshez válassz ki egy proxyt
+error.edit.forbidden = Nem szerkesztheted ezt az elemet.
+
+error.update = Nem lehet frissíteni
+
+error.prefs.display = Nem lehet a menüt és a tartalommezőt egyszerre lerejteni.\nKérlek válaszd az egyiket
+
+# ANONYMOUS
+add.anon.validate.label = Írj be egy proxy címkét
+add.anon.validate.rotation = Írj be egy váltási intervallumot
+add.anon.validate.rotation.type = A váltási intervallum csak szám lehet
+add.anon.validate.remove = Kérem válassz egy elemet az eltávolításhoz
+add.anon.validate.empty = Írj egy proxyt a mezőbe
+add.anon.validate.duplicate = Ez a proxy már szerepel a listádon
+add.anon.validate.domain = Ez egy érvénytelen IP-cím vagy domain név
+add.anon.import.file.validate.empty = Ez a fájl nem tartalmaz egyetlen érvényes proxyt sem
+add.anon.import.url.validate.empty = Ez az url nem tartalmaz egyetlen érvényes proxyt sem
+add.anon.import.validate.old = Nem található új proxy
+
+anon.config.empty = Nincs proxy hozzáadva ehhez a névtelen (anonim) konfigurációhoz.
diff --git a/src/chrome/locale/is-IS/contents.rdf b/src/chrome/locale/is-IS/contents.rdf
new file mode 100644
index 0000000..00f3a4a
--- /dev/null
+++ b/src/chrome/locale/is-IS/contents.rdf
@@ -0,0 +1,21 @@
+<?xml version="1.0"?>
+
+<RDF:RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:chrome="http://www.mozilla.org/rdf/chrome#">
+
+ <!-- list all the packages being supplied by this jar -->
+ <RDF:Seq about="urn:mozilla:locale:root">
+ <RDF:li resource="urn:mozilla:locale:is-IS"/>
+ </RDF:Seq>
+
+ <!-- locale information -->
+ <RDF:Description about="urn:mozilla:locale:is-IS"
+ chrome:displayName="Icelandic"
+ chrome:name="is-IS">
+ <chrome:packages>
+ <RDF:Seq about="urn:mozilla:locale:is-IS:packages">
+ <RDF:li resource="urn:mozilla:locale:is-IS:mproxy"/>
+ </RDF:Seq>
+ </chrome:packages>
+ </RDF:Description>
+</RDF:RDF>
diff --git a/src/chrome/locale/is-IS/locale.dtd b/src/chrome/locale/is-IS/locale.dtd
new file mode 100644
index 0000000..5de0ccb
--- /dev/null
+++ b/src/chrome/locale/is-IS/locale.dtd
@@ -0,0 +1,117 @@
+<!-- COMMON -->
+<!ENTITY common.product.name "Multiproxy Switch">
+<!ENTITY common.product.homepage "Vefsv&#230;&#240;i">
+
+<!ENTITY common.apply.label "Stilla">
+<!ENTITY common.apply.tip "Stilla valin proxy">
+<!ENTITY common.edit.label "Breyta">
+<!ENTITY common.edit.tip "Breyta v&#246;ldum proxy">
+<!ENTITY common.remove.label "Ey&#240;a">
+<!ENTITY common.remove.tip "Ey&#240;a v&#246;ldum proxy">
+<!ENTITY common.add.label "B&#230;ta vi&#240;">
+<!ENTITY common.add.tip "B&#230;ta vi&#240; n&#253;jum proxy">
+
+<!ENTITY common.next "N&#230;sta">
+<!ENTITY common.save "Vista">
+<!ENTITY common.cancel "H&#230;tta vi&#240;">
+
+<!ENTITY common.none "Enginn">
+
+<!ENTITY common.options "Valm&#246;guleikar">
+<!ENTITY common.preferences.label "Stillingar">
+<!ENTITY common.preferences.key "P">
+<!ENTITY common.updates.label "Athuga hvort til s&#233;u uppf&#230;rslur">
+<!ENTITY common.updates.key "U">
+<!ENTITY common.about.label "Um Multiproxy Switch">
+<!ENTITY common.about.key "A">
+<!ENTITY common.manage.label "Stj&#243;rna proxy-um">
+<!ENTITY common.manage.key "M">
+
+<!-- TOOLBAR -->
+<!ENTITY toolbar.name.label "Multiproxy Switch Toolbar">
+<!ENTITY toolbar.proxy.label "Proxy: " >
+<!ENTITY toolbar.name.key "S">
+<!ENTITY toolbar.status "Sta&#240;a:">
+<!ENTITY toolbar.using.none "Ekki veri&#240; a&#240; nota neinn proxy">
+
+<!-- TOOLBAR ELEMENT -->
+<!ENTITY toolelement.tip "Velja Proxy">
+
+<!-- CONTEXT MENU -->
+<!ENTITY context.label "Multiproxy Switch">
+<!ENTITY context.key "P">
+<!ENTITY context.proxies.label "Proxy-ar">
+<!ENTITY context.proxies.key "P">
+<!ENTITY context.options.label "Valm&#246;guleikar...">
+<!ENTITY context.options.key "O">
+
+<!-- DIALOGS -->
+
+ <!-- ADD/EDIT PROXY -->
+ <!ENTITY add.sharing.proxy.label "Use this proxy server for all protocols">
+ <!ENTITY add.title "Uppl&#253;singar um proxy">
+ <!ENTITY add.proxyLabel "Nafn &#225; proxy:">
+ <!ENTITY add.option.manual "Handvirkar proxy stillingar">
+ <!ENTITY add.option.auto "Sj&#225;lfkrafa proxy stillingar URL">
+ <!ENTITY add.port.label "G&#225;tt">
+ <!ENTITY add.http.proxy.label "HTTP Proxy">
+ <!ENTITY add.http.proxy.key "H">
+ <!ENTITY add.ssl.proxy.label "SSL Proxy">
+ <!ENTITY add.ssl.proxy.key "S">
+ <!ENTITY add.ftp.proxy.label "FTP Proxy">
+ <!ENTITY add.ftp.proxy.key "F">
+ <!ENTITY add.gopher.proxy.label "Gopher Proxy">
+ <!ENTITY add.gopher.proxy.key "G">
+ <!ENTITY add.socks.proxy.label "SOCKS Proxy">
+ <!ENTITY add.socks.proxy.key "C">
+ <!ENTITY add.socks.option.v4 "SOCKS v4">
+ <!ENTITY add.socks.option.v5 "SOCKS v5">
+ <!ENTITY add.none.label "Ekki nota proxy fyrir">
+ <!ENTITY add.none.example "D&#230;mi: jgillick.nettripper.com, .net.nz">
+ <!ENTITY add.none.key "N">
+
+ <!-- ADD PROXY - STEP 1 (GET TYPE) -->
+ <!ENTITY add.type.title "Veldur proxy tegund">
+ <!ENTITY add.type.describe "Veldu stillingar tegund fyrir proxy-inn:">
+ <!ENTITY add.type.standard "Venjulegur">
+ <!ENTITY add.type.standard.description "Flestar algengar proxy tegundir">
+ <!ENTITY add.type.anonymous "Nafnlaus">
+ <!ENTITY add.type.anonymous.description "Fyrir notendur sem nota marga proxy fyrir nafnlausa vefsko&#240;un">
+
+ <!-- ABOUT -->
+ <!ENTITY about.title "Um Multiproxy Switch">
+ <!ENTITY about.version "&#250;tg&#225;fa">
+
+ <!-- PREFERENCES -->
+ <!ENTITY prefs.title "Options" >
+ <!ENTITY prefs.general "General">
+ <!ENTITY prefs.general.notify "L&#225;ttu mig vita um uppf&#230;rslur">
+ <!ENTITY prefs.general.context "S&#253;na Context Menu">
+ <!ENTITY prefs.general.toolbar "S&#253;na Toolbar">
+ <!ENTITY prefs.general.statusbar "Show in Status Bar" >
+ <!ENTITY prefs.switch "&#222;egar &#233;g skipti um proxy">
+ <!ENTITY prefs.switch.cookies "Hreinsa &#250;t k&#246;kur">
+ <!ENTITY prefs.switch.refresh "Endurhla&#240;a n&#250;verandi s&#237;&#240;u">
+
+ <!-- UPDATE -->
+ <!ENTITY update.title "Uppf&#230;rsla fyrir Multiproxy Switch">
+ <!ENTITY update.message "N&#253; uppf&#230;rsla fyrir Multiproxy Switch Toolbar er til. Viltu hla&#240;a henni inn n&#250;na?">
+ <!ENTITY update.dontshow "Ekki s&#253;na &#254;essi skilabo&#240; aftur">
+
+ <!-- ADD ANONYMOUS PROXY -->
+ <!ENTITY add.anon.title "B&#230;ta vi&#240; nafnlausum proxy-um" >
+ <!ENTITY add.anon.imort.caption "Flytja inn fr&#225;" >
+ <!ENTITY add.anon.import.describe "Flytja inn einn-proxy-per-l&#237;nu skr&#225;." >
+ <!ENTITY add.anon.import.file "Skr&#225;" >
+ <!ENTITY add.anon.import.file.browse "Sko&#240;a" >
+ <!ENTITY add.anon.import.file.load "Hla&#240;a" >
+ <!ENTITY add.anon.import.url "Url" >
+ <!ENTITY add.anon.import.url.load "Hla&#240;a" >
+ <!ENTITY add.anon.import.url.auto "Flytja daglega inn sj&#225;lfkrafa fr&#225; &#254;essu urli" >
+ <!ENTITY add.anon.import.url.auto.note "&#254;etta mun ey&#240;a &#246;llum innsettum f&#230;rslum" >
+ <!ENTITY add.anon.single.add "B&#230;ta vi&#240;" >
+ <!ENTITY add.anon.single.add.example "D&#230;mi: 12.9.1.242:80" >
+ <!ENTITY add.anon.increment.title "Breyta um proxy &#225;:" >
+ <!ENTITY add.anon.increment.seconds "sek&#250;ndna fresti" >
+ <!ENTITY add.anon.increment.title "B&#230;ta vi&#240; nafnlausum proxy-um" >
+ <!ENTITY add.anon.title "B&#230;ta vi&#240; nafnlausum proxy-um" >
diff --git a/src/chrome/locale/is-IS/locale.properties b/src/chrome/locale/is-IS/locale.properties
new file mode 100644
index 0000000..c81df7a
--- /dev/null
+++ b/src/chrome/locale/is-IS/locale.properties
@@ -0,0 +1,56 @@
+# COMMON
+common.product.name = Multiproxy Switch
+common.proxy.none = None
+common.buttons.cancel = H&#230;tta vi&#240;
+common.buttons.load = Hla&#240;a
+common.label.proxy = Proxy:
+
+# TOOLBAR
+toolbar.proxy.label = Proxy:
+toolbar.status = Sta&#240;a:
+toolbar.loading = Hle&#240;sla...
+toolbar.using = Notar
+toolbar.using.none = Notar engan proxy
+toolbar.clickApply = Smelli&#240; &#225; stilla til a&#240; nota &#254;ennan proxy
+toolbar.notApplied = Gat ekki stillt yfir &#225; &#254;ennan proxy, skiptum aftur yfir &#225; fyrri proxy
+
+# CONFIRMATIONS
+confirm.remove = Ertu vissum a&#240; &#254;&#250; viljir ey&#240;a &#250;t &#254;essum proxy?
+
+# UPGRADE
+upgrade.none = Engar uppf&#230;rslur til sta&#240;ar
+upgrade.install = Uppf&#230;rsla er til.\nViltu hla&#240;a henni inn n&#250;na?
+
+
+# ERRORS
+error.unknown = &#211;&#254;ekkt villa &#225;tti s&#233;r sta&#240;
+error.proxy.load = Gat ekki hla&#240;i&#240; &#254;essu inn
+error.cookie = Gat ekki hreinsa&#240; &#250;t k&#246;kur(cookies)
+
+error.remove = Ekki var h&#230;gt a&#240; fjarl&#230;ga &#254;ennan proxy
+error.remove.forbidden = &#222;&#250; getur ekki fjarl&#230;gt &#254;essa f&#230;rslu
+
+error.add.empty = Textasv&#230;&#240;i&#240; fyrir proxy m&#225; ekki vera t&#243;mt
+error.add.invalid = Textasv&#230;&#240;i&#240; fyrir proxy inniheldur &#243;l&#246;glega stafi
+error.add.duplicate = &#222;etta nafn &#225; proxy er n&#250; &#254;egar til
+
+error.edit.select = Veldur proxy til a&#240; breyta
+error.edit.forbidden = Ekki er h&#230;gt a&#240; breyta &#254;essu gildi
+
+error.update = Ekki h&#230;gt a&#240; uppf&#230;ra
+
+error.prefs.display = Ekki er h&#230;gt a&#240; fela b&#230;&#240;i context menu og toolbar.\nVinsamlegast veldu anna&#240; hvort
+
+# ANONYMOUS
+add.anon.validate.label = &#222;&#250; ver&#240;ur a&#240; sl&#225; inn nafn fyrir proxy-inn
+add.anon.validate.rotation = &#222;&#250; ver&#240;ur a&#240; still t&#237;&#240;ni umskipta
+add.anon.validate.rotation.type = T&#237;&#240;ni umskipta ver&#240;ur a&#240; vera tala
+add.anon.validate.remove = Vinsamlegast veldu hlut til a&#240; ey&#240;a
+add.anon.validate.empty = Sl&#225;&#240;u inn proxy &#237; textasv&#230;&#240;i&#240;
+add.anon.validate.duplicate = &#222;essi proxy er n&#250; &#254;egar til &#237; listanum &#254;&#237;num
+add.anon.validate.domain = &#222;etta er &#243;l&#246;glegt ip-vistfanag e&#240;a nafn &#225; l&#233;ni
+add.anon.import.file.validate.empty = &#222;etta sv&#230;&#240;i innih&#233;lt ekki neina l&#246;glega proxya
+add.anon.import.url.validate.empty = &#222;etta url innih&#233;lt ekki neina l&#246;glega proxya
+add.anon.import.validate.old = Engir n&#253;jir proxy-ar fundust
+
+anon.config.empty = Engum proxy-um hefur veri&#240; b&#230;tt vi&#240; &#254;essa nafnlausu stilling. \ No newline at end of file
diff --git a/src/chrome/locale/it-IT/contents.rdf b/src/chrome/locale/it-IT/contents.rdf
new file mode 100644
index 0000000..8db3ace
--- /dev/null
+++ b/src/chrome/locale/it-IT/contents.rdf
@@ -0,0 +1,19 @@
+<?xml version="1.0"?>
+
+<RDF:RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:chrome="http://www.mozilla.org/rdf/chrome#">
+
+ <!-- list all the packages being supplied by this jar -->
+ <RDF:Seq about="urn:mozilla:locale:root">
+ <RDF:li resource="urn:mozilla:locale:it-IT"/>
+ </RDF:Seq>
+
+ <!-- locale information -->
+ <RDF:Description about="urn:mozilla:locale:it-IT">
+ <chrome:packages>
+ <RDF:Seq about="urn:mozilla:locale:it-IT:packages">
+ <RDF:li resource="urn:mozilla:locale:it-IT:mproxy"/>
+ </RDF:Seq>
+ </chrome:packages>
+ </RDF:Description>
+</RDF:RDF>
diff --git a/src/chrome/locale/it-IT/locale.dtd b/src/chrome/locale/it-IT/locale.dtd
new file mode 100644
index 0000000..d54a886
--- /dev/null
+++ b/src/chrome/locale/it-IT/locale.dtd
@@ -0,0 +1,118 @@
+<!-- COMMON -->
+<!ENTITY common.product.name "Multiproxy Switch">
+<!ENTITY common.product.homepage "Website">
+
+<!ENTITY common.apply.label "Applica">
+<!ENTITY common.apply.tip "Applica il proxy selezionato">
+<!ENTITY common.edit.label "Modifica">
+<!ENTITY common.edit.tip "Applica il proxy selezionato">
+<!ENTITY common.remove.label "Rimuovi">
+<!ENTITY common.remove.tip "Rimuovi il proxy selezionato">
+<!ENTITY common.add.label "Aggiungi">
+<!ENTITY common.add.tip "Aggiungi nuovo proxy">
+
+<!ENTITY common.next "Avanti">
+<!ENTITY common.save "Salva">
+<!ENTITY common.cancel "Annulla">
+
+<!ENTITY common.none "Nessuno">
+
+<!ENTITY common.options "Opzioni">
+<!ENTITY common.preferences.label "Preferenze">
+<!ENTITY common.preferences.key "P">
+<!ENTITY common.updates.label "Verifica aggiornamenti">
+<!ENTITY common.updates.key "V">
+<!ENTITY common.about.label "Informazioni">
+<!ENTITY common.about.key "I">
+<!ENTITY common.manage.label "Gestisci Proxy">
+<!ENTITY common.manage.key "G">
+
+<!-- TOOLBAR -->
+<!ENTITY toolbar.name.label "Barra Multiproxy Switch">
+<!ENTITY toolbar.proxy.label "Proxy: " >
+<!ENTITY toolbar.name.key "S">
+<!ENTITY toolbar.status "Stato:">
+<!ENTITY toolbar.using.none "Nessun proxy attivo">
+
+<!-- TOOLBAR ELEMENT -->
+<!ENTITY toolelement.tip "Seleziona Proxy">
+
+<!-- CONTEXT MENU -->
+<!ENTITY context.label "Multiproxy Switch">
+<!ENTITY context.key "P">
+<!ENTITY context.proxies.label "Proxy">
+<!ENTITY context.proxies.key "P">
+<!ENTITY context.options.label "Opzioni...">
+<!ENTITY context.options.key "O">
+
+<!-- DIALOGS -->
+
+<!-- ADD/EDIT PROXY -->
+<!ENTITY add.sharing.proxy.label "Use this proxy server for all protocols">
+<!ENTITY add.title "Informazioni Proxy">
+<!ENTITY add.proxyLabel "Identificativo Proxy:">
+<!ENTITY add.option.manual "Configurazione manuale del proxy">
+<!ENTITY add.option.auto "Configurazione automatica del proxy (URL)">
+<!ENTITY add.port.label "Porta">
+<!ENTITY add.http.proxy.label "Proxy HTTP">
+<!ENTITY add.http.proxy.key "H">
+<!ENTITY add.ssl.proxy.label "Proxy SSL">
+<!ENTITY add.ssl.proxy.key "S">
+<!ENTITY add.ftp.proxy.label "Proxy FTP">
+<!ENTITY add.ftp.proxy.key "F">
+<!ENTITY add.gopher.proxy.label "Proxy Gopher">
+<!ENTITY add.gopher.proxy.key "G">
+<!ENTITY add.socks.proxy.label "Proxy SOCKS">
+<!ENTITY add.socks.proxy.key "C">
+<!ENTITY add.socks.option.v4 "SOCKS v4">
+<!ENTITY add.socks.option.v5 "SOCKS v5">
+<!ENTITY add.none.label "Nessun proxy per">
+<!ENTITY add.none.example "Esempio: jgillick.nettripper.com, .net.nz">
+<!ENTITY add.none.key "N">
+
+<!-- ADD PROXY - STEP 1 (GET TYPE) -->
+<!ENTITY add.type.title "Seleziona il tipo di proxy">
+<!ENTITY add.type.describe "Seleziona un tipo di configurazione proxy:">
+<!ENTITY add.type.standard "Standard">
+<!ENTITY add.type.standard.description "Il tipo di configurazione proxy piu' usato">
+<!ENTITY add.type.anonymous "Anonimo">
+<!ENTITY add.type.anonymous.description "Per persone che usano proxy multipli per navigazione anonima">
+
+<!-- ABOUT -->
+<!ENTITY about.title "Informazioni su Multiproxy Switch">
+<!ENTITY about.version "versione">
+
+<!-- PREFERENCES -->
+<!ENTITY prefs.title "Options" >
+<!ENTITY prefs.general "Generale">
+<!ENTITY prefs.general.notify "Notifica aggiornamenti">
+<!ENTITY prefs.general.context "Mostra il menu di contesto">
+<!ENTITY prefs.general.toolbar "Mostra Toolbar">
+<!ENTITY prefs.general.statusbar "Show in Status Bar" >
+<!ENTITY prefs.switch "Quando cambio proxy">
+<!ENTITY prefs.switch.cookies "Pulisci i cookies">
+<!ENTITY prefs.switch.refresh "Ricarica la pagina corrente">
+
+<!-- UPDATE -->
+<!ENTITY update.title "Aggiornamento per Multiproxy Switch">
+<!ENTITY update.message "E' disponibile un aggiornamento per la Toolbar Multiproxy Switch. Vuoi installarlo adesso ?">
+<!ENTITY update.dontshow "Non mostrare pi?questa finestra">
+
+<!-- ADD ANONYMOUS PROXY -->
+<!ENTITY add.anon.title "Aggiungi Proxy anonimi" >
+<!ENTITY add.anon.imort.caption "Importa da" >
+<!ENTITY add.anon.import.describe "Importa una lista di proxy da file (un proxy per linea)" >
+<!ENTITY add.anon.import.file "File" >
+<!ENTITY add.anon.import.file.browse "Sfoglia" >
+<!ENTITY add.anon.import.file.load "Apri" >
+<!ENTITY add.anon.import.url "Url" >
+<!ENTITY add.anon.import.url.load "Apri" >
+<!ENTITY add.anon.import.url.auto "Importa automaticamente da questo url giornalmente" >
+<!ENTITY add.anon.import.url.auto.note "questo rimuovera' ogni aggiunta manuale" >
+<!ENTITY add.anon.single.add "Aggiungi" >
+<!ENTITY add.anon.single.add.example "Esempio: 12.9.1.242:80" >
+<!ENTITY add.anon.increment.title "Cambia proxy ogni:" >
+<!ENTITY add.anon.increment.seconds "secondi(s)" >
+<!ENTITY add.anon.increment.title "Aggiungi Proxies Anonimi" >
+<!ENTITY add.anon.title "Aggiungi Proxies Anonimi" >
+
diff --git a/src/chrome/locale/it-IT/locale.properties b/src/chrome/locale/it-IT/locale.properties
new file mode 100644
index 0000000..528eb34
--- /dev/null
+++ b/src/chrome/locale/it-IT/locale.properties
@@ -0,0 +1,56 @@
+# COMMON
+common.product.name = Multiproxy Switch
+common.proxy.none = Nessuno
+common.buttons.cancel = Annulla
+common.buttons.load = Carica
+common.label.proxy = Proxy:
+
+# TOOLBAR
+toolbar.proxy.label = Proxy:
+toolbar.status = Stato:
+toolbar.loading = Caricamento...
+toolbar.using = Usa
+toolbar.using.none = Nessun Proxy in uso
+toolbar.clickApply = Clicca applicaper usare questo proxy
+toolbar.notApplied = Proxy non applicato, riapplico l'ultimo proxy usato
+
+# CONFIRMATIONS
+confirm.remove = Sei sicuro di voler cancellare questo proxy ?
+
+# UPGRADE
+upgrade.none = NEssun aggiornamento disponibile
+upgrade.install = E' disponibile un aggiornamento.\nVuoi installarlo ora ?
+
+
+# ERRORS
+error.unknown = Si &#232; verificato un errore sconosciuto
+error.proxy.load = Impossibile scaricare
+error.cookie = Impossibile cancellare i cookies
+
+error.remove = Impossibile rimuovere il proxy
+error.remove.forbidden = Impossibile rimuovere l'elemento.
+
+error.add.empty = Il campo Identificativo Proxy non pu&#242; essere vuoto
+error.add.invalid = Il campo Identificativo Proxy contirnr caratteri non validi
+error.add.duplicate = Questo Identificativo Proxy esiste gi&#224;
+
+error.edit.select = Seleziona un proxy da modificare
+error.edit.forbidden = Non puoi modificare questo elemento.
+
+error.update = Impossibile aggiornare
+
+error.prefs.display = Non puoi nascondere contemporaneamente il menu di contesto e la toolbar.\nPEr favore, selezionane uno
+
+# ANONYMOUS
+add.anon.validate.label = Devi inserire un Identificativo Proxy
+add.anon.validate.rotation = Devi inserire un intervallo di rotazione
+add.anon.validate.rotation.type = L'intervallo di rotazione deve essere un numero
+add.anon.validate.remove = Seleziona un elemento da rimuovere
+add.anon.validate.empty = Inserisci un proxy nel campo
+add.anon.validate.duplicate = Questo proxy esiste gi&#224; nella tua lista
+add.anon.validate.domain = Questo &#232; un IP o un nome di dominio non valido
+add.anon.import.file.validate.empty = Questo file non &#232; un elenco di proxy validi
+add.anon.import.url.validate.empty = Questo url non elenca dei proxy validi
+add.anon.import.validate.old = Nessun proxy trovato
+
+anon.config.empty = NEssun proxy aggiunto a questa configurazione anonima. \ No newline at end of file
diff --git a/src/chrome/locale/ja-JP/contents.rdf b/src/chrome/locale/ja-JP/contents.rdf
new file mode 100644
index 0000000..d2c52df
--- /dev/null
+++ b/src/chrome/locale/ja-JP/contents.rdf
@@ -0,0 +1,19 @@
+<?xml version="1.0"?>
+
+<RDF:RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:chrome="http://www.mozilla.org/rdf/chrome#">
+
+ <!-- list all the packages being supplied by this jar -->
+ <RDF:Seq about="urn:mozilla:locale:root">
+ <RDF:li resource="urn:mozilla:locale:ja-JP"/>
+ </RDF:Seq>
+
+ <!-- locale information -->
+ <RDF:Description about="urn:mozilla:locale:ja-JP">
+ <chrome:packages>
+ <RDF:Seq about="urn:mozilla:locale:ja-JP:packages">
+ <RDF:li resource="urn:mozilla:locale:ja-JP:mproxy"/>
+ </RDF:Seq>
+ </chrome:packages>
+ </RDF:Description>
+</RDF:RDF>
diff --git a/src/chrome/locale/ja-JP/locale.dtd b/src/chrome/locale/ja-JP/locale.dtd
new file mode 100644
index 0000000..a2f4347
--- /dev/null
+++ b/src/chrome/locale/ja-JP/locale.dtd
@@ -0,0 +1,117 @@
+<!-- COMMON -->
+<!ENTITY common.product.name "Multiproxy Switch">
+<!ENTITY common.product.homepage "Webサイト">
+
+<!ENTITY common.apply.label "適用">
+<!ENTITY common.apply.tip "選択中のプロキシを適用する">
+<!ENTITY common.edit.label "編集">
+<!ENTITY common.edit.tip "選択中のプロキシを編集する">
+<!ENTITY common.remove.label "削除">
+<!ENTITY common.remove.tip "選択中のプロキシを削除する">
+<!ENTITY common.add.label "追加">
+<!ENTITY common.add.tip "新しいプロキシを追加する">
+
+<!ENTITY common.next "次へ">
+<!ENTITY common.save "保存">
+<!ENTITY common.cancel "Cancel">
+
+<!ENTITY common.none "なし">
+
+<!ENTITY common.options "オプション">
+<!ENTITY common.preferences.label "設定">
+<!ENTITY common.preferences.key "P">
+<!ENTITY common.updates.label "アップデートを確認">
+<!ENTITY common.updates.key "U">
+<!ENTITY common.about.label "について">
+<!ENTITY common.about.key "A">
+<!ENTITY common.manage.label "プロキシ管理">
+<!ENTITY common.manage.key "M">
+
+<!-- TOOLBAR -->
+<!ENTITY toolbar.name.label "Multiproxy Switch ツールバー">
+<!ENTITY toolbar.proxy.label "Proxy: " >
+<!ENTITY toolbar.name.key "S">
+<!ENTITY toolbar.status "状態:">
+<!ENTITY toolbar.using.none "直接接続">
+
+<!-- TOOLBAR ELEMENT -->
+<!ENTITY toolelement.tip "プロキシを選択">
+
+<!-- CONTEXT MENU -->
+<!ENTITY context.label "Multiproxy Switch">
+<!ENTITY context.key "P">
+<!ENTITY context.proxies.label "プロキシ">
+<!ENTITY context.proxies.key "P">
+<!ENTITY context.options.label "オプション...">
+<!ENTITY context.options.key "O">
+
+<!-- DIALOGS -->
+
+ <!-- ADD/EDIT PROXY -->
+ <!ENTITY add.sharing.proxy.label "Use this proxy server for all protocols">
+ <!ENTITY add.title "プロキシ情報">
+ <!ENTITY add.proxyLabel "プロキシ名:">
+ <!ENTITY add.option.manual "手動プロキシ設定">
+ <!ENTITY add.option.auto "自動プロキシ設定URL">
+ <!ENTITY add.port.label "ポート">
+ <!ENTITY add.http.proxy.label "HTTPプロキシ">
+ <!ENTITY add.http.proxy.key "H">
+ <!ENTITY add.ssl.proxy.label "SSLプロキシ">
+ <!ENTITY add.ssl.proxy.key "S">
+ <!ENTITY add.ftp.proxy.label "FTPプロキシ">
+ <!ENTITY add.ftp.proxy.key "F">
+ <!ENTITY add.gopher.proxy.label "Gopherプロキシ">
+ <!ENTITY add.gopher.proxy.key "G">
+ <!ENTITY add.socks.proxy.label "SOCKSプロキシ">
+ <!ENTITY add.socks.proxy.key "C">
+ <!ENTITY add.socks.option.v4 "SOCKS v4">
+ <!ENTITY add.socks.option.v5 "SOCKS v5">
+ <!ENTITY add.none.label "プロキシを使用しないサイト">
+ <!ENTITY add.none.example "例: jgillick.nettripper.com, .net.nz">
+ <!ENTITY add.none.key "N">
+
+ <!-- ADD PROXY - STEP 1 (GET TYPE) -->
+ <!ENTITY add.type.title "プロキシの種類を選択">
+ <!ENTITY add.type.describe "プロキシの種類を選択:">
+ <!ENTITY add.type.standard "Standard">
+ <!ENTITY add.type.standard.description "一般的なプロキシ">
+ <!ENTITY add.type.anonymous "Anonymous">
+ <!ENTITY add.type.anonymous.description "匿名でのブラウズのため複数のプロキシを使う人へ">
+
+ <!-- ABOUT -->
+ <!ENTITY about.title "について">
+ <!ENTITY about.version "バージョン">
+
+ <!-- PREFERENCES -->
+ <!ENTITY prefs.title "Options" >
+ <!ENTITY prefs.general "一般">
+ <!ENTITY prefs.general.notify "アップデートを通知">
+ <!ENTITY prefs.general.context "コンテキストメニューを表示">
+ <!ENTITY prefs.general.toolbar "ツールバーを表示">
+ <!ENTITY prefs.general.statusbar "ステータスバーに表示">
+ <!ENTITY prefs.switch "プロキシを切り替えた際">
+ <!ENTITY prefs.switch.cookies "クッキーをクリアする">
+ <!ENTITY prefs.switch.refresh "現在のページを再読み込みする">
+
+ <!-- UPDATE -->
+ <!ENTITY update.title "Multiproxy Switchのアップデート">
+ <!ENTITY update.message "Multiproxy Switchツールバーの新バージョンが利用可能です。今すぐインストールしますか?">
+ <!ENTITY update.dontshow "このダイアログを二度と表示しない">
+
+ <!-- ADD ANONYMOUS PROXY -->
+ <!ENTITY add.anon.title "Anonymousプロキシを追加" >
+ <!ENTITY add.anon.imort.caption "インポート" >
+ <!ENTITY add.anon.import.describe "「一行に一つのプロキシ」という書式のファイルをインポート" >
+ <!ENTITY add.anon.import.file "ファイル" >
+ <!ENTITY add.anon.import.file.browse "参照" >
+ <!ENTITY add.anon.import.file.load "読み込み" >
+ <!ENTITY add.anon.import.url "URL" >
+ <!ENTITY add.anon.import.url.load "読み込み" >
+ <!ENTITY add.anon.import.url.auto "このURLから一日ごとに自動的にインポート" >
+ <!ENTITY add.anon.import.url.auto.note "手動で追加されたエントリを全て削除します" >
+ <!ENTITY add.anon.single.add "追加" >
+ <!ENTITY add.anon.single.add.example "例: 12.9.1.242:80" >
+ <!ENTITY add.anon.increment.title "" >
+ <!ENTITY add.anon.increment.seconds "秒毎にプロキシを切り替える" >
+ <!ENTITY add.anon.increment.title "Anonymousプロキシを追加" >
+ <!ENTITY add.anon.title "Anonymousプロキシを追加" >
diff --git a/src/chrome/locale/ja-JP/locale.properties b/src/chrome/locale/ja-JP/locale.properties
new file mode 100644
index 0000000..6f0b086
--- /dev/null
+++ b/src/chrome/locale/ja-JP/locale.properties
@@ -0,0 +1,56 @@
+# COMMON
+common.product.name = Multiproxy Switch
+common.proxy.none = なし
+common.buttons.cancel = Cancel
+common.buttons.load = 読み込み
+common.label.proxy = Proxy:
+
+# TOOLBAR
+toolbar.proxy.label = Proxy:
+toolbar.status = 状態:
+toolbar.loading = 読み込み中...
+toolbar.using = プロキシ接続:
+toolbar.using.none = 直接接続
+toolbar.clickApply = 選択中のプロキシを使うには適用をクリックします
+toolbar.notApplied = プロキシは適用されません。前回使用していたプロキシに戻します
+
+# CONFIRMATIONS
+confirm.remove = このプロキシを削除してもよろしいですか?
+
+# UPGRADE
+upgrade.none = 現在利用可能なアップグレードはありません
+upgrade.install = アップグレードが存在します。\n今すぐインストールしますか?
+
+
+# ERRORS
+error.unknown = 不明なエラーが発生しました
+error.proxy.load = 読み込めませんでした
+error.cookie = クッキーをクリアできませんでした
+
+error.remove = プロキシを削除できませんでした
+error.remove.forbidden = このエントリは削除できません。
+
+error.add.empty = 「プロキシ名」欄が空白です
+error.add.invalid = 「プロキシ名」欄に不正な文字が含まれています
+error.add.duplicate = このプロキシ名は既に存在しています
+
+error.edit.select = 編集するプロキシを選択
+error.edit.forbidden = このエントリは編集できません。
+
+error.update = アップグレードが出来ませんでした
+
+error.prefs.display = コンテキストメニューとツールバーの両方を隠す事は出来ません。\n少なくともどちらか片方を選択して下さい
+
+# ANONYMOUS
+add.anon.validate.label = プロキシ名を入力して下さい
+add.anon.validate.rotation = 切り替え間隔を入力して下さい
+add.anon.validate.rotation.type = 切り替え間隔は半角数字で入力して下さい
+add.anon.validate.remove = 削除するアイテムを選択して下さい
+add.anon.validate.empty = この欄にプロキシを入力して下さい
+add.anon.validate.duplicate = このプロキシはリストに既に存在します
+add.anon.validate.domain = これは不正なIPまたはドメイン名です
+add.anon.import.file.validate.empty = このファイルには有効なプロキシが一つも含まれていません
+add.anon.import.url.validate.empty = このURLには有効なプロキシが一つも含まれていません
+add.anon.import.validate.old = 新しいプロキシは発見されませんでした
+
+anon.config.empty = このAnonymous設定にプロキシは一つも追加されていません。
diff --git a/src/chrome/locale/zh-CN/contents.rdf b/src/chrome/locale/zh-CN/contents.rdf
new file mode 100644
index 0000000..be9f94c
--- /dev/null
+++ b/src/chrome/locale/zh-CN/contents.rdf
@@ -0,0 +1,19 @@
+<?xml version="1.0"?>
+<RDF:RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:chrome="http://www.mozilla.org/rdf/chrome#">
+
+ <!-- skins supplied by this package -->
+ <RDF:Seq about="urn:mozilla:locale:root">
+ <RDF:li resource="urn:mozilla:locale:zh-CN"/>
+ </RDF:Seq>
+
+ <!-- locale information -->
+ <RDF:Description about="urn:mozilla:locale:zh-CN">
+ <chrome:packages>
+ <RDF:Seq about="urn:mozilla:locale:zh-CN:packages">
+ <RDF:li resource="urn:mozilla:locale:zh-CN:mproxy"/>
+ </RDF:Seq>
+ </chrome:packages>
+ </RDF:Description>
+
+</RDF:RDF>
diff --git a/src/chrome/locale/zh-CN/locale.dtd b/src/chrome/locale/zh-CN/locale.dtd
new file mode 100644
index 0000000..a32323c
--- /dev/null
+++ b/src/chrome/locale/zh-CN/locale.dtd
@@ -0,0 +1,117 @@
+<!-- COMMON -->
+<!ENTITY common.product.name "Multiproxy Switch" >
+<!ENTITY common.product.homepage "网站" >
+
+<!ENTITY common.apply.label "启用" >
+<!ENTITY common.apply.tip "启用所选的代理服务器" >
+<!ENTITY common.edit.label "编辑" >
+<!ENTITY common.edit.tip "编辑所选的代理服务器" >
+<!ENTITY common.remove.label "删除">
+<!ENTITY common.remove.tip "删除所选的代理服务器" >
+<!ENTITY common.add.label "添加" >
+<!ENTITY common.add.tip "添加代理服务器" >
+
+<!ENTITY common.next "下一步" >
+<!ENTITY common.save "保存" >
+<!ENTITY common.cancel "取消" >
+
+<!ENTITY common.none "无代理" >
+
+<!ENTITY common.options "设置" >
+<!ENTITY common.preferences.label "选项" >
+<!ENTITY common.preferences.key "O" >
+<!ENTITY common.updates.label "检查升级" >
+<!ENTITY common.updates.key "U" >
+<!ENTITY common.about.label "关于" >
+<!ENTITY common.about.key "A" >
+<!ENTITY common.manage.label "管理" >
+<!ENTITY common.manage.key "M" >
+
+<!-- TOOLBAR -->
+<!ENTITY toolbar.proxy.label "代理服务器:" >
+<!ENTITY toolbar.name.label "代理服务器" >
+<!ENTITY toolbar.name.key "S" >
+<!ENTITY toolbar.status "状态" >
+<!ENTITY toolbar.using.none "未使用代理服务器" >
+
+<!-- TOOLBAR ELEMENT -->
+<!ENTITY toolelement.tip "选择代理服务器" >
+
+<!-- CONTEXT MENU -->
+<!ENTITY context.label "Multiproxy Switch" >
+<!ENTITY context.key "M" >
+<!ENTITY context.proxies.label "代理服务器" >
+<!ENTITY context.proxies.key "P" >
+<!ENTITY context.options.label "设置..." >
+<!ENTITY context.options.key "O" >
+
+<!-- DIALOGS -->
+
+<!-- ADD/EDIT PROXY -->
+<!ENTITY add.title "配置代理服务器" >
+<!ENTITY add.proxyLabel "代理服务器标签:" >
+<!ENTITY add.option.manual "手动配置代理" >
+<!ENTITY add.option.auto "自动代理配置 URL" >
+<!ENTITY add.port.label "端口" >
+<!ENTITY add.http.proxy.label "HTTP代理" >
+<!ENTITY add.http.proxy.key "H" >
+<!ENTITY add.ssl.proxy.label "SSL代理" >
+<!ENTITY add.ssl.proxy.key "S" >
+<!ENTITY add.ftp.proxy.label "FTP代理" >
+<!ENTITY add.ftp.proxy.key "F" >
+<!ENTITY add.gopher.proxy.label "Gopher代理" >
+<!ENTITY add.gopher.proxy.key "G" >
+<!ENTITY add.socks.proxy.label "SOCKS代理" >
+<!ENTITY add.socks.proxy.key "C" >
+<!ENTITY add.socks.option.v4 "SOCKS 4" >
+<!ENTITY add.socks.option.v5 "SOCKS 5" >
+<!ENTITY add.none.label "不使用代理" >
+<!ENTITY add.none.example "例如: local.website.com, .myschool.edu" >
+<!ENTITY add.none.key "N" >
+
+<!-- ADD PROXY - STEP 1 (GET TYPE) -->
+<!ENTITY add.type.title "选择代理服务器种类" >
+<!ENTITY add.type.describe "选择代理服务器设置方法:" >
+<!ENTITY add.type.standard "标准" >
+<!ENTITY add.type.standard.description "最常用的。Multiproxy Switch使用标准设置。" >
+<!ENTITY add.type.anonymous "多级代理" >
+<!ENTITY add.type.anonymous.description "利用多级代理增加隐蔽性。" >
+
+<!-- ABOUT -->
+<!ENTITY about.title "关于" >
+<!ENTITY about.version "版本" >
+
+<!-- PREFERENCES -->
+<!ENTITY prefs.title "选项" >
+<!ENTITY prefs.general "一般" >
+<!ENTITY prefs.general.notify "自动检查升级" >
+<!ENTITY prefs.general.context "显示菜单" >
+<!ENTITY prefs.general.toolbar "显示工具栏" >
+<!ENTITY prefs.general.statusbar "显示在状态栏" >
+<!ENTITY prefs.switch "当我切换代理时" >
+<!ENTITY prefs.switch.cookies "删除浏览器Cookie" >
+<!ENTITY prefs.switch.refresh "重新载入网页" >
+
+<!-- UPDATE -->
+<!ENTITY update.title "升级" >
+<!ENTITY update.message "Multiproxy Switch升级了,下载安装吗?" >
+<!ENTITY update.dontshow "不要再提醒我。" >
+
+<!-- ADD ANONYMOUS PROXY -->
+<!ENTITY add.sharing.proxy.label "为所有协议使用相同代理">
+<!ENTITY add.anon.title "添加多级代理" >
+<!ENTITY add.anon.imort.caption "导入" >
+<!ENTITY add.anon.import.describe "从一个每行含一个代理服务器的文件中导入" >
+<!ENTITY add.anon.import.file "文件" >
+<!ENTITY add.anon.import.file.browse "浏览" >
+<!ENTITY add.anon.import.file.load "装载" >
+<!ENTITY add.anon.import.url "网址" >
+<!ENTITY add.anon.import.url.load "装载" >
+<!ENTITY add.anon.import.url.auto "自动从这个网址安装" >
+<!ENTITY add.anon.import.url.auto.note "这将删除手动输入的代理服务器设置" >
+<!ENTITY add.anon.single.add "添加" >
+<!ENTITY add.anon.single.add.example "示例: 127.0.0.1:8081" >
+<!ENTITY add.anon.increment.title "每隔如此秒时间更新一次代理服务器:" >
+<!ENTITY add.anon.increment.seconds "" >
+<!ENTITY add.anon.increment.title "添加多级代理" >
+<!ENTITY add.anon.title "添加多级代理" >
diff --git a/src/chrome/locale/zh-CN/locale.properties b/src/chrome/locale/zh-CN/locale.properties
new file mode 100644
index 0000000..6f0b520
--- /dev/null
+++ b/src/chrome/locale/zh-CN/locale.properties
@@ -0,0 +1,57 @@
+# COMMON
+common.product.name = Multiproxy Switch
+common.proxy.none = 无代理
+common.buttons.cancel = 取消
+common.buttons.load = 装载
+common.label.proxy = 代理:
+
+# TOOLBAR
+toolbar.status = 状态:
+toolbar.loading = 正在装载...
+toolbar.using = 使用
+toolbar.using.none = 未使用代理服务器
+toolbar.proxy.label = 代理服务器:
+toolbar.clickApply = 按启用开始使用代理服务器
+toolbar.notApplied = 未启用所选的代理服务器,还原为以前的设置。
+
+# CONFIRMATIONS
+confirm.remove = 你确认要删除此代理服务器?
+
+# UPGRADE
+upgrade.none = 现在无升级
+upgrade.install = Multiproxy Switch现有升级,下载安装吗?
+
+
+# ERRORS
+error.unknown = 未知错误
+error.proxy.load = 未能装载
+error.cookie = 未能清理cookies
+
+error.remove = 未能删除代理服务器
+error.remove.forbidden = 你不能删除此代理服务器
+
+error.add.empty = 必须设置代理服务器的标签
+error.add.invalid = 标签含有非法字符
+error.add.duplicate = 此标签已经被使用
+
+error.edit.select = 选择编辑代理服务器
+error.edit.forbidden = 不能编辑代理服务器
+
+error.update = 未能升级
+
+error.prefs.display = 不能同时隐藏工具条和菜单,必须显示其一。
+
+# ANONYMOUS
+add.anon.validate.label = 必须输入代理服务器的标签
+add.anon.validate.rotation = 必须输入切换时间
+add.anon.validate.rotation.type = 切换时间必须是个数字(秒数)
+add.anon.validate.remove = 请选择要删除的对象
+add.anon.validate.empty = 请输入代理服务器辅助信息
+add.anon.validate.duplicate = 此代理服务器已经在你的设置中了
+add.anon.validate.domain = 非法IP或域名
+add.anon.import.file.validate.empty = 此文件没有可用的代理服务器
+add.anon.import.url.validate.empty = 此网址没有可用的代理服务器
+add.anon.import.validate.old = 未找到新的代理服务器
+
+anon.config.empty = 未增加新的代理服务器
+
diff --git a/src/chrome/locale/zh-TW/contents.rdf b/src/chrome/locale/zh-TW/contents.rdf
new file mode 100644
index 0000000..31884d3
--- /dev/null
+++ b/src/chrome/locale/zh-TW/contents.rdf
@@ -0,0 +1,19 @@
+<?xml version="1.0"?>
+
+<RDF:RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:chrome="http://www.mozilla.org/rdf/chrome#">
+
+ <!-- list all the packages being supplied by this jar -->
+ <RDF:Seq about="urn:mozilla:locale:root">
+ <RDF:li resource="urn:mozilla:locale:zh-TW"/>
+ </RDF:Seq>
+
+ <!-- locale information -->
+ <RDF:Description about="urn:mozilla:locale:zh-TW">
+ <chrome:packages>
+ <RDF:Seq about="urn:mozilla:locale:zh-TW:packages">
+ <RDF:li resource="urn:mozilla:locale:zh-TW:mproxy"/>
+ </RDF:Seq>
+ </chrome:packages>
+ </RDF:Description>
+</RDF:RDF>
diff --git a/src/chrome/locale/zh-TW/locale.dtd b/src/chrome/locale/zh-TW/locale.dtd
new file mode 100644
index 0000000..a4df52a
--- /dev/null
+++ b/src/chrome/locale/zh-TW/locale.dtd
@@ -0,0 +1,118 @@
+<!-- COMMON -->
+<!ENTITY common.product.name "Multiproxy Switch" >
+<!ENTITY common.product.homepage "網站" >
+
+<!ENTITY common.apply.label "啟用" >
+<!ENTITY common.apply.tip "啟用所選的代理服務器" >
+<!ENTITY common.edit.label "編輯" >
+<!ENTITY common.edit.tip "編輯所選的代理服務器" >
+<!ENTITY common.remove.label "刪除">
+<!ENTITY common.remove.tip "刪除所選的代理服務器" >
+<!ENTITY common.add.label "新增" >
+<!ENTITY common.add.tip "新增代理服務器" >
+
+<!ENTITY common.next "下一步" >
+<!ENTITY common.save "保存" >
+<!ENTITY common.cancel "取消" >
+
+<!ENTITY common.none "無代理" >
+
+<!ENTITY common.options "設置" >
+<!ENTITY common.preferences.label "選項" >
+<!ENTITY common.preferences.key "P" >
+<!ENTITY common.updates.label "檢查升級" >
+<!ENTITY common.updates.key "U" >
+<!ENTITY common.about.label "關於" >
+<!ENTITY common.about.key "A" >
+<!ENTITY common.manage.label "管理" >
+<!ENTITY common.manage.key "M" >
+
+<!-- TOOLBAR -->
+<!ENTITY toolbar.proxy.label "代理服務器:" >
+<!ENTITY toolbar.name.label "Multiproxy Switch" >
+<!ENTITY toolbar.name.key "S" >
+<!ENTITY toolbar.status "狀態" >
+<!ENTITY toolbar.using.none "未使用代理服務器" >
+
+<!-- TOOLBAR ELEMENT -->
+<!ENTITY toolelement.tip "選擇代理服務器" >
+
+<!-- CONTEXT MENU -->
+<!ENTITY context.label "Multiproxy Switch" >
+<!ENTITY context.key "M" >
+<!ENTITY context.proxies.label "代理服務器" >
+<!ENTITY context.proxies.key "P" >
+<!ENTITY context.options.label "設置..." >
+<!ENTITY context.options.key "O" >
+
+<!-- DIALOGS -->
+
+<!-- ADD/EDIT PROXY -->
+<!ENTITY add.sharing.proxy.label "为所有协议使用相同代理">
+<!ENTITY add.title "代理服務器信息" >
+<!ENTITY add.proxyLabel "代理服務器標籤:" >
+<!ENTITY add.option.manual "輸入代理服務器" >
+<!ENTITY add.option.auto "自動設置代理服務器的網址" >
+<!ENTITY add.port.label "端口" >
+<!ENTITY add.http.proxy.label "HTTP代理服務器" >
+<!ENTITY add.http.proxy.key "H" >
+<!ENTITY add.ssl.proxy.label "SSL代理服務器" >
+<!ENTITY add.ssl.proxy.key "S" >
+<!ENTITY add.ftp.proxy.label "FTP代理服務器" >
+<!ENTITY add.ftp.proxy.key "F" >
+<!ENTITY add.gopher.proxy.label "Gopher代理服務器" >
+<!ENTITY add.gopher.proxy.key "G" >
+<!ENTITY add.socks.proxy.label "SOCKS代理服務器" >
+<!ENTITY add.socks.proxy.key "C" >
+<!ENTITY add.socks.option.v4 "SOCKS 4" >
+<!ENTITY add.socks.option.v5 "SOCKS 5" >
+<!ENTITY add.none.label "不用代理服務器" >
+<!ENTITY add.none.example "示例: local.website.com, .myschool.edu" >
+<!ENTITY add.none.key "N" >
+
+<!-- ADD PROXY - STEP 1 (GET TYPE) -->
+<!ENTITY add.type.title "選擇代理服務器種類" >
+<!ENTITY add.type.describe "選擇代理服務器設置方法:" >
+<!ENTITY add.type.standard "標準" >
+<!ENTITY add.type.standard.description "最常用的,使用標準設置。" >
+<!ENTITY add.type.anonymous "多級代理" >
+<!ENTITY add.type.anonymous.description "利用多級代理增加隱蔽性,Multiproxy Switch不需要多級代理。" >
+
+<!-- ABOUT -->
+<!ENTITY about.title "關於" >
+<!ENTITY about.version "版本" >
+
+<!-- PREFERENCES -->
+<!ENTITY prefs.title "选项" >
+<!ENTITY prefs.general "一般" >
+<!ENTITY prefs.general.notify "自動檢查升級" >
+<!ENTITY prefs.general.context "顯示菜單" >
+<!ENTITY prefs.general.toolbar "顯示工具條" >
+<!ENTITY prefs.general.statusbar "顯示在狀態條" >
+<!ENTITY prefs.switch "當我切換代理時" >
+<!ENTITY prefs.switch.cookies "刪除Cookie紀錄" >
+<!ENTITY prefs.switch.refresh "重新下載網頁" >
+
+<!-- UPDATE -->
+<!ENTITY update.title "升級" >
+<!ENTITY update.message "Multiproxy Switch升級了,下載安裝嗎?" >
+<!ENTITY update.dontshow "不要再提醒我。" >
+
+<!-- ADD ANONYMOUS PROXY -->
+<!ENTITY add.anon.title "新增多級代理" >
+<!ENTITY add.anon.imort.caption "導入" >
+<!ENTITY add.anon.import.describe "從一個每行含一個代理服務器的文件中導入" >
+<!ENTITY add.anon.import.file "文件" >
+<!ENTITY add.anon.import.file.browse "瀏覽" >
+<!ENTITY add.anon.import.file.load "裝載" >
+<!ENTITY add.anon.import.url "網址" >
+<!ENTITY add.anon.import.url.load "裝載" >
+<!ENTITY add.anon.import.url.auto "自動從這個網址安裝" >
+<!ENTITY add.anon.import.url.auto.note "這將刪除手動輸入的代理服務器設置" >
+<!ENTITY add.anon.single.add "新增" >
+<!ENTITY add.anon.single.add.example "示例: 127.0.0.1:8081" >
+<!ENTITY add.anon.increment.title "每隔如此秒時間更新一次代理服務器:" >
+<!ENTITY add.anon.increment.seconds "" >
+<!ENTITY add.anon.increment.title "新增多級代理" >
+<!ENTITY add.anon.title "新增多級代理" >
+
diff --git a/src/chrome/locale/zh-TW/locale.properties b/src/chrome/locale/zh-TW/locale.properties
new file mode 100644
index 0000000..3f9f490
--- /dev/null
+++ b/src/chrome/locale/zh-TW/locale.properties
@@ -0,0 +1,57 @@
+# COMMON
+common.product.name = Multiproxy Switch
+common.proxy.none = 無代理
+common.buttons.cancel = 取消
+common.buttons.load = 裝載
+common.label.proxy = 代理:
+
+# TOOLBAR
+toolbar.status = 狀態:
+toolbar.loading = 正在裝載...
+toolbar.using = 使用
+toolbar.using.none = 未使用代理服務器
+toolbar.proxy.label = 代理服務器:
+toolbar.clickApply = 按啟用開始使用代理服務器
+toolbar.notApplied = 未啟用所選的代理服務器,還原為以前的設置。
+
+# CONFIRMATIONS
+confirm.remove = 你確認要刪除此代理服務器?
+
+# UPGRADE
+upgrade.none = 現在無升級
+upgrade.install = Multiproxy Switch現有升級,下載安裝嗎?
+
+
+# ERRORS
+error.unknown = 未知錯誤
+error.proxy.load = 未能裝載
+error.cookie = 未能清理cookie紀錄
+
+error.remove = 未能刪除代理服務器
+error.remove.forbidden = 你不能刪除此代理服務器
+
+error.add.empty = 必須設置代理服務器的標籤
+error.add.invalid = 標籤含有非法字符
+error.add.duplicate = 此標籤已經被使用
+
+error.edit.select = 選擇編輯代理服務器
+error.edit.forbidden = 不能編輯代理服務器
+
+error.update = 未能升級
+
+error.prefs.display = 不能同時隱藏工具條和菜單,必須顯示其一。
+
+# ANONYMOUS
+add.anon.validate.label = 必須輸入代理服務器的標籤
+add.anon.validate.rotation = 必須輸入切換時間
+add.anon.validate.rotation.type = 切換時間必須是個數字(秒數)
+add.anon.validate.remove = 請選擇要刪除的對象
+add.anon.validate.empty = 請輸入代理服務器輔助信息
+add.anon.validate.duplicate = 此代理服務器已經在你的設置中了
+add.anon.validate.domain = 非法IP或域名
+add.anon.import.file.validate.empty = 此文件沒有可用的代理服務器
+add.anon.import.url.validate.empty = 此網址沒有可用的代理服務器
+add.anon.import.validate.old = 未找到新的代理服務器
+
+anon.config.empty = 未增加新的代理服務器
+
diff --git a/src/install.rdf b/src/install.rdf
new file mode 100644
index 0000000..20c3ada
--- /dev/null
+++ b/src/install.rdf
@@ -0,0 +1,83 @@
+<?xml version="1.0"?>
+<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>{BB080420-8088-F650-3D47-13799CCD6159}</em:id>
+ <em:name>Multiproxy Switch</em:name>
+ <em:version>1.33</em:version>
+ <em:description>MPS lets you switch local proxies in Firefox and Thunderbird, and do more.</em:description>
+ <em:creator>McFred</em:creator>
+ <em:contributor>Jeremy Gillick (http://www.mozmonkey.com)</em:contributor>
+ <em:homepageURL>http://multiproxyswitch.blogspot.com</em:homepageURL>
+ <em:optionsURL>chrome://mproxy/content/options/options.xul</em:optionsURL>
+
+ <!-- Firefox -->
+ <em:targetApplication>
+ <Description>
+ <em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
+ <em:minVersion>1.5</em:minVersion>
+ <em:maxVersion>4.0.*</em:maxVersion>
+ </Description>
+ </em:targetApplication>
+ <!-- Thunderbird -->
+ <em:targetApplication>
+ <Description>
+ <em:id>{3550f703-e582-4d05-9a08-453d09bdfdc6}</em:id>
+ <em:minVersion>1.0</em:minVersion>
+ <em:maxVersion>3.*</em:maxVersion>
+ </Description>
+ </em:targetApplication>
+ <!-- Mozilla -->
+ <em:targetApplication>
+ <Description>
+ <em:id>{86c18b42-e466-45a9-ae7a-9b95ba6f5640}</em:id>
+ <em:minVersion>1.5</em:minVersion>
+ <em:maxVersion>1.8</em:maxVersion>
+ </Description>
+ </em:targetApplication>
+ <!-- Flock -->
+ <em:targetApplication>
+ <Description>
+ <em:id>{a463f10c-3994-11da-9945-000d60ca027b}</em:id>
+ <em:minVersion>1.0</em:minVersion>
+ <em:maxVersion>1.2.*</em:maxVersion>
+ </Description>
+ </em:targetApplication>
+
+
+ <em:localized>
+ <Description>
+ <em:locale>zh-CN</em:locale>
+ <em:name>Multiproxy Switch</em:name>
+ <em:creator>McFred</em:creator>
+ <em:contributor>Jeremy Gillick (http://www.mozmonkey.com)</em:contributor>
+ <em:homepageURL>http://multiproxyswitch.blogspot.com</em:homepageURL>
+ <em:description>MPS让你切换代理服务器更方便!</em:description>
+ </Description>
+ </em:localized>
+
+ <em:localized>
+ <Description>
+ <em:locale>zh-TW</em:locale>
+ <em:name>Multiproxy Switch</em:name>
+ <em:creator>McFred</em:creator>
+ <em:contributor>Jeremy Gillick (http://www.mozmonkey.com)</em:contributor>
+ <em:homepageURL>http://multiproxyswitch.blogspot.com</em:homepageURL>
+ <em:description>MPS让你切换代理服务器更方便!</em:description>
+ </Description>
+ </em:localized>
+
+ <em:localized>
+ <Description>
+ <em:locale>es-ES</em:locale>
+ <em:name>Multiproxy Switch</em:name>
+ <em:creator>McFred</em:creator>
+ <em:contributor>Jeremy Gillick (http://www.mozmonkey.com)</em:contributor>
+ <em:homepageURL>http://multiproxyswitch.blogspot.com</em:homepageURL>
+ <em:description>MPS permite intercambiar proxies locales en Firefox y Thunderbird, y mucho más.</em:description>
+ </Description>
+ </em:localized>
+
+ </Description>
+</RDF>