/* * @Author: lingling 1077478963@qq.com * @Date: 2024-08-19 09:47:04 * @LastEditors: lingling 1077478963@qq.com * @LastEditTime: 2024-08-19 16:48:39 * @FilePath: \谷歌自动搜索邮箱自动点击v3\js\popup.js * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE */ $(function () { // var id = 0, due = ['Dell', ' Lenovo ', "ASUS"], kme = 0 , name=""; var id = 0 var name = ""; setTimeout(function () { chrome.tabs.create( { url: "https://www.baidu.com/", }, (e) => { name = "naver"; id = e.id; } ); }, 2000); // 浏览器监听事件 每当有新页面生成就会执行 chrome.runtime.onMessage.addListener(function ( request, sender, sendResponse ) { // 判断是产生一个新页面是 if (request.ty == "get") { sendResponse(name,id); } return true; }); });