-
+ 79AA3BE3BD91A2F049DB103F11E691A672E98B858A9788630062CF745066B99543547951263C7AD2D7EC92B62E61003E7E490806DB7ECA1A12AFA8B0A42AF7F4mp-wp/wp-admin/js/wp-gears.js(0 . 0)(1 . 96)
51783
51784 wpGears = {
51785
51786 createStore : function() {
51787 if ( 'undefined' == typeof google || ! google.gears ) return;
51788
51789 if ( 'undefined' == typeof localServer )
51790 localServer = google.gears.factory.create("beta.localserver");
51791
51792 store = localServer.createManagedStore(this.storeName());
51793 store.manifestUrl = "gears-manifest.php";
51794 store.checkForUpdate();
51795 this.message(3);
51796 },
51797
51798 getPermission : function() {
51799 var perm = true;
51800
51801 if ( 'undefined' != typeof google && google.gears ) {
51802 if ( ! google.gears.factory.hasPermission )
51803 perm = google.gears.factory.getPermission( 'WordPress', 'images/logo.gif' );
51804
51805 if ( perm )
51806 try { this.createStore(); } catch(e) { this.message(); } // silence if canceled
51807 else
51808 this.message(4);
51809 }
51810 },
51811
51812 storeName : function() {
51813 var name = window.location.protocol + window.location.host;
51814
51815 name = name.replace(/[\/\\:*"?<>|;,]+/g, '_'); // gears beta doesn't allow certain chars in the store name
51816 name = 'wp_' + name.substring(0, 60); // max length of name is 64 chars
51817
51818 return name;
51819 },
51820
51821 message : function(show) {
51822 var t = this, msg1 = t.I('gears-msg1'), msg2 = t.I('gears-msg2'), msg3 = t.I('gears-msg3'), msg4 = t.I('gears-msg4'), num = t.I('gears-upd-number'), wait = t.I('gears-wait');
51823
51824 if ( ! msg1 ) return;
51825
51826 if ( 'undefined' != typeof google && google.gears ) {
51827 if ( show && show == 4 ) {
51828 msg1.style.display = msg2.style.display = msg3.style.display = 'none';
51829 msg4.style.display = 'block';
51830 } else if ( google.gears.factory.hasPermission ) {
51831 msg1.style.display = msg2.style.display = msg4.style.display = 'none';
51832 msg3.style.display = 'block';
51833
51834 if ( 'undefined' == typeof store )
51835 t.createStore();
51836
51837 store.oncomplete = function(){wait.innerHTML = (' ' + wpGearsL10n.updateCompleted);};
51838 store.onerror = function(){wait.innerHTML = (' ' + wpGearsL10n.error + ' ' + store.lastErrorMessage);};
51839 store.onprogress = function(e){if(num) num.innerHTML = (' ' + e.filesComplete + ' / ' + e.filesTotal);};
51840 } else {
51841 msg1.style.display = msg3.style.display = msg4.style.display = 'none';
51842 msg2.style.display = 'block';
51843 }
51844 }
51845 },
51846
51847 I : function(id) {
51848 return document.getElementById(id);
51849 }
51850 };
51851
51852 (function() {
51853 if ( 'undefined' != typeof google && google.gears ) return;
51854
51855 var gf = false;
51856 if ( 'undefined' != typeof GearsFactory ) {
51857 gf = new GearsFactory();
51858 } else {
51859 try {
51860 gf = new ActiveXObject('Gears.Factory');
51861 if ( factory.getBuildInfo().indexOf('ie_mobile') != -1 )
51862 gf.privateSetGlobalObject(this);
51863 } catch (e) {
51864 if ( ( 'undefined' != typeof navigator.mimeTypes ) && navigator.mimeTypes['application/x-googlegears'] ) {
51865 gf = document.createElement("object");
51866 gf.style.display = "none";
51867 gf.width = 0;
51868 gf.height = 0;
51869 gf.type = "application/x-googlegears";
51870 document.documentElement.appendChild(gf);
51871 }
51872 }
51873 }
51874
51875 if ( ! gf ) return;
51876 if ( 'undefined' == typeof google ) google = {};
51877 if ( ! google.gears ) google.gears = { factory : gf };
51878 })();