From bc05112d7ae8aabebc7c6c65c31e21e7d2ff9031 Mon Sep 17 00:00:00 2001 From: lingling <1077478963@qq.com> Date: Thu, 22 Aug 2024 15:52:05 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=B0=B7=E6=AD=8C=E8=B4=A2?= =?UTF-8?q?=E7=BB=8F=E4=BB=A3=E7=A0=81=E4=BD=86=E6=98=AF=E5=B9=B6=E6=B2=A1?= =?UTF-8?q?=E6=9C=89=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- js/popup.js | 12 ++++++------ lib/content.js | 37 +++++++++++-------------------------- 2 files changed, 17 insertions(+), 32 deletions(-) diff --git a/js/popup.js b/js/popup.js index beebc90..c40bb5b 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 14:07:01 + * @LastEditTime: 2024-08-22 14:29:04 * @FilePath: \谷歌自动搜索邮箱自动点击v3\js\popup.js * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE */ @@ -69,7 +69,7 @@ $(function () { // let a= await createTab('https://www.so.com/','360') // return a // } - async function text2() { + async function youtube_shorts() { let a = await createTab( "https://www.youtube.com/shorts/", "youtube_shorts" @@ -98,12 +98,12 @@ $(function () { } //函数队列 let queue = []; - // queue.push(calendar); + queue.push(calendar); queue.push(mail); // queue.push(play_finance);//好像js注入不进去 - // queue.push(play_google); - // queue.push(news_google); - // queue.push(text2); + 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 00db999..905ac3d 100644 --- a/lib/content.js +++ b/lib/content.js @@ -20,44 +20,18 @@ function RandomIntscrollBy(y = 0) { //naver使用函数 const naver = async (r, id) => { - // $("#kw").val("docker"); - // await delay(1); - // $("#su").click(); - // await delay(3); - // for (let index = 0; index < 4; index++) { - // RandomIntscrollBy() - // await delay(3); - // } await delay(1); send_close(id); }; //naver使用函数 const sll360 = async (r, id) => { - // $("#kw").val("docker"); - // await delay(1); - // $("#su").click(); - // await delay(3); - // for (let index = 0; index < 4; index++) { - // RandomIntscrollBy() - // await delay(3); - // } - console.log("??360"); await delay(3); send_close(id); }; const baidu = async (r, id) => { - // $("#kw").val("docker"); - // await delay(1); - // $("#su").click(); - // await delay(3); - // for (let index = 0; index < 4; index++) { - // RandomIntscrollBy() - // await delay(3); - // } - console.log("??baidu"); await delay(30); send_close(id); @@ -255,6 +229,17 @@ async function play_google(r, id) { } async function play_finance(r, id) { + let recommended_attention=$('.sbnBtf >li >a') + for (let index = 0; index < getRandomInt(0,recommended_attention.length-1); index++) { + recommended_attention[index].click(); + await delay(getRandomInt(5, 10)) + for (let indexx = 0; indexx < getRandomInt(0,5); indexx++) { + RandomIntscrollBy() + await delay(getRandomInt(5, 10)) + } + //返回主页 + $('.gb_Bc >a').click() + } send_close(id); }