PK H:chrome/PK H:F1o~~chrome/externalapp.jarPK g9content/PK g9content/externalapp/PK 81; content/externalapp/contents.rdf chrome://externalapp/content/externalappCTOverlay.xul chrome://externalapp/content/externalappOverlay.xul PK G:H)H)"content/externalapp/externalapp.jsfunction ExternalApplicationButtons() { this._init(); } ExternalApplicationButtons.prototype={ _wm: null, _current:null, set currentElement(aElement) { if(this._current){ if(this._current.database) this._current.database.RemoveDataSource(this._ds); this._current.ref=""; if(this._current != aElement && this._current.builder) this._current.builder.rebuild(); } if(aElement){ aElement.database.AddDataSource(this._ds); aElement.ref=this._ref; aElement.builder.rebuild(); } this._current=aElement; }, get _uri(){ const directoryService=Components.classes['@mozilla.org/file/directory_service;1'] .getService(Components.interfaces.nsIProperties); var file = directoryService.get('ProfD', Components.interfaces.nsILocalFile); file.append("externalapp.rdf"); if(!file.exists()) file.create(file.NORMAL_FILE_TYPE,0666); return this.getURLFromFile(file); }, getURLFromFile:function(aFile){ const ioService=Components.classes['@mozilla.org/network/io-service;1'] .getService(Components.interfaces.nsIIOService); return ioService.newFileURI(aFile).spec; }, get _ref() { return "urn:externalapp:buttons"; }, settings : function() { window.open("chrome://externalapp/content/settings.xul","_blank","chrome,modal"); }, properties : function(name) { window.open("chrome://externalapp/content/properties.xul",name,"chrome,modal"); }, get _ns(){ return "http://forums.mozillazine.org/rdf/externalapp#"; }, _arc:function(aName){ return this._rdfService.GetResource(this._ns + aName); }, _getArguments :function(aStr){ var arguments=[]; var addressbar =this.address; var selectedtext=this.selected; var clipboard =this.clipboard; var argumentstext=aStr.split(/\s/); while(argumentstext.length > 0){ var text= argumentstext.shift(); text=text.replace(/\\\\/g , "%backslash%"); text=text.replace(/\\s/g , " "); text=text.replace(/\\a/g , "\a"); text=text.replace(/\\e/g , "\e"); text=text.replace(/\\f/g , "\f"); text=text.replace(/\\n/g , "\n"); text=text.replace(/\\r/g , "\r"); text=text.replace(/\\t/g , "\t"); text=text.replace(/\\v/g , "\v"); text=text.replace(/\\/g , ""); text=text.replace(/%backslash%/g , "\\"); text=text.replace(/%addressbar%/g , addressbar); text=text.replace(/%selectedtext%/g , selectedtext); text=text.replace(/%clipboard%/g , clipboard); if(text !="") arguments.push(text); } return arguments; }, _launch :function(path,aArg){ try{ if(!path) return false; var file = Components.classes['@mozilla.org/file/local;1'] .createInstance(Components.interfaces.nsILocalFile); var process = Components.classes['@mozilla.org/process/util;1'] .createInstance(Components.interfaces.nsIProcess); file.initWithPath(path); if(! file.exists()) return false; if(! file.isExecutable() || path.match(/\.lnk$/i)){ file.launch(); return true; } process.init(file); var arguments=this._getArguments(aArg); process.run(false, arguments, arguments.length); return true; }catch(e){ alert(e);return false;} return false; // avoid JavaScript Error. }, get clipboard(){ try{ var pastetext=""; var clip = Components.classes["@mozilla.org/widget/clipboard;1"] .createInstance(Components.interfaces.nsIClipboard); if (!clip) return ""; var trans = Components.classes["@mozilla.org/widget/transferable;1"] .createInstance(Components.interfaces.nsITransferable); if (!trans) return ""; trans.addDataFlavor("text/unicode"); clip.getData(trans,clip.kGlobalClipboard); var str=new Object(); var strLength=new Object(); trans.getTransferData("text/unicode",str,strLength); if (str) str=str.value.QueryInterface(Components.interfaces.nsISupportsString); if (str) pastetext=str.data.substring(0,strLength.value / 2); return pastetext; }catch(e){} return ""; }, get selected(){ try{ var selectedtext=""; var focusedWindow = document.commandDispatcher.focusedWindow; if (!focusedWindow || focusedWindow == window) focusedWindow=window._content; selectedtext = focusedWindow.getSelection().toString(); return selectedtext; }catch(e){} return ""; }, get address(){ var urlbar=document.getElementById("urlbar"); return ( urlbar ) ? urlbar.value:""; }, launch : function(aPath,aArg){ if(! this._launch(aPath,aArg)) this.settings(); }, invalidateWindows : function(){ try{ this._flush(); var browserWindows=this._wm.getZOrderDOMWindowEnumerator('navigator:browser',true); while(browserWindows.hasMoreElements()) { var browserWindow=browserWindows.getNext(); if("ExternalAppRebuild" in browserWindow.top) browserWindow.top.setTimeout(ExternalAppRebuild,0); } }catch(e){ return;} }, ///////////RDF////////// _rdfService : null, _ds : null, _container : null, _init: function(){ //// INIT this.Datasource//////// this._rdfService = Components.classes["@mozilla.org/rdf/rdf-service;1"] .getService(Components.interfaces.nsIRDFService); this._wm = Components.classes['@mozilla.org/appshell/window-mediator;1'] .getService(Components.interfaces.nsIWindowMediator); this._ds=this._rdfService.GetDataSourceBlocking( this._uri ); //// INIT this.Container /////// this._container = Components.classes["@mozilla.org/rdf/container;1"] .getService(Components.interfaces.nsIRDFContainer); var RDFCUtils = Components.classes['@mozilla.org/rdf/container-utils;1'] .getService(Components.interfaces.nsIRDFContainerUtils); var ContainerResource=this._rdfService.GetResource("urn:externalapp:buttons"); if( RDFCUtils.IsContainer(this._ds,ContainerResource ) ) this._container.Init(this._ds, ContainerResource); else this._container=RDFCUtils.MakeSeq(this._ds,ContainerResource); }, clearData: function(){ var resources=this._container.GetElements(); var resource=null; while(resources.hasMoreElements()){ resource=resources.getNext(); resource=resource.QueryInterface(Components.interfaces.nsIRDFNode); this._container.RemoveElement(resource,false); this._unassert(this._ds,resource); } this.invalidateWindows(); }, appendData : function (){ var fp = Components.classes["@mozilla.org/filepicker;1"] .createInstance(Components.interfaces.nsIFilePicker); fp.init(window, 'Externe Anwendung', Components.interfaces.nsIFilePicker.modeOpen); fp.appendFilters(Components.interfaces.nsIFilePicker.filterApps); fp.appendFilters(Components.interfaces.nsIFilePicker.filterAll); var ret = fp.show(); if (ret != Components.interfaces.nsIFilePicker.returnOK) return; var file = fp.file.QueryInterface(Components.interfaces.nsILocalFile); this.appendDataFromFile(file) }, _apendData: function(aResource,label,path,tooltiptext,image,key,arguments){ this._ds.Assert(aResource, this._arc("label"), this._rdfService.GetLiteral(label), true); this._ds.Assert(aResource, this._arc("path"), this._rdfService.GetLiteral(path), true); this._ds.Assert(aResource, this._arc("tooltiptext"), this._rdfService.GetLiteral(tooltiptext), true); this._ds.Assert(aResource, this._arc("image"), this._rdfService.GetLiteral(image), true); this._ds.Assert(aResource, this._arc("key"), this._rdfService.GetLiteral(key), true); this._ds.Assert(aResource, this._arc("arguments"), this._rdfService.GetLiteral(arguments), true); }, _flush:function(){ this._ds.QueryInterface(Components.interfaces.nsIRDFRemoteDataSource) .Flush(); }, getProperty: function(aResource,aProp) { var node=this._ds.GetTarget(aResource,this._arc(aProp),true); if(node) return node.QueryInterface(Components.interfaces.nsIRDFLiteral).Value; else return ""; }, updateData: function(aURI,label,path,tooltiptext,image,key,arguments){ var resource=this._rdfService.GetResource(aURI); this._unassert(this._ds,resource); this._apendData(resource,label,path,tooltiptext,image,key,arguments); }, appendDataFromFile : function(aFile){ var size = nsPreferences.getIntPref('externalapp.default.iconsize',16); var prefix = nsPreferences.copyUnicharPref('externalapp.default.tooltiptext_prefix',"Verkn\u00FCpfung mit "); var path = aFile.path; var image = "moz-icon:"+this.getURLFromFile(aFile)+"?size="+ size.toString(); var label = aFile.leafName; var tooltiptext = prefix+label; if(label.match(/(.+)\.[a-zA-Z0-9]+$/)) label=RegExp.$1; var itemResource=this._rdfService.GetResource("urn:externalapp:"+this.IDmaker()); if (this._container.IndexOf(itemResource)==-1) this._container.AppendElement(itemResource); else this._unassert(this._ds,itemResource); this._apendData(itemResource,label,path,tooltiptext,image,"",""); this.invalidateWindows(); }, removeData : function(resid){ var itemResource=this._rdfService.GetResource(resid); if(this._container.IndexOf(itemResource)<0) return; this._container.RemoveElement(itemResource,true); this._unassert(this._ds,itemResource); this.invalidateWindows(); }, move :function(FromURI,ToURI){ var FromResource=this._rdfService.GetResource(FromURI); var ToResource=this._rdfService.GetResource(ToURI); var FromIndex=this._container.IndexOf(FromResource); var ToIndex=this._container.IndexOf(ToResource); if(FromIndex<0) return; if(ToIndex<0) return; this._container.RemoveElement(FromResource,true); this._container.InsertElementAt(FromResource,ToIndex,true); this.invalidateWindows(); }, //////Utilities//////////////// _unassert: function (dsource,node) { var props=dsource.ArcLabelsOut(node); while(props.hasMoreElements()){ var prop=props.getNext(); var target=dsource.GetTarget(node,prop,true); dsource.Unassert(node,prop,target); } }, IDmaker : function() { var d= new Date(); return d.getTime().toString(); } }; PK wVn1@@,content/externalapp/externalappCTOverlay.xul PK An1cc*content/externalapp/externalappOverlay.xul %browserDTD; %externalappDTD; ]> PKND9Ӽ*9!content/externalapp/properties.jsWmo6 NZQ,K6ٰ֢MWIBQH9qI9$ͧ ZTP iU}겂Z1iv(Y6u3!L0uHF$󯝝5g2DX9iyjFRHϏzpKw'N^_@o^{KєR*JG' {t\?i4N8i깣IP\;7tUGiu2VfTYr*6ٮÒGvd |0]o&=Hp᠅N(:h _=o3dLLDZ^:似8 8&.5+/5sUSQP ݁cVw uZVѼaRYnWX y)*:MlY]caw:q7eއUܛ]W{,)oNa$qHr έhm$pHSe|f\n4lŋ-h⡪p8C~W^,!B&w4V$&IGw-S0_ G:_nb8ȾMcoک[gBo5գ E4:dKf5ؖ5x=PɜrfdB.YɟHL b%r?gEc2XYa0`*~e8fv>2z6 fYAMߪ:"_O[~듕#EWݦ+ĖNu08;J?St둲-*^UjkŰ`ej¬#$\Vv16cq|$J,F>RĬQMyx[վK !ćkP&rPKND9Gl%"content/externalapp/properties.xulXm8' :>дXNBHCNn6f8mwWyqs}Y^tV3<3;mrR\3r>$0Sc-g$*QrAE.xW%6:JB(ʪ Zd*͙ .;go_x RN\_ AL`TGQ9jF2KT_a.4*`W9Uf!Hgb!W,UtXO={RVuZk^0 _K/-8+\p8nRŨb4q|-PU'Yh|_~.7Mѵ:y!o6G_2ebE-͜J_͖T(̜s-LGe]$e͋T /ּ7(L+FR9z~%y}q:-i-D1r^RQ[#ͮbZb&VB$I3B3Dh\fg$ _k%&5{ae|mndXe}p}?Fj:/\3=qm³.S=HB]o~[?} ΎN:mC*5{S)h;gY#,FX!'϶cE'GA2n>2v:8^<\Y)); eWO-顕ܐM8 5of p=e8R+נ}W|b[*;ەXM5Wdc_mpGeg[Ĵw\"K m@p+ZJqOp{xzZZWRykȪycpnĊ `+;a'D>v^Z=Y$2im/s״Dck\#`+dv8cFY=r$EOVYl#Phrg?jf$$c|駏y37$KEccUćqjOJҠ1f8;8&~"ذ:U{/iaYH b&_7_MM˭a{$9B1l1FoYOcA7UOO`{+fp>!A:JYe?1S\}ǏȖ|`6iP|Gc U- M;ֿxNn)etst`9Po= sՖ~IןZ˩]GޟG$4m1l +-C08rA7Z lH~;eG<ZmMc. rM&0p.ru(&ؼ[vx7.v6 h.tKpk٘x"xJ~R?vؖӧCx \(AU3aGd>#PKND9ĭ~>1 content/externalapp/settings.xulUmo6_qlh@>Ė.̀`Z 鰠+F:l(R Oa}G8J']&yw{H.lKnyeMIY,O=45U³%Qh{-7pWA(2 xrgU ޟ^^}8cw40\syE.>be|׈o6wJk[WؕS($ @EC\Xc{~{ܕuu{;ewjHjJ-L24.>@ 8O{n "Umg{7$(k~dqohY0t=I[ߣL V '> c$ Zr&E`i7oms=a7+0?,ByJYPUaa Žlp<1ճ/i^R!H0PFḩ hƅuum,m-a,*A('p<:e5{R13 N u|`9Mņvt$2Ӎq}3(=Rt~ͷp&ISkM[>%ô;o]ҠWtݬ*rxRaۥGH˥IѾiPK .=^ license.txtThe following liscense applies to all files * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this archive are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. PK g9locale/PK g9 locale/fr-FR/PK g9locale/fr-FR/externalapp/PK 1..%locale/fr-FR/externalapp/contents.rdf PK 9M$(locale/fr-FR/externalapp/externalapp.dtd PK .W5skin/PK .W5 skin/classic/PK g9skin/classic/externalapp/PK `0&X22%skin/classic/externalapp/contents.rdf PK Wu:1&skin/classic/externalapp/customize.cssPK @ .꺲$skin/classic/externalapp/default.pngPNG  IHDR(-SPLTEFwbKGDf |dtRNSf\IDATxc`B@SP##Yd3怘 D101P!#PHCRFJ @ƑS;hIENDB`PK x:1N (skin/classic/externalapp/externalapp.css#externalapp-settings-arguments, #externalapp-settings-path, #externalapp-settings-tooltiptext, #externalapp-settings-label { min-width: 18em; } .toolbarbutton-externalapp{ -moz-box-orient: vertical; min-width: 16px; min-height: 16px; } .toolbaritem-externalapp-container{ min-width: 16px; min-height: 16px; } toolbar > .toolbaritem-externalapp-container > .text-externalapp{ display: none; } /* for toolbarex by clav*/ toolbox[vertical="true"] > toolbar > .toolbaritem-externalapp-container{ -moz-box-orient: vertical; } PK L:1)&=='skin/classic/externalapp/properties.cssrow{ padding:2px; margin:2px; } label{ margin-top:4px; } PKND9 locale/de-DE/PKg9locale/de-DE/externalapp/PKND9%&%locale/de-DE/externalapp/contents.rdfPAn0CNg [$C!Dz'@YЧbrZ[pTIJ0lZ$7$T;WBo!B.90SfF mwUeU 0ӄ#7V~|R^=(LoMCst W|Thqu~EJ,枞Vߡ&8e2ӻr=rQP?b+{RĢn։ ˆqN܊#=[N?^,# <;tb⵨g?PK g9content/PK g9&content/externalapp/PK 81; Xcontent/externalapp/contents.rdfPK G:H)H)" content/externalapp/externalapp.jsPK wVn1@@, .content/externalapp/externalappCTOverlay.xulPK An1cc* +1content/externalapp/externalappOverlay.xulPKND9Ӽ*9!Hcontent/externalapp/properties.jsPKND9Gl%"Mcontent/externalapp/properties.xulPKND9ĭ~>1 #Tcontent/externalapp/settings.xulPK .=^ Wlicense.txtPK g9r]locale/PK g9 ]locale/fr-FR/PK g9]locale/fr-FR/externalapp/PK 1..% ]locale/fr-FR/externalapp/contents.rdfPK 9M$( j`locale/fr-FR/externalapp/externalapp.dtdPK .W5`gskin/PK .W5 gskin/classic/PK g9gskin/classic/externalapp/PK `0&X22% gskin/classic/externalapp/contents.rdfPK Wu:1& Zjskin/classic/externalapp/customize.cssPK @ .꺲$ jskin/classic/externalapp/default.pngPK x:1N ( oskin/classic/externalapp/externalapp.cssPK L:1)&==' qskin/classic/externalapp/properties.cssPKND9 0rlocale/de-DE/PKg90rlocale/de-DE/externalapp/PKND9%&%rlocale/de-DE/externalapp/contents.rdfPKbOD9O3M (#tlocale/de-DE/externalapp/externalapp.dtdPKvPK eE9chrome.manifest overlay chrome://browser/content/browser.xul chrome://externalapp/content/externalappOverlay.xul overlay chrome://global/content/customizeToolbar.xul chrome://externalapp/content/externalappCTOverlay.xul content externalapp jar:chrome/externalapp.jar!/content/externalapp/ skin externalapp classic/1.0 jar:chrome/externalapp.jar!/skin/classic/externalapp/ locale externalapp de-DE jar:chrome/externalapp.jar!/locale/de-DE/externalapp/ PK 2;U install.rdfUn@}W\Z$:v&QS6T(lɶ{vMOxOc+.%Rٞs񋙒FM';%v=Th}cl:ReBJƎY$m*|7!|Tw ( 4Zn%)K o,n7: ut܊‡JHu CS~TZ[ÙG]˅jPV.^؏5 fF.t"D˸Fؿ* >{fM*bԏ#$YZy=GohV+l/ t(d\rF$d Å [&ES%ĆlZ 3^豣R֫)LzacREgJeWZ4U