3 * Copyright(c) 2006-2010 Ext JS, Inc.
5 * http://www.extjs.com/license
7 // Copyright 2007 Google Inc. All Rights Reserved.
9 // Sets up google.gears.*, which is *the only* supported way to access Gears.
11 // Circumvent this file at your own risk!
13 // In the future, Gears may automatically define google.gears.* without this
14 // file. Gears may use these objects to transparently fix bugs and compatibility
15 // issues. Applications that use the code below will continue to work seamlessly
19 // We are already defined. Hooray!
20 if (window.google && google.gears) {
27 if (typeof GearsFactory != 'undefined') {
28 factory = new GearsFactory();
32 factory = new ActiveXObject('Gears.Factory');
35 if (navigator.mimeTypes["application/x-googlegears"]) {
36 factory = document.createElement("object");
37 factory.style.display = "none";
40 factory.type = "application/x-googlegears";
41 document.documentElement.appendChild(factory);
46 // *Do not* define any objects if Gears is not installed. This mimics the
47 // behavior of Gears defining the objects in the future.
52 // Now set up the objects, being careful not to overwrite anything.
58 google.gears = {factory: factory};
62 if (!window.google || !google.gears) {
63 location.href = "http://gears.google.com/?action=install&message=Google%20Gears%20is%20required%20for%20this%20application" +
64 "&return="+window.location.href;