[Jslib] Confirm du.getChromeDir() on OS X, Mozilla 1.5

Pete Collins pete at mozdev.org
Mon Dec 1 16:42:58 EST 2003


Andy Edmonds wrote:
> Hi Folks,
> 
> Can anyone confirm that getChromeDir is working correctly in Mozilla 1.5?

Works correctly on Linux.  It wil return a native file path string.

--pete


> I'm working with a user of my card sorting application 
> (http://uzilla.mozdev.org/cardsort.html) that's having problems and 
> don't have an OS X box nearby.
> 
> Relatedly, I'm using this block of code to deal with file separators 
> across platforms. Is there a better way?
> 
> var platform = new String(navigator.platform);
> 
> if(platform.search(/^Win/)) {
>     if(platform.search(/^Mac/)) {
>     var fileSeparator = "/";
>     } else {
>         var fileSeparator = ":";
>     }
> } else {
>     var fileSeparator = "\\";
> }
> 
> 
> Thx, AE
> 
> 
> -=-=-
> ... Uzilla, LLC: "Tools for a Usable Web", http://uzilla.net
> Human Factors MS: http://people.clemson.edu/~kedmond
> 
> 
> _______________________________________________
> Jslib mailing list
> Jslib at mozdev.org
> http://mozdev.org/mailman/listinfo/jslib
> 


-- 
Pete Collins
www.mozdev.org
www.mozdevgroup.com



More information about the Jslib mailing list