From 006d6bb027b9ff145c4f8f5528c7b05127e5742c Mon Sep 17 00:00:00 2001 From: lingling <1077478963@qq.com> Date: Sat, 24 Aug 2024 09:24:11 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=8D=E5=91=BD=E5=90=8D=E6=89=93=E5=8C=85?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E6=A0=B9=E6=8D=AE=E6=97=B6=E9=97=B4=E7=94=9F?= =?UTF-8?q?=E6=88=90=20=E5=88=A0=E9=99=A4=E4=B8=8D=E9=9C=80=E8=A6=81?= =?UTF-8?q?=E7=9A=84=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 2 +- .vscode/tasks.json | 2 +- README.txt | 2 ++ js/popup.js | 28 ++++++++++++---------------- lib/content.js | 25 +++++-------------------- popup.html | 10 +++++++++- 6 files changed, 30 insertions(+), 39 deletions(-) diff --git a/.gitignore b/.gitignore index 9bf0dbd..489a45f 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -/dist/dist.zip \ No newline at end of file +/dist/* \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json index f638076..4d67e79 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -6,7 +6,7 @@ { "label": "build", "type": "shell", - "command": "del ./dist/*;7z a -tzip ./dist/dist.zip ./* '-xr!dist/' '-xr!.vscode/' '-xr!.git/'" + "command": "$currentDate = Get-Date -Format 'yyyyMMdd_HHmm';del ./dist/*;7z a -tzip ./dist/dist_$currentDate.zip ./* '-xr!dist/' '-xr!.vscode/' '-xr!.git/';cmd /c 'git log --oneline > ./README.txt'" } ] } diff --git a/README.txt b/README.txt index 0211505..13e0791 100644 --- a/README.txt +++ b/README.txt @@ -1,3 +1,5 @@ +7d99c8f 增加谷歌购物浏览页面 +295ae02 增加打包日志 9598f66 提交快速打包脚本 bc05112 添加谷歌财经代码但是并没有测试 e5e3741 完成谷歌邮箱自动回复邮件功能 diff --git a/js/popup.js b/js/popup.js index d280ef8..2588641 100644 --- a/js/popup.js +++ b/js/popup.js @@ -2,7 +2,7 @@ * @Author: lingling 1077478963@qq.com * @Date: 2024-08-19 09:47:04 * @LastEditors: lingling 1077478963@qq.com - * @LastEditTime: 2024-08-22 16:22:15 + * @LastEditTime: 2024-08-23 08:17:05 * @FilePath: \谷歌自动搜索邮箱自动点击v3\js\popup.js * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE */ @@ -61,14 +61,10 @@ $(function () { return true; }); - async function text() { - let a = await createTab("https://www.youtube.com/", "youtube"); - return a; - } - // async function text2() { - // let a= await createTab('https://www.so.com/','360') - // return a - // } + // async function text() { + // let a = await createTab("https://www.youtube.com/", "youtube"); + // return a; + // } async function youtube_shorts() { let a = await createTab( "https://www.youtube.com/shorts/", @@ -102,13 +98,13 @@ $(function () { } //函数队列 let queue = []; - queue.push(shopping); - queue.push(calendar); - queue.push(mail); - // queue.push(play_finance);//好像js注入不进去 - queue.push(play_google); - queue.push(news_google); - queue.push(youtube_shorts); + queue.push(play_finance);//好像js注入不进去 + // queue.push(shopping); + // queue.push(calendar); + // queue.push(mail); + // queue.push(play_google); + // queue.push(news_google); + // queue.push(youtube_shorts); //当前执行的队列索引 let closed_index = 0; diff --git a/lib/content.js b/lib/content.js index 9d8dd82..ed3b72c 100644 --- a/lib/content.js +++ b/lib/content.js @@ -20,22 +20,11 @@ function RandomIntscrollBy(y = 0) { //naver使用函数 const naver = async (r, id) => { - await delay(1); + // await delay(1); send_close(id); }; -//naver使用函数 -const sll360 = async (r, id) => { - console.log("??360"); - await delay(3); - send_close(id); -}; -const baidu = async (r, id) => { - console.log("??baidu"); - await delay(30); - send_close(id); -}; //youto短视频 async function youtube_shorts(r, id) { i = 0; @@ -238,10 +227,12 @@ async function play_google(r, id) { } async function play_finance(r, id) { + await delay(5); let recommended_attention = $(".sbnBtf >li >a"); + for ( let index = 0; - index < getRandomInt(0, recommended_attention.length - 1); + index < getRandomInt(0, recommended_attention.length); index++ ) { recommended_attention[index].click(); @@ -253,7 +244,7 @@ async function play_finance(r, id) { //返回主页 $(".gb_Bc >a").click(); } - send_close(id); + // send_close(id); } async function mail(r, id) { @@ -441,12 +432,6 @@ chrome.runtime.sendMessage( case "naver": naver(r, id); break; - case "360": - sll360(r, id); - break; - case "baidu": - baidu(r, id); - break; case "youtube": youtube(r, id); break; diff --git a/popup.html b/popup.html index c1b2d11..e147600 100644 --- a/popup.html +++ b/popup.html @@ -1,3 +1,11 @@ + @@ -14,4 +22,4 @@ - \ No newline at end of file +