del: 删除无用代码

This commit is contained in:
song_xiao_lin
2024-05-14 16:19:04 +08:00
parent 01f04e3e56
commit 65faff9e57
2 changed files with 0 additions and 13 deletions
-1
View File
@@ -8,7 +8,6 @@
if (event.source !== window || event.data.type !== 'CALL_FUNCTION') {
return;
}
const value = event.data.value;
const result = window[value.fn_name](value.args);
window.postMessage({ type: 'FROM_PAGE', result: result }, '*');
-12
View File
@@ -122,18 +122,6 @@ function log(message) {
return console.log(message);
}
export const getTabId = () => {
return new Promise((resolve, reject) => {
chrome.tabs.query({active: true, lastFocusedWindow: true}, (tabs) => {
if (tabs.length) {
resolve(tabs[0].id);
} else {
reject('No active tab found');
}
});
});
}
// chrome.tabs.query({}, (tabs) => {
// tabs.forEach(function (tab) {
// console.log(tab.id); // 输出每个标签页的ID