init commit
This commit is contained in:
19
background.js
Normal file
19
background.js
Normal file
@@ -0,0 +1,19 @@
|
||||
// Background service worker for the Page Editor extension
|
||||
|
||||
// Listen for extension icon click
|
||||
chrome.action.onClicked.addListener((tab) => {
|
||||
// Open popup or perform action
|
||||
chrome.scripting.executeScript({
|
||||
target: { tabId: tab.id },
|
||||
function: () => {
|
||||
console.log('Page Editor is active');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// Clean up old storage entries
|
||||
chrome.storage.local.get(null, (items) => {
|
||||
// Log storage usage
|
||||
const storageSize = JSON.stringify(items).length;
|
||||
console.log(`Page Editor storage usage: ${(storageSize / 1024).toFixed(2)} KB`);
|
||||
});
|
||||
Reference in New Issue
Block a user