javascript分类

2019

0%
e = item.time; leancloudSelector(url).innerText = time; } for (var i = 0; i < entries.length; i++) { var url = entries[i]; var element = leancloudSelector(url); if (element.innerText == '') { element.innerText = 0; } } }) .catch(error => { console.log('LeanCloud Counter Error', error); }); } } fetch('https://app-router.leancloud.cn/2/route?appId=geMC457twzQiJdA9WCkkhOxl-MdYXbMMI') .then(response => response.json()) .then(({ api_server }) => { var Counter = (method, url, data) => { return fetch(`https://${api_server}/1.1${url}`, { method: method, headers: { 'X-LC-Id': 'geMC457twzQiJdA9WCkkhOxl-MdYXbMMI', 'X-LC-Key': '7cpYOTGTangyCK6lYikyD6po', 'Content-Type': 'application/json', }, body: JSON.stringify(data) }); }; if (CONFIG.page.isPost) { const localhost = /http:\/\/(localhost|127.0.0.1|0.0.0.0)/; if (localhost.test(document.URL)) return; addCount(Counter); } else if (document.querySelectorAll('.post-title-link').length >= 1) { showTime(Counter); } });