1
|
/*
|
2
|
Copyright (c) 2004-2008, The Dojo Foundation All Rights Reserved.
|
3
|
Available via Academic Free License >= 2.1 OR the modified BSD license.
|
4
|
see: http://dojotoolkit.org/license for details
|
5
|
*/
|
6
|
|
7
|
|
8
|
if(!dojo._hasResource["dojo.gears"]){
|
9
|
dojo._hasResource["dojo.gears"]=true;
|
10
|
dojo.provide("dojo.gears");
|
11
|
dojo.gears._gearsObject=function(){
|
12
|
var _1;
|
13
|
var _2;
|
14
|
var _3=dojo.getObject("google.gears");
|
15
|
if(_3){
|
16
|
return _3;
|
17
|
}
|
18
|
if(typeof GearsFactory!="undefined"){
|
19
|
_1=new GearsFactory();
|
20
|
}else{
|
21
|
if(dojo.isIE){
|
22
|
try{
|
23
|
_1=new ActiveXObject("Gears.Factory");
|
24
|
}
|
25
|
catch(e){
|
26
|
}
|
27
|
}else{
|
28
|
if(navigator.mimeTypes["application/x-googlegears"]){
|
29
|
_1=document.createElement("object");
|
30
|
_1.setAttribute("type","application/x-googlegears");
|
31
|
_1.setAttribute("width",0);
|
32
|
_1.setAttribute("height",0);
|
33
|
_1.style.display="none";
|
34
|
document.documentElement.appendChild(_1);
|
35
|
}
|
36
|
}
|
37
|
}
|
38
|
if(!_1){
|
39
|
return null;
|
40
|
}
|
41
|
dojo.setObject("google.gears.factory",_1);
|
42
|
return dojo.getObject("google.gears");
|
43
|
};
|
44
|
dojo.gears.available=(!!dojo.gears._gearsObject())||0;
|
45
|
}
|