using Services.vc.compare instead of compare by string. to standard.

This commit is contained in:
oonuma ryouyu 2016-06-22 02:15:18 -07:00
parent 998850b21e
commit 10398b5130

View File

@ -47,14 +47,16 @@ AboutGroup.prototype = {
newChannel : function(aURI) newChannel : function(aURI)
{ {
const versionString = Services.appinfo.platformVersion; const version = Services.appinfo.platformVersion;
//version(type:number) //1なら48より高い。
const version=(versionString.split(".")[0])-0; const comp = Services.vc.compare('48.*',version);
dump(comp)
if( version < 48 ){ if( comp > 0 ){
dump("using 48 以下")
return Services.io.newChannel('chrome://treestyletab/content/group.xul', null, null); return Services.io.newChannel('chrome://treestyletab/content/group.xul', null, null);
}else{ }else{
dump("using 49 以上")
return Services.io.newChannel2( return Services.io.newChannel2(
'chrome://treestyletab/content/group.xul', 'chrome://treestyletab/content/group.xul',
null, null,