联系我们 为您量身定制产品规格
专属定制
独家折扣
至臻服务
行业洞察
爬虫专栏
新闻活动
免费代理
深受客户信赖
function updateArticlesMoreDisplay() { /* if ($blogArticles.filter('.active').find('.article-card').length < 16) { $('.articles-more').hide(); }else { $('.articles-more').show(); } */ } $('.articles-more .btn').click(function () { let category = $('.tab-item.active').data('value-en'); location.href = `/blog/category/${category}`; }) $("#module-2 .tab-item").click(function () { let $this = $(this); let itemLeft = $this.position().left; let itemWidth = $this.width(); if (itemLeft > 0) { itemLeft += 36; } $selectTabLine.css({ 'width': itemWidth + 'px', 'left': itemLeft + 'px' }) if (!$this.hasClass('active')) { $this.siblings('.active').removeClass('active'); $this.addClass('active'); let category = $this.data('tab-value'); $blogArticles.filter('.active').removeClass('active'); $blogArticles.filter(`[data-category=${category}]`).addClass('active'); updateArticlesMoreDisplay(); } }) const lastestVersion = '1.0.6', updateDate = '2024-09-29'; //const downloadUrl = `https://download.kuaidaili.com/extension/kdl-extension-${lastestVersion}.crx`; const downloadUrl = `https://kdl-extension.oss-cn-beijing.aliyuncs.com/kdl-extension-${lastestVersion}.crx`; function downloadByBrowser() { window.open(downloadUrl); uploadDownloadCount(); } function downloadByBlob(url, fileName) { function saveBlob(data, name) { const blob = new Blob([data]); const saveLink = document.createElement('a'); saveLink.href = window.URL.createObjectURL(blob); saveLink.download = name; saveLink.click(); uploadDownloadCount(); } const xhr = new XMLHttpRequest(); xhr.open('GET', url, true); xhr.responseType = 'blob'; xhr.onload = () => { if (xhr.status === 200) saveBlob(xhr.response, `kdl-extension-${lastestVersion}.crx`); else layser.msg('下载失败'); }; xhr.send(); } function uploadDownloadCount() { $.ajax({ url: '/ext/upload_unauth', type: "POST", data: JSON.stringify({ down_count: 1 }), dataType: "json", async: true, contentType: 'application/json', success: function (res) { console.log('upload_down_count res-code:', res.code); } }); }