Initial version

This commit is contained in:
Joey Yakimowich-Payne 2025-08-09 12:15:58 -06:00
commit eaaad96bb3
14 changed files with 9889 additions and 0 deletions

23
background.js Normal file
View file

@ -0,0 +1,23 @@
// Background service worker for Full Screenshot Selector Chrome Extension
// Handle keyboard shortcut
chrome.commands.onCommand.addListener(async (command) => {
if (command === 'activate-selector') {
const [tab] = await chrome.tabs.query({ active: true, currentWindow: true });
if (tab && tab.url && !tab.url.startsWith('chrome://') && !tab.url.startsWith('chrome-extension://')) {
try {
await chrome.tabs.sendMessage(tab.id, { action: 'activateFromShortcut' });
} catch (error) {
console.log('Could not activate selector on this page:', error);
}
}
}
});
// Handle extension installation
chrome.runtime.onInstalled.addListener((details) => {
if (details.reason === 'install') {
console.log('Full Screenshot Selector installed');
}
});