You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
707 B
24 lines
707 B
console.log('抖音扩展背景脚本已加载');
|
|
|
|
chrome.runtime.onInstalled.addListener(() => {
|
|
console.log("抖音扩展已安装");
|
|
});
|
|
|
|
chrome.runtime.onMessage.addListener((request, sender, sendResponse) => {
|
|
if (request.action === 'openIncognitoDouyin') {
|
|
chrome.windows.create({
|
|
incognito: true,
|
|
url: "https://www.douyin.com"
|
|
}, function(window) {
|
|
console.log('抖音隐身窗口已打开');
|
|
// 这里可以添加自动登录的逻辑
|
|
});
|
|
} else if (request.action === 'openLiveIncognito') {
|
|
chrome.windows.create({
|
|
incognito: true,
|
|
url: request.url
|
|
}, function(window) {
|
|
console.log('直播隐身窗口已打开');
|
|
});
|
|
}
|
|
});
|