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

Andy Edmonds andy at uzilla.net
Mon Dec 1 16:05:55 EST 2003


Hi Folks,

Can anyone confirm that getChromeDir is working correctly in Mozilla 1.5?

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




More information about the Jslib mailing list