Commit 115659f8 authored by Stefy Spora's avatar Stefy Spora

Update context menu to appear when right-clicking over images

- Change context menu contexts from 'page' to 'image' for privacy options
- Context menu items now appear when right-clicking directly over images
- Maintain URL validation to ensure actions work on appropriate FetLife pages
- Update README.md to reflect the new image-based context menu behavior
- Improve user experience by making context menu appear on specific images
- Keep existing functionality for page-wide context menu items
parent 61a97673
...@@ -59,13 +59,15 @@ A Chrome browser extension that automates privacy settings on FetLife.com. When ...@@ -59,13 +59,15 @@ A Chrome browser extension that automates privacy settings on FetLife.com. When
4. Notifications will show progress and completion status 4. Notifications will show progress and completion status
### Method 5: Context Menu (Direct Privacy Setting) ### Method 5: Context Menu (Direct Privacy Setting)
1. Navigate to a specific FetLife video or picture page 1. Navigate to a FetLife page with images or videos
2. Right-click anywhere on the page 2. Right-click directly over an image
3. Choose from the privacy options: 3. Choose from the privacy options:
- **👥 Set to Friends Only** - Sets privacy to friends-only - **👥 Set to Friends Only** - Sets privacy to friends-only
- **🌐 Set to All Fetlifers** - Makes content visible to all FetLife users - **🌐 Set to All Fetlifers** - Makes content visible to all FetLife users
4. A notification will confirm the privacy setting change 4. A notification will confirm the privacy setting change
**Note**: The context menu items appear when right-clicking over images, making it easy to quickly change privacy settings for specific media items.
## Donations ## Donations
The extension includes multiple donation options to support its development: The extension includes multiple donation options to support its development:
......
...@@ -35,19 +35,19 @@ chrome.runtime.onInstalled.addListener(() => { ...@@ -35,19 +35,19 @@ chrome.runtime.onInstalled.addListener(() => {
documentUrlPatterns: ['https://fetlife.com/*'] documentUrlPatterns: ['https://fetlife.com/*']
}); });
// Create privacy-specific context menu items for all FetLife pages // Create privacy-specific context menu items for images on FetLife pages
// We'll check the URL in the click handler to determine if it's a video/picture page // These will appear when right-clicking over images
chrome.contextMenus.create({ chrome.contextMenus.create({
id: 'set-friends-only', id: 'set-friends-only',
title: '👥 Set to Friends Only', title: '👥 Set to Friends Only',
contexts: ['page'], contexts: ['image'],
documentUrlPatterns: ['https://fetlife.com/*'] documentUrlPatterns: ['https://fetlife.com/*']
}); });
chrome.contextMenus.create({ chrome.contextMenus.create({
id: 'set-all-fetlifers', id: 'set-all-fetlifers',
title: '🌐 Set to All Fetlifers', title: '🌐 Set to All Fetlifers',
contexts: ['page'], contexts: ['image'],
documentUrlPatterns: ['https://fetlife.com/*'] documentUrlPatterns: ['https://fetlife.com/*']
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment