├── README.md ├── _locales ├── ar │ └── messages.json ├── de │ └── messages.json ├── en │ └── messages.json ├── es │ └── messages.json ├── fr │ └── messages.json ├── it │ └── messages.json ├── ja │ └── messages.json ├── ko │ └── messages.json ├── nl │ └── messages.json ├── pt_BR │ └── messages.json ├── ru │ └── messages.json └── zh_CN │ └── messages.json ├── background.js ├── content.js ├── exif-viewer-banner.png ├── exif.min.js ├── icon.png ├── manifest.json ├── screenshot1.png └── screenshot2.png /README.md: -------------------------------------------------------------------------------- 1 | # EXIF Metadata Viewer 2 | Ever wondered about the story behind a photo you see online? The EXIF Metadata Viewer extension lets you instantly reveal the hidden details embedded within images, directly from the context menu in your browser. 3 | 4 |  5 | 6 | All you need to do is right-click on an image to find out if the image has the following details stored: 7 | 8 | - Camera settings: Find the make and model of the camera used, along with settings like aperture, shutter speed, and ISO 9 | - Location data: See where the photo was taken (if GPS data is available) 10 | - Date and time: Know exactly when the image was captured. 11 | - And much more: Discover other valuable metadata, such as software used, artist information, and more 12 | 13 | It's easy to use: Simply right-click on any image and select "View EXIF Data." 14 | We respect your privacy and don't collect any personal data. 15 | 16 | ## Installation 17 | 18 | ### Option 1: Chrome Web Store 19 | Install directly from the Chrome Web Store: [EXIF Metadata Viewer](https://chromewebstore.google.com/detail/exif-metadata-viewer/begcpebobbbopmlfomknjjcfcganemea) 20 | 21 | ### Option 2: Install as Unpacked Extension 22 | To install as an unpacked extension in Chromium-based browsers (Chrome, Edge, Brave, etc.): 23 | 24 | 1. Download or clone this repository 25 | 2. Open your browser and navigate to the extensions page: 26 | - Chrome: `chrome://extensions/` 27 | - Edge: `edge://extensions/` 28 | - Brave: `brave://extensions/` 29 | 3. Enable "Developer mode" using the toggle in the top-right corner 30 | 4. Click the "Load unpacked" button 31 | 5. Navigate to the downloaded/cloned repository folder and select it 32 | 6. The extension should now be installed and ready to use 33 | 34 | Test the extension at: https://github.com/ianare/exif-samples 35 | 36 | Want to support the project? Use my [Amazon affiliate link](https://amzn.to/4hxcRoi) to do your shopping! It costs you nothing and helps me out. -------------------------------------------------------------------------------- /_locales/ar/messages.json: -------------------------------------------------------------------------------- 1 | { 2 | "extName": { 3 | "message": "عارض بيانات EXIF التعريفية", 4 | "description": "The name of the extension" 5 | }, 6 | "extDescription": { 7 | "message": "اعرض فوراً بيانات EXIF التعريفية لأي صورة - إعدادات الكاميرا، موقع GPS، تاريخ الالتقاط والمزيد بنقرة سريعة بزر الماوس الأيمن. مثالي للمصورين، باحثي الأمن، والمستخدمين المهتمين بالخصوصية.", 8 | "description": "The description of the extension" 9 | }, 10 | "contextMenuTitle": { 11 | "message": "عرض بيانات EXIF", 12 | "description": "Title of the context menu item" 13 | }, 14 | "exifDataTitle": { 15 | "message": "بيانات EXIF", 16 | "description": "Title in the EXIF data popup" 17 | }, 18 | "noExifData": { 19 | "message": "لم يتم العثور على بيانات EXIF", 20 | "description": "Message when no EXIF data is found" 21 | }, 22 | "errorLoadingImage": { 23 | "message": "تعذر تحميل بيانات الصورة", 24 | "description": "Error message when image loading fails" 25 | }, 26 | "errorAccessingImage": { 27 | "message": "تعذر الوصول إلى بيانات الصورة", 28 | "description": "Error message when accessing image fails" 29 | }, 30 | "infoNoExifFound": { 31 | "message": "لم يتم العثور على بيانات EXIF في الصورة", 32 | "description": "Information when no EXIF data is found in image" 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /_locales/de/messages.json: -------------------------------------------------------------------------------- 1 | { 2 | "extName": { 3 | "message": "EXIF Metadaten-Betrachter", 4 | "description": "The name of the extension" 5 | }, 6 | "extDescription": { 7 | "message": "Sehen Sie sofort EXIF-Metadaten für jedes Bild - Kameraeinstellungen, GPS-Standort, Aufnahmedatum und mehr mit einem schnellen Rechtsklick. Perfekt für Fotografen, Sicherheitsforscher und datenschutzbewusste Benutzer.", 8 | "description": "The description of the extension" 9 | }, 10 | "contextMenuTitle": { 11 | "message": "EXIF-Daten anzeigen", 12 | "description": "Title of the context menu item" 13 | }, 14 | "exifDataTitle": { 15 | "message": "EXIF-Daten", 16 | "description": "Title in the EXIF data popup" 17 | }, 18 | "noExifData": { 19 | "message": "Keine EXIF-Daten gefunden", 20 | "description": "Message when no EXIF data is found" 21 | }, 22 | "errorLoadingImage": { 23 | "message": "Bilddaten konnten nicht geladen werden", 24 | "description": "Error message when image loading fails" 25 | }, 26 | "errorAccessingImage": { 27 | "message": "Auf Bilddaten konnte nicht zugegriffen werden", 28 | "description": "Error message when accessing image fails" 29 | }, 30 | "infoNoExifFound": { 31 | "message": "Keine EXIF-Daten im Bild gefunden", 32 | "description": "Information when no EXIF data is found in image" 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /_locales/en/messages.json: -------------------------------------------------------------------------------- 1 | { 2 | "extName": { 3 | "message": "EXIF Metadata Viewer - Find Information About Images", 4 | "description": "The name of the extension" 5 | }, 6 | "extDescription": { 7 | "message": "View EXIF metadata from images - camera settings, GPS location and more with a right-click. For photographers and privacy users.", 8 | "description": "The description of the extension" 9 | }, 10 | "contextMenuTitle": { 11 | "message": "View EXIF Data", 12 | "description": "Title of the context menu item" 13 | }, 14 | "exifDataTitle": { 15 | "message": "EXIF Data", 16 | "description": "Title in the EXIF data popup" 17 | }, 18 | "noExifData": { 19 | "message": "No EXIF data found", 20 | "description": "Message when no EXIF data is found" 21 | }, 22 | "errorLoadingImage": { 23 | "message": "Could not load image data", 24 | "description": "Error message when image loading fails" 25 | }, 26 | "errorAccessingImage": { 27 | "message": "Could not access image data", 28 | "description": "Error message when accessing image fails" 29 | }, 30 | "infoNoExifFound": { 31 | "message": "No EXIF data found in image", 32 | "description": "Information when no EXIF data is found in image" 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /_locales/es/messages.json: -------------------------------------------------------------------------------- 1 | { 2 | "extName": { 3 | "message": "Visor de Metadatos EXIF", 4 | "description": "The name of the extension" 5 | }, 6 | "extDescription": { 7 | "message": "Visualiza instantáneamente los metadatos EXIF de cualquier imagen: configuración de cámara, ubicación GPS, fecha de captura y más con un simple clic derecho. Perfecto para fotógrafos, investigadores de seguridad y usuarios centrados en la privacidad.", 8 | "description": "The description of the extension" 9 | }, 10 | "contextMenuTitle": { 11 | "message": "Ver Datos EXIF", 12 | "description": "Title of the context menu item" 13 | }, 14 | "exifDataTitle": { 15 | "message": "Datos EXIF", 16 | "description": "Title in the EXIF data popup" 17 | }, 18 | "noExifData": { 19 | "message": "No se encontraron datos EXIF", 20 | "description": "Message when no EXIF data is found" 21 | }, 22 | "errorLoadingImage": { 23 | "message": "No se pudo cargar la imagen", 24 | "description": "Error message when image loading fails" 25 | }, 26 | "errorAccessingImage": { 27 | "message": "No se pudo acceder a los datos de la imagen", 28 | "description": "Error message when accessing image fails" 29 | }, 30 | "infoNoExifFound": { 31 | "message": "No se encontraron datos EXIF en la imagen", 32 | "description": "Information when no EXIF data is found in image" 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /_locales/fr/messages.json: -------------------------------------------------------------------------------- 1 | { 2 | "extName": { 3 | "message": "Visionneuse de Métadonnées EXIF", 4 | "description": "The name of the extension" 5 | }, 6 | "extDescription": { 7 | "message": "Visualisez instantanément les métadonnées EXIF de n'importe quelle image - réglages de l'appareil photo, localisation GPS, date de prise de vue et plus encore avec un simple clic droit. Parfait pour les photographes, les chercheurs en sécurité et les utilisateurs soucieux de leur vie privée.", 8 | "description": "The description of the extension" 9 | }, 10 | "contextMenuTitle": { 11 | "message": "Voir les Données EXIF", 12 | "description": "Title of the context menu item" 13 | }, 14 | "exifDataTitle": { 15 | "message": "Données EXIF", 16 | "description": "Title in the EXIF data popup" 17 | }, 18 | "noExifData": { 19 | "message": "Aucune donnée EXIF trouvée", 20 | "description": "Message when no EXIF data is found" 21 | }, 22 | "errorLoadingImage": { 23 | "message": "Impossible de charger les données de l'image", 24 | "description": "Error message when image loading fails" 25 | }, 26 | "errorAccessingImage": { 27 | "message": "Impossible d'accéder aux données de l'image", 28 | "description": "Error message when accessing image fails" 29 | }, 30 | "infoNoExifFound": { 31 | "message": "Aucune donnée EXIF trouvée dans l'image", 32 | "description": "Information when no EXIF data is found in image" 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /_locales/it/messages.json: -------------------------------------------------------------------------------- 1 | { 2 | "extName": { 3 | "message": "Visualizzatore Metadati EXIF", 4 | "description": "The name of the extension" 5 | }, 6 | "extDescription": { 7 | "message": "Visualizza istantaneamente i metadati EXIF di qualsiasi immagine - impostazioni della fotocamera, posizione GPS, data di scatto e altro ancora con un rapido clic destro. Perfetto per fotografi, ricercatori di sicurezza e utenti attenti alla privacy.", 8 | "description": "The description of the extension" 9 | }, 10 | "contextMenuTitle": { 11 | "message": "Visualizza dati EXIF", 12 | "description": "Title of the context menu item" 13 | }, 14 | "exifDataTitle": { 15 | "message": "Dati EXIF", 16 | "description": "Title in the EXIF data popup" 17 | }, 18 | "noExifData": { 19 | "message": "Nessun dato EXIF trovato", 20 | "description": "Message when no EXIF data is found" 21 | }, 22 | "errorLoadingImage": { 23 | "message": "Impossibile caricare i dati dell'immagine", 24 | "description": "Error message when image loading fails" 25 | }, 26 | "errorAccessingImage": { 27 | "message": "Impossibile accedere ai dati dell'immagine", 28 | "description": "Error message when accessing image fails" 29 | }, 30 | "infoNoExifFound": { 31 | "message": "Nessun dato EXIF trovato nell'immagine", 32 | "description": "Information when no EXIF data is found in image" 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /_locales/ja/messages.json: -------------------------------------------------------------------------------- 1 | { 2 | "extName": { 3 | "message": "EXIF メタデータビューア", 4 | "description": "The name of the extension" 5 | }, 6 | "extDescription": { 7 | "message": "右クリックひとつで、あらゆる画像のEXIFメタデータを瞬時に表示 - カメラ設定、GPS位置情報、撮影日時など。写真家、セキュリティ研究者、プライバシー重視のユーザーに最適です。", 8 | "description": "The description of the extension" 9 | }, 10 | "contextMenuTitle": { 11 | "message": "EXIFデータを表示", 12 | "description": "Title of the context menu item" 13 | }, 14 | "exifDataTitle": { 15 | "message": "EXIFデータ", 16 | "description": "Title in the EXIF data popup" 17 | }, 18 | "noExifData": { 19 | "message": "EXIFデータが見つかりません", 20 | "description": "Message when no EXIF data is found" 21 | }, 22 | "errorLoadingImage": { 23 | "message": "画像データを読み込めませんでした", 24 | "description": "Error message when image loading fails" 25 | }, 26 | "errorAccessingImage": { 27 | "message": "画像データにアクセスできませんでした", 28 | "description": "Error message when accessing image fails" 29 | }, 30 | "infoNoExifFound": { 31 | "message": "画像にEXIFデータが見つかりません", 32 | "description": "Information when no EXIF data is found in image" 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /_locales/ko/messages.json: -------------------------------------------------------------------------------- 1 | { 2 | "extName": { 3 | "message": "EXIF 메타데이터 뷰어", 4 | "description": "The name of the extension" 5 | }, 6 | "extDescription": { 7 | "message": "간단한 우클릭으로 모든 이미지의 EXIF 메타데이터를 즉시 확인 - 카메라 설정, GPS 위치, 촬영 날짜 등. 사진작가, 보안 연구원 및 개인정보 보호에 관심있는 사용자에게 완벽합니다.", 8 | "description": "The description of the extension" 9 | }, 10 | "contextMenuTitle": { 11 | "message": "EXIF 데이터 보기", 12 | "description": "Title of the context menu item" 13 | }, 14 | "exifDataTitle": { 15 | "message": "EXIF 데이터", 16 | "description": "Title in the EXIF data popup" 17 | }, 18 | "noExifData": { 19 | "message": "EXIF 데이터를 찾을 수 없습니다", 20 | "description": "Message when no EXIF data is found" 21 | }, 22 | "errorLoadingImage": { 23 | "message": "이미지 데이터를 로드할 수 없습니다", 24 | "description": "Error message when image loading fails" 25 | }, 26 | "errorAccessingImage": { 27 | "message": "이미지 데이터에 액세스할 수 없습니다", 28 | "description": "Error message when accessing image fails" 29 | }, 30 | "infoNoExifFound": { 31 | "message": "이미지에서 EXIF 데이터를 찾을 수 없습니다", 32 | "description": "Information when no EXIF data is found in image" 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /_locales/nl/messages.json: -------------------------------------------------------------------------------- 1 | { 2 | "extName": { 3 | "message": "EXIF Metadata Viewer", 4 | "description": "The name of the extension" 5 | }, 6 | "extDescription": { 7 | "message": "Bekijk direct EXIF-metadata voor elke afbeelding - camera-instellingen, GPS-locatie, opnamedatum en meer met een snelle rechtermuisklik. Perfect voor fotografen, beveiligingsonderzoekers en gebruikers gericht op privacy.", 8 | "description": "The description of the extension" 9 | }, 10 | "contextMenuTitle": { 11 | "message": "EXIF-gegevens bekijken", 12 | "description": "Title of the context menu item" 13 | }, 14 | "exifDataTitle": { 15 | "message": "EXIF-gegevens", 16 | "description": "Title in the EXIF data popup" 17 | }, 18 | "noExifData": { 19 | "message": "Geen EXIF-gegevens gevonden", 20 | "description": "Message when no EXIF data is found" 21 | }, 22 | "errorLoadingImage": { 23 | "message": "Kan afbeeldingsgegevens niet laden", 24 | "description": "Error message when image loading fails" 25 | }, 26 | "errorAccessingImage": { 27 | "message": "Kan geen toegang krijgen tot afbeeldingsgegevens", 28 | "description": "Error message when accessing image fails" 29 | }, 30 | "infoNoExifFound": { 31 | "message": "Geen EXIF-gegevens gevonden in afbeelding", 32 | "description": "Information when no EXIF data is found in image" 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /_locales/pt_BR/messages.json: -------------------------------------------------------------------------------- 1 | { 2 | "extName": { 3 | "message": "Visualizador de Metadados EXIF", 4 | "description": "The name of the extension" 5 | }, 6 | "extDescription": { 7 | "message": "Visualize instantaneamente os metadados EXIF de qualquer imagem - configurações da câmera, localização GPS, data de captura e muito mais com um clique rápido do botão direito. Perfeito para fotógrafos, pesquisadores de segurança e usuários preocupados com privacidade.", 8 | "description": "The description of the extension" 9 | }, 10 | "contextMenuTitle": { 11 | "message": "Ver Dados EXIF", 12 | "description": "Title of the context menu item" 13 | }, 14 | "exifDataTitle": { 15 | "message": "Dados EXIF", 16 | "description": "Title in the EXIF data popup" 17 | }, 18 | "noExifData": { 19 | "message": "Nenhum dado EXIF encontrado", 20 | "description": "Message when no EXIF data is found" 21 | }, 22 | "errorLoadingImage": { 23 | "message": "Não foi possível carregar os dados da imagem", 24 | "description": "Error message when image loading fails" 25 | }, 26 | "errorAccessingImage": { 27 | "message": "Não foi possível acessar os dados da imagem", 28 | "description": "Error message when accessing image fails" 29 | }, 30 | "infoNoExifFound": { 31 | "message": "Nenhum dado EXIF encontrado na imagem", 32 | "description": "Information when no EXIF data is found in image" 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /_locales/ru/messages.json: -------------------------------------------------------------------------------- 1 | { 2 | "extName": { 3 | "message": "Просмотр метаданных EXIF", 4 | "description": "The name of the extension" 5 | }, 6 | "extDescription": { 7 | "message": "Мгновенно просматривайте метаданные EXIF для любого изображения - настройки камеры, GPS-координаты, дата съемки и многое другое с помощью быстрого щелчка правой кнопкой мыши. Идеально подходит для фотографов, исследователей безопасности и пользователей, заботящихся о конфиденциальности.", 8 | "description": "The description of the extension" 9 | }, 10 | "contextMenuTitle": { 11 | "message": "Просмотреть данные EXIF", 12 | "description": "Title of the context menu item" 13 | }, 14 | "exifDataTitle": { 15 | "message": "Данные EXIF", 16 | "description": "Title in the EXIF data popup" 17 | }, 18 | "noExifData": { 19 | "message": "Данные EXIF не найдены", 20 | "description": "Message when no EXIF data is found" 21 | }, 22 | "errorLoadingImage": { 23 | "message": "Не удалось загрузить данные изображения", 24 | "description": "Error message when image loading fails" 25 | }, 26 | "errorAccessingImage": { 27 | "message": "Не удалось получить доступ к данным изображения", 28 | "description": "Error message when accessing image fails" 29 | }, 30 | "infoNoExifFound": { 31 | "message": "В изображении не найдены данные EXIF", 32 | "description": "Information when no EXIF data is found in image" 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /_locales/zh_CN/messages.json: -------------------------------------------------------------------------------- 1 | { 2 | "extName": { 3 | "message": "EXIF 元数据查看器", 4 | "description": "The name of the extension" 5 | }, 6 | "extDescription": { 7 | "message": "通过快速右键点击,即时查看任何图像的EXIF元数据 - 相机设置、GPS位置、拍摄日期等。非常适合摄影师、安全研究人员和注重隐私的用户。", 8 | "description": "The description of the extension" 9 | }, 10 | "contextMenuTitle": { 11 | "message": "查看 EXIF 数据", 12 | "description": "Title of the context menu item" 13 | }, 14 | "exifDataTitle": { 15 | "message": "EXIF 数据", 16 | "description": "Title in the EXIF data popup" 17 | }, 18 | "noExifData": { 19 | "message": "未找到 EXIF 数据", 20 | "description": "Message when no EXIF data is found" 21 | }, 22 | "errorLoadingImage": { 23 | "message": "无法加载图像数据", 24 | "description": "Error message when image loading fails" 25 | }, 26 | "errorAccessingImage": { 27 | "message": "无法访问图像数据", 28 | "description": "Error message when accessing image fails" 29 | }, 30 | "infoNoExifFound": { 31 | "message": "图像中未找到 EXIF 数据", 32 | "description": "Information when no EXIF data is found in image" 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /background.js: -------------------------------------------------------------------------------- 1 | let lastClick = { x: 0, y: 0 }; 2 | 3 | try { 4 | chrome.runtime.onInstalled.addListener(() => { 5 | try { 6 | chrome.contextMenus.create({ 7 | id: "viewExif", 8 | title: chrome.i18n.getMessage("contextMenuTitle"), 9 | contexts: ["image"], 10 | documentUrlPatterns: ["*://*/*", "file:///*"] 11 | }, () => { 12 | if (chrome.runtime.lastError) { 13 | console.error('[EXIF Viewer] Context menu creation error:', chrome.runtime.lastError); 14 | } 15 | }); 16 | } catch (error) { 17 | console.error('[EXIF Viewer] Error creating context menu:', error); 18 | } 19 | }); 20 | 21 | if (chrome.contextMenus) { 22 | chrome.contextMenus.onClicked.addListener((info, tab) => { 23 | if (info.menuItemId === "viewExif") { 24 | lastClick = { x: info.x, y: info.y }; 25 | chrome.scripting.executeScript({ 26 | target: { tabId: tab.id }, 27 | files: ["exif.min.js"] 28 | }, () => { 29 | if (chrome.runtime.lastError) { 30 | console.error('[EXIF Viewer] Error injecting exif.min.js:', chrome.runtime.lastError); 31 | return; 32 | } 33 | chrome.scripting.executeScript({ 34 | target: { tabId: tab.id }, 35 | files: ["content.js"] 36 | }, () => { 37 | if (chrome.runtime.lastError) { 38 | console.error('[EXIF Viewer] Error injecting content.js:', chrome.runtime.lastError); 39 | return; 40 | } 41 | chrome.tabs.sendMessage(tab.id, { 42 | action: "showExif", 43 | imgSrc: info.srcUrl, 44 | pageUrl: info.pageUrl 45 | }); 46 | }); 47 | }); 48 | } 49 | }); 50 | } 51 | } catch (error) { 52 | console.error('[EXIF Viewer] Background script error:', error); 53 | } 54 | 55 | chrome.runtime.onMessage.addListener((request, sender, sendResponse) => { 56 | if (request.action === "getClickPosition") { 57 | sendResponse(lastClick); 58 | } 59 | }); 60 | -------------------------------------------------------------------------------- /content.js: -------------------------------------------------------------------------------- 1 | console.log('[EXIF Viewer] Content script loaded'); 2 | 3 | chrome.runtime.onMessage.addListener((request, sender, sendResponse) => { 4 | if (request.action === "showExif") { 5 | let img = document.querySelector(`img[src="${request.imgSrc}"]`); 6 | if (!img) { 7 | const decodedSrc = decodeURIComponent(request.imgSrc); 8 | img = document.querySelector(`img[src="${decodedSrc}"]`); 9 | } 10 | if (!img) { 11 | const imgElements = document.getElementsByTagName('img'); 12 | const srcEnd = request.imgSrc.split('/').pop(); 13 | img = Array.from(imgElements).find(img => img.src.endsWith(srcEnd)); 14 | } 15 | if (img) { 16 | showExifTooltip(img); 17 | } else { 18 | console.error('[EXIF Viewer] Image not found:', request.imgSrc); 19 | } 20 | } 21 | }); 22 | 23 | document.addEventListener('DOMContentLoaded', () => { 24 | console.log('[EXIF Viewer] DOM loaded, scanning for images'); 25 | const images = document.getElementsByTagName('img'); 26 | console.log(`[EXIF Viewer] Found ${images.length} images`); 27 | for (let img of images) { 28 | try { 29 | console.log('[EXIF Viewer] Found image:', img.src); 30 | } catch (error) { 31 | console.error('[EXIF Viewer] Error processing image:', error); 32 | } 33 | } 34 | }); 35 | 36 | function showExifTooltip(img) { 37 | try { 38 | const existingTooltips = document.querySelectorAll('[id^="exif-tooltip-"]'); 39 | existingTooltips.forEach(t => t.remove()); 40 | fetch(img.src, { 41 | mode: 'cors', 42 | credentials: 'same-origin' 43 | }) 44 | .then(response => response.blob()) 45 | .then(blob => { 46 | const objectUrl = URL.createObjectURL(blob); 47 | const newImg = new Image(); 48 | newImg.onload = function() { 49 | EXIF.getData(this, function() { 50 | const data = EXIF.getAllTags(this); 51 | if (Object.keys(data).length > 0) { 52 | createTooltip(data, img); 53 | } else { 54 | createTooltip({ "Info": chrome.i18n.getMessage("infoNoExifFound") }, img); 55 | } 56 | }); 57 | }; 58 | newImg.onerror = function() { 59 | console.error('[EXIF Viewer] Error loading image'); 60 | createTooltip({ "Error": chrome.i18n.getMessage("errorLoadingImage") }, img); 61 | }; 62 | newImg.src = objectUrl; 63 | }) 64 | .catch(error => { 65 | console.error('[EXIF Viewer] Error fetching image:', error); 66 | createTooltip({ "Error": chrome.i18n.getMessage("errorAccessingImage") }, img); 67 | }); 68 | } catch (error) { 69 | console.error('[EXIF Viewer] Error showing tooltip:', error); 70 | } 71 | } 72 | 73 | function createTooltip(data, img) { 74 | let tooltip = document.createElement('div'); 75 | tooltip.id = getTooltipId(img); 76 | tooltip.style.cssText = ` 77 | position: fixed; 78 | background-color: rgba(0, 0, 0, 0.9); 79 | color: white; 80 | padding: 15px; 81 | border-radius: 8px; 82 | font-family: Arial, sans-serif; 83 | font-size: 14px; 84 | max-width: 400px; 85 | box-shadow: 0 2px 10px rgba(0,0,0,0.5); 86 | z-index: 1000000; 87 | `; 88 | const formattedData = Object.entries(data) 89 | .filter(([key]) => key !== '_raw') 90 | .map(([key, value]) => { 91 | let label = key.replace(/([A-Z])/g, ' $1').trim(); 92 | 93 | label = label.replace(/G P S/, 'GPS'); 94 | 95 | return `