1// Don't wait for DOM ready. 2let now = new Date(); 3 4fetch(emeclock.translate_ajax_url, { 5 method: 'POST', 6 headers: { 7 'Content-Type': 'application/x-www-form-urlencoded', 8 }, 9 body: new URLSearchParams({ 10 action: 'eme_client_clock', 11 client_unixtime: Math.round(now.getTime() / 1000), // make seconds 12 client_seconds: now.getSeconds(), 13 client_minutes: now.getMinutes(), 14 client_hours: now.getHours(), 15 client_wday: now.getDay(), 16 client_mday: now.getDate(), 17 client_month: now.getMonth() + 1, // make 1-12 18 client_fullyear: now.getFullYear() 19 }) 20}) 21.then(response => response.text()) 22.then(ret => { 23 if (ret == '1') { 24 // we refresh if the cookie is actually there 25 // people can refuse the cookie ... 26 if (document.cookie.indexOf('eme_client_time') != -1) { 27 top.location.href = self.location.href; 28 } 29 } 30}) 31.catch(error => { 32 console.error('Clock sync failed'); 33});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.