feat(browser): implement browser extension for sending files to DocuElevate

- Add complete browser extension with popup UI and background workers
- Support Chrome, Firefox, Edge, and other Chromium-based browsers
- Include context menu integration for quick file sending
- Add comprehensive documentation for users and administrators
- Update main README and API docs to include browser extension
- Implement secure configuration storage in browser extension storage
- Add SSRF-protected URL upload endpoint integration

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-02-12 03:04:36 +00:00
parent 66f0f3236c
commit 817dc31e12
14 changed files with 1282 additions and 4 deletions
+33
View File
@@ -0,0 +1,33 @@
// Content script for DocuElevate browser extension
// This script runs on all web pages to detect file URLs
// and enable communication between page content and the extension
// Listen for messages from the popup
chrome.runtime.onMessage.addListener((message, sender, sendResponse) => {
if (message.type === 'GET_PAGE_INFO') {
// Return information about the current page
const pageInfo = {
url: window.location.href,
title: document.title
};
sendResponse(pageInfo);
}
});
// Detect if current page is a direct file link
function isDirectFileUrl(url) {
const fileExtensions = [
'.pdf', '.doc', '.docx', '.xls', '.xlsx', '.ppt', '.pptx',
'.txt', '.csv', '.rtf', '.jpg', '.jpeg', '.png', '.gif',
'.bmp', '.tiff', '.webp', '.svg'
];
const urlLower = url.toLowerCase();
return fileExtensions.some(ext => urlLower.endsWith(ext));
}
// Add visual indicator for file pages (optional enhancement)
if (isDirectFileUrl(window.location.href)) {
console.log('DocuElevate: Direct file URL detected');
}