User:Lunboks/gears-test.js

// gears_init.js (function {	// We are already defined. Hooray!	if (window.google && google.gears) {		return;	}	// *Do not* define any objects if Gears is not installed. This mimics the	// behavior of Gears defining the objects in the future.	if (typeof GearsFactory == 'undefined') {		return;	}	var factory = new GearsFactory;	// Now set up the objects, being careful not to overwrite anything.	//	// Note: In Internet Explorer for Windows Mobile, you can't add properties to	// the window object. However, global objects are automatically added as	// properties of the window object in all browsers.	if (!window.google) {		google = {};	}	if (!google.gears) {		google.gears = {factory: factory};	}

alert(google.gears); });