// ==UserScript== // @name StockXpert - Universal Media Hunter - PRO // @name:pt-BR StockXpert - Universal Media Hunter - PRO // @name:es StockXpert - Universal Media Hunter - PRO // @name:fr StockXpert - Universal Media Hunter - PRO // @name:de StockXpert - Universal Media Hunter - PRO // @name:it StockXpert - Universal Media Hunter - PRO // @name:ru StockXpert - Universal Media Hunter - PRO // @name:zh-CN StockXpert - Universal Media Hunter - PRO // @name:ja StockXpert - Universal Media Hunter - PRO // @name:ko StockXpert - Universal Media Hunter - PRO // @name:hi StockXpert - Universal Media Hunter - PRO // @name:id StockXpert - Universal Media Hunter - PRO // @namespace http://tampermonkey.net/ // @version 2.5.5 // @description The most powerful media search & download tool. Search/Batch Download Photos, Videos, Vectors from multiple sources (Pixabay, Pexels, Unsplash, etc.). Features: Deep Scan, 4K/HD Unlocker, Reverse Image Search, Auto-Scan & Multi-Downloader. // @description:pt-BR A ferramenta de busca e download de mídia mais poderosa. Busque/Baixe em lote Fotos, Vídeos, Vetores de várias fontes. Funcionalidades: Deep Scan, Desbloqueio 4K/HD, Busca Reversa, Auto-Scan e Multi-Downloader. // @description:es La herramienta de búsqueda y descarga de medios más potente. Busque/Descargue por lotes fotos, vídeos y vectores de múltiples fuentes. Características: Deep Scan, desbloqueo 4K/HD, búsqueda inversa, escaneo automático y descarga múltiple. // @description:zh-CN 最强大的媒体搜索和下载工具。从多个来源搜索/批量下载照片、视频、矢量图。功能:深度扫描、4K/HD解锁、反向图片搜索、自动扫描和多重下载器。 // @description:ru Самый мощный инструмент для поиска и загрузки медиафайлов. Поиск/пакетная загрузка фото, видео, векторов из нескольких источников. Функции: глубокое сканирование, разблокировка 4K/HD, обратный поиск изображений, автосканирование и мультизагрузчик. // @description:fr L'outil de recherche et de téléchargement de médias le plus puissant. Cherchez/téléchargez en masse des photos, vidéos, vecteurs de plusieurs sources. Fonctionnalités : Deep Scan, déblocage 4K/HD, recherche inversée, Auto-Scan et Multi-Downloader. // @description:de Das leistungsstärkste Tool zur Mediensuche und zum Download. Suchen/Batch-Download von Fotos, Videos, Vektoren aus mehreren Quellen. Funktionen: Deep Scan, 4K/HD-Unlocker, Rückwärtssuche, Auto-Scan und Multi-Downloader. // @description:ja 最も強力なメディア検索およびダウンロードツール。複数のソースから写真、動画、ベクターを検索/一括ダウンロード。機能:ディープスキャン、4K/HDロック解除、逆画像検索、自動スキャン、マルチダウンローダー。 // @description:it Lo strumento di ricerca e download multimediale più potente. Cerca/Scarica in batch foto, video, vettori da più fonti. Funzionalità: Deep Scan, sblocco 4K/HD, ricerca inversa, Auto-Scan e Multi-Downloader. // @description:hi सबसे शक्तिशाली मीडिया खोज और डाउनलोड उपकरण। कई स्रोतों से फोटो, वीडियो, वैक्टर खोजें/बैच डाउनलोड करें। विशेषताएं: डीप स्कैन, 4K/HD अनलॉकर, रिवर्स इमेज सर्च, ऑटो-स्कैन और मल्टी-डाउनलोडर। // @description:id Alat pencarian & pengunduhan media paling ampuh. Cari/Unduh Batch Foto, Video, Vektor dari berbagai sumber. Fitur: Deep Scan, Pembuka Kunci 4K/HD, Pencarian Gambar Terbalik, Pindai Otomatis & Pengunduh Multi. // @description:ko 가장 강력한 미디어 검색 및 다운로드 도구. 여러 소스에서 사진, 비디오, 벡터 검색/일괄 다운로드. 기능: 정밀 검사, 4K/HD 잠금 해제, 역이미지 검색, 자동 스캔 및 멀티 다운로더. // @description:ar أقوى أداة للبحث عن الوسائط وتنزيلها. ابحث/نزل مجموعة من الصور ومقاطع الفيديو والمتجهات من مصادر متعددة. الميزات: مسح عميق، فتح قفل 4K/HD، بحث عكسي عن الصور، مسح تلقائي وتنزيل متعدد. // @copyright 2025, Tauã B. Kloch Leite - All Rights Reserved. // @author Tauã B. Kloch Leite // @icon https://img.icons8.com/?size=100&id=zS0X1cipar3P&format=png&color=000000 // @match *://*/* // @grant GM_addStyle // @grant GM_openInTab // @grant GM_xmlhttpRequest // @grant GM_download // @grant GM_setValue // @grant GM_getValue // @grant GM_setClipboard // @grant GM_registerMenuCommand // @connect unsplash.com // @connect pexels.com // @connect pixabay.com // @connect mixkit.co // @connect youtube.com // @connect google.com // @connect wikimedia.org // @connect images.pexels.com // @connect images.unsplash.com // @connect cdn.pixabay.com // @connect upload.wikimedia.org // @connect i.ytimg.com // @noframes // @run-at document-idle // @downloadURL https://update.greasyfork.icu/scripts/557354/StockXpert%20-%20Universal%20Media%20Hunter%20-%20PRO.user.js // @updateURL https://update.greasyfork.icu/scripts/557354/StockXpert%20-%20Universal%20Media%20Hunter%20-%20PRO.meta.js // ==/UserScript== (function() { 'use strict'; if (window.top !== window.self) return; /* --- ICONS (BASE64 & SVG) --- */ const ICONS = { pix: "https://upload.wikimedia.org/wikipedia/commons/a/a2/Logo%E2%80%94pix_powered_by_Banco_Central_%28Brazil%2C_2020%29.svg", btc: "https://cryptologos.cc/logos/bitcoin-btc-logo.svg?v=025", eth: "https://cryptologos.cc/logos/ethereum-eth-logo.svg?v=025", sol: "https://cryptologos.cc/logos/solana-sol-logo.svg?v=025", bnb: "https://cryptologos.cc/logos/bnb-bnb-logo.svg?v=025", matic: "https://cryptologos.cc/logos/polygon-matic-logo.svg?v=025", arb: "https://cryptologos.cc/logos/arbitrum-arb-logo.svg?v=025", paypal: "https://www.paypalobjects.com/webstatic/icon/pp258.png", // Floating Trigger Icon gear: ``, // Nav Bar Icon (Thicker, simpler for small size) gearNav: `` }; /* --- INTERNATIONALIZATION --- */ const userLang = navigator.language || navigator.userLanguage; const langCode = userLang.slice(0, 2).toLowerCase(); const i18n = { en: { title: "STOCKXPERT", subtitle: "v2.5.4 GLOBAL", tab_p: "PHOTOS", tab_v: "VIDEOS", tab_h: "HISTORY", tab_s: "SUPPORT", tab_c: "CONFIG", ph_p: "Search Global...", ph_v: "Search Footage...", lbl_int: "INTERNAL (LOCKED)", lbl_ext: "🌍 SEARCH EXTERNAL", lbl_ori: "ORIENTATION", btn_p: "🚀 SEARCH INTERNAL", btn_scan_p: "👁️ DEEP SCAN PHOTOS", btn_scan_v: "👁️ DEEP SCAN VIDEOS", btn_v: "🎥 SEARCH VIDEOS", btn_ext: "🌐 OPEN ALL ENGINES", btn_clr: "Clear History", btn_dl: "DOWNLOAD", load: "Smart Scanning...", dl_wait: "⏳...", confirm_del: "Delete Gallery?", confirm_clr: "Empty Gallery?", empty: "Empty!", vid_tag: "Video Tag", file_link: "File Link", xray_src: "Smart Match", json_src: "Smart Data", yt_copy: "Link Copied!", sup_title: "FUEL THE CODE ☕", sup_desc: "Servers don't run on love. Help keep the updates coming!", lbl_pix: "PIX (BRAZIL)", btn_copy: "COPY", copied: "COPIED!", lbl_paypal: "PAYPAL", cfg_theme: "UI COLOR THEME", cfg_keys: "KEYBOARD SHORTCUTS", cfg_hide: "HIDE UI NOW", key_h: "Hide/Show All", key_s: "Toggle Search", key_b: "Toggle Gallery", power_off: "Hide Interface (Alt+X)" }, pt: { title: "STOCKXPERT", subtitle: "v2.5.4 GLOBAL", tab_p: "FOTOS", tab_v: "VÍDEOS", tab_h: "HISTÓRICO", tab_s: "DOAÇÃO", tab_c: "CONFIG", ph_p: "Busca Global...", ph_v: "Buscar Vídeos...", lbl_int: "FONTES (TRAVADO)", lbl_ext: "🌍 BUSCA EXTERNA", lbl_ori: "ORIENTAÇÃO", btn_p: "🚀 BUSCAR INTERNO", btn_scan_p: "👁️ ESCANEAR FOTOS", btn_scan_v: "👁️ ESCANEAR VÍDEOS", btn_v: "🎥 BUSCAR VÍDEOS", btn_ext: "🌐 ABRIR MOTORES", btn_clr: "Limpar Histórico", btn_dl: "DOWNLOAD", load: "Escaneando...", dl_wait: "⏳...", confirm_del: "Deletar Galeria?", confirm_clr: "Esvaziar Galeria?", empty: "Vazia!", vid_tag: "Player Vídeo", file_link: "Link Arquivo", xray_src: "Pareamento Smart", json_src: "Dados Inteligentes", yt_copy: "Link Copiado!", sup_title: "ABASTEÇA O CÓDIGO ☕", sup_desc: "Servidores custam dinheiro. Ajude a manter as atualizações!", lbl_pix: "CHAVE PIX", btn_copy: "COPIAR", copied: "COPIADO!", lbl_paypal: "PAYPAL", cfg_theme: "TEMA DE CORES", cfg_keys: "ATALHOS", cfg_hide: "ESCONDER TUDO AGORA", key_h: "Esconder/Mostrar", key_s: "Alternar Busca", key_b: "Alternar Galeria", power_off: "Esconder Interface (Alt+X)" }, es: { title: "STOCKXPERT", subtitle: "v2.5.4 GLOBAL", tab_p: "FOTOS", tab_v: "VIDEOS", tab_h: "HISTORIAL", tab_s: "DONAR", tab_c: "CONFIG", ph_p: "Búsqueda Global...", ph_v: "Buscar Videos...", lbl_int: "FUENTES (BLOQ)", lbl_ext: "🌍 BÚSQUEDA EXTERNA", lbl_ori: "ORIENTACIÓN", btn_p: "🚀 BUSCAR INTERNO", btn_scan_p: "👁️ ESCANEAR FOTOS", btn_scan_v: "👁️ ESCANEAR VIDEOS", btn_v: "🎥 BUSCAR VIDEOS", btn_ext: "🌐 ABRIR MOTORES", btn_clr: "Borrar Historial", btn_dl: "DESCARGAR", load: "Escaneando...", dl_wait: "⏳...", confirm_del: "¿Eliminar Galería?", confirm_clr: "¿Vaciar Galería?", empty: "¡Vacía!", vid_tag: "Reproductor", file_link: "Enlace", xray_src: "Smart Match", json_src: "Datos Smart", yt_copy: "¡Copiado!", sup_title: "APOYA EL CÓDIGO ☕", sup_desc: "¡Ayuda a mantener las actualizaciones llegando!", lbl_pix: "PIX (BRASIL)", btn_copy: "COPIAR", copied: "¡COPIADO!", lbl_paypal: "PAYPAL", cfg_theme: "COLOR DEL TEMA", cfg_keys: "ATAJOS", cfg_hide: "OCULTAR AHORA", key_h: "Ocultar/Mostrar", key_s: "Panel de Búsqueda", key_b: "Barra de Galería", power_off: "Ocultar Interfaz (Alt+X)" }, fr: { title: "STOCKXPERT", subtitle: "v2.5.4 GLOBAL", tab_p: "PHOTOS", tab_v: "VIDÉOS", tab_h: "HISTORIQUE", tab_s: "DONNER", tab_c: "CONFIG", ph_p: "Recherche Globale...", ph_v: "Chercher Vidéos...", lbl_int: "SOURCES (VERROU)", lbl_ext: "🌍 RECHERCHE EXT", lbl_ori: "ORIENTATION", btn_p: "🚀 RECHERCHE INTERNE", btn_scan_p: "👁️ SCAN PHOTOS", btn_scan_v: "👁️ SCAN VIDÉOS", btn_v: "🎥 CHERCHER VIDÉOS", btn_ext: "🌐 TOUT OUVRIR", btn_clr: "Effacer l'historique", btn_dl: "TÉLÉCHARGER", load: "Analyse en cours...", dl_wait: "⏳...", confirm_del: "Supprimer la galerie ?", confirm_clr: "Vider la galerie ?", empty: "Vide !", vid_tag: "Balise Vidéo", file_link: "Lien Fichier", xray_src: "Smart Match", json_src: "Données Smart", yt_copy: "Copié !", sup_title: "SOUTENIR LE CODE ☕", sup_desc: "Aidez à maintenir les mises à jour !", lbl_pix: "PIX (BRÉSIL)", btn_copy: "COPIER", copied: "COPIÉ !", lbl_paypal: "PAYPAL", cfg_theme: "THÈME COULEUR", cfg_keys: "RACCOURCIS", cfg_hide: "CACHER TOUT", key_h: "Cacher/Montrer", key_s: "Panneau Recherche", key_b: "Barre Galerie", power_off: "Cacher l'interface (Alt+X)" }, de: { title: "STOCKXPERT", subtitle: "v2.5.4 GLOBAL", tab_p: "FOTOS", tab_v: "VIDEOS", tab_h: "VERLAUF", tab_s: "SPENDEN", tab_c: "KONFIG", ph_p: "Suche...", ph_v: "Videos suchen...", lbl_int: "QUELLEN (GESPERRT)", lbl_ext: "🌍 EXTERNE SUCHE", lbl_ori: "AUSRICHTUNG", btn_p: "🚀 INTERNE SUCHE", btn_scan_p: "👁️ FOTOS SCANNEN", btn_scan_v: "👁️ VIDEOS SCANNEN", btn_v: "🎥 VIDEOS SUCHEN", btn_ext: "🌐 ALLE ÖFFNEN", btn_clr: "Verlauf löschen", btn_dl: "HERUNTERLADEN", load: "Scannen...", dl_wait: "⏳...", confirm_del: "Galerie löschen?", confirm_clr: "Galerie leeren?", empty: "Leer!", vid_tag: "Video-Tag", file_link: "Datei-Link", xray_src: "Smart Match", json_src: "Smart Data", yt_copy: "Kopiert!", sup_title: "UNTERSTÜTZEN ☕", sup_desc: "Helfen Sie, Updates am Laufen zu halten!", lbl_pix: "PIX (BRASILIEN)", btn_copy: "KOPIEREN", copied: "KOPIERT!", lbl_paypal: "PAYPAL", cfg_theme: "FARBTHEMA", cfg_keys: "TASTATURKÜRZEL", cfg_hide: "JETZT AUSBLENDEN", key_h: "Ausblenden/Anzeigen", key_s: "Suchfeld", key_b: "Galerieleiste", power_off: "Interface ausblenden (Alt+X)" }, it: { title: "STOCKXPERT", subtitle: "v2.5.4 GLOBAL", tab_p: "FOTO", tab_v: "VIDEO", tab_h: "STORIA", tab_s: "DONARE", tab_c: "CONFIG", ph_p: "Cerca...", ph_v: "Cerca Video...", lbl_int: "FONTI (BLOCCATO)", lbl_ext: "🌍 RICERCA ESTERNA", lbl_ori: "ORIENTAMENTO", btn_p: "🚀 CERCA INTERNO", btn_scan_p: "👁️ SCAN FOTO", btn_scan_v: "👁️ SCAN VIDEO", btn_v: "🎥 CERCA VIDEO", btn_ext: "🌐 APRI TUTTI", btn_clr: "Cancella Storia", btn_dl: "SCARICARE", load: "Scansione...", dl_wait: "⏳...", confirm_del: "Eliminare Galleria?", confirm_clr: "Svuotare Galleria?", empty: "Vuota!", vid_tag: "Tag Video", file_link: "Link File", xray_src: "Smart Match", json_src: "Dati Smart", yt_copy: "Copiato!", sup_title: "SUPPORTO ☕", sup_desc: "Aiutaci a mantenere gli aggiornamenti!", lbl_pix: "PIX (BRASILE)", btn_copy: "COPIA", copied: "COPIATO!", lbl_paypal: "PAYPAL", cfg_theme: "TEMA COLORE", cfg_keys: "SCORCIATOIE", cfg_hide: "NASCONDI ORA", key_h: "Mostra/Nascondi", key_s: "Pannello Ricerca", key_b: "Barra Galleria", power_off: "Nascondi Interfaccia (Alt+X)" }, ru: { title: "STOCKXPERT", subtitle: "v2.5.4 GLOBAL", tab_p: "ФОТО", tab_v: "ВИДЕО", tab_h: "ИСТОРИЯ", tab_s: "ДОНАТ", tab_c: "КОНФИГ", ph_p: "Поиск...", ph_v: "Поиск видео...", lbl_int: "ИСТОЧНИКИ (БЛОК)", lbl_ext: "🌍 ВНЕШНИЙ ПОИСК", lbl_ori: "ОРИЕНТАЦИЯ", btn_p: "🚀 ПОИСК", btn_scan_p: "👁️ СКАН ФОТО", btn_scan_v: "👁️ СКАН ВИДЕО", btn_v: "🎥 ИСКАТЬ ВИДЕО", btn_ext: "🌐 ОТКРЫТЬ ВСЕ", btn_clr: "Очистить", btn_dl: "СКАЧАТЬ", load: "Сканирование...", dl_wait: "⏳...", confirm_del: "Удалить?", confirm_clr: "Очистить?", empty: "Пусто!", vid_tag: "Видео Тег", file_link: "Ссылка", xray_src: "Smart Match", json_src: "Smart Data", yt_copy: "Скопировано!", sup_title: "ПОДДЕРЖКА ☕", sup_desc: "Помогите поддерживать обновления!", lbl_pix: "PIX (БРАЗИЛИЯ)", btn_copy: "КОПИРОВАТЬ", copied: "ГОТОВО!", lbl_paypal: "PAYPAL", cfg_theme: "ТЕМА", cfg_keys: "ГОРЯЧИЕ КЛАВИШИ", cfg_hide: "СКРЫТЬ", key_h: "Скрыть/Показать", key_s: "Поиск", key_b: "Галерея", power_off: "Скрыть (Alt+X)" }, hi: { title: "STOCKXPERT", subtitle: "v2.5.4 वैश्विक", tab_p: "तस्वीरें", tab_v: "वीडियो", tab_h: "इतिहास", tab_s: "दान करें", tab_c: "सेटिंग्स", ph_p: "खोज...", ph_v: "वीडियो खोजें...", lbl_int: "आंतरिक स्रोत", lbl_ext: "🌍 बाहरी खोज", lbl_ori: "अभिविन्यास", btn_p: "🚀 खोज", btn_scan_p: "👁️ स्कैन फोटो", btn_scan_v: "👁️ स्कैन वीडियो", btn_v: "🎥 वीडियो खोजें", btn_ext: "🌐 सब खोलें", btn_clr: "इतिहास साफ़ करें", btn_dl: "डाउनलोड", load: "स्कैनिंग...", dl_wait: "⏳...", confirm_del: "हटाएं?", confirm_clr: "खाली करें?", empty: "खाली!", vid_tag: "वीडियो टैग", file_link: "लिंक", xray_src: "स्मार्ट मैच", json_src: "स्मार्ट डेटा", yt_copy: "कॉपी किया गया!", sup_title: "समर्थन ☕", sup_desc: "अपडेट जारी रखने में मदद करें!", lbl_pix: "PIX (ब्राजील)", btn_copy: "कॉपी", copied: "हो गया!", lbl_paypal: "PAYPAL", cfg_theme: "रंग थीम", cfg_keys: "शॉर्टकट", cfg_hide: "छिपाएँ", key_h: "छिपाएँ/दिखाएँ", key_s: "खोज पैनल", key_b: "गैलरी", power_off: "इंटरफ़ेस छिपाएँ (Alt+X)" }, zh: { title: "STOCKXPERT", subtitle: "v2.5.4 全球版", tab_p: "照片", tab_v: "视频", tab_h: "历史", tab_s: "捐赠", tab_c: "设置", ph_p: "全球搜索...", ph_v: "搜索素材...", lbl_int: "内部来源 (锁定)", lbl_ext: "🌍 外部搜索", lbl_ori: "方向", btn_p: "🚀 内部搜索", btn_scan_p: "👁️ 深度扫描照片", btn_scan_v: "👁️ 深度扫描视频", btn_v: "🎥 搜索视频", btn_ext: "🌐 打开所有", btn_clr: "清除历史", btn_dl: "下载", load: "扫描中...", dl_wait: "⏳...", confirm_del: "删除图库?", confirm_clr: "清空图库?", empty: "空的!", vid_tag: "视频标签", file_link: "文件链接", xray_src: "智能匹配", json_src: "智能数据", yt_copy: "已复制!", sup_title: "支持开发 ☕", sup_desc: "请喝杯咖啡,支持更新!", lbl_pix: "PIX (巴西)", btn_copy: "复制", copied: "已复制!", lbl_paypal: "贝宝", cfg_theme: "界面颜色", cfg_keys: "键盘快捷键", cfg_hide: "立即隐藏", key_h: "隐藏/显示", key_s: "切换搜索", key_b: "切换图库", power_off: "隐藏界面 (Alt+X)" }, ja: { title: "STOCKXPERT", subtitle: "v2.5.4 グローバル", tab_p: "写真", tab_v: "動画", tab_h: "履歴", tab_s: "寄付", tab_c: "設定", ph_p: "検索...", ph_v: "動画検索...", lbl_int: "内部ソース (ロック)", lbl_ext: "🌍 外部検索", lbl_ori: "方向", btn_p: "🚀 内部検索", btn_scan_p: "👁️ 写真スキャン", btn_scan_v: "👁️ 動画スキャン", btn_v: "🎥 動画検索", btn_ext: "🌐 全て開く", btn_clr: "履歴消去", btn_dl: "ダウンロード", load: "スキャン中...", dl_wait: "⏳...", confirm_del: "削除しますか?", confirm_clr: "空にしますか?", empty: "空です!", vid_tag: "動画タグ", file_link: "リンク", xray_src: "スマートマッチ", json_src: "スマートデータ", yt_copy: "コピー完了!", sup_title: "サポート ☕", sup_desc: "開発を支援してください!", lbl_pix: "PIX (ブラジル)", btn_copy: "コピー", copied: "完了!", lbl_paypal: "ペイパル", cfg_theme: "カラーテーマ", cfg_keys: "ショートカット", cfg_hide: "今すぐ隠す", key_h: "表示/非表示", key_s: "検索パネル", key_b: "ギャラリーバー", power_off: "インターフェースを隠す (Alt+X)" }, id: { title: "STOCKXPERT", subtitle: "v2.5.4 GLOBAL", tab_p: "FOTO", tab_v: "VIDEO", tab_h: "RIWAYAT", tab_s: "DONASI", tab_c: "KONFIG", ph_p: "Cari...", ph_v: "Cari Video...", lbl_int: "SUMBER (TERKUNCI)", lbl_ext: "🌍 PENCARIAN LUAR", lbl_ori: "ORIENTASI", btn_p: "🚀 CARI INTERNAL", btn_scan_p: "👁️ PINDAI FOTO", btn_scan_v: "👁️ PINDAI VIDEO", btn_v: "🎥 CARI VIDEO", btn_ext: "🌐 BUKA SEMUA", btn_clr: "Hapus Riwayat", btn_dl: "UNDUH", load: "Memindai...", dl_wait: "⏳...", confirm_del: "Hapus Galeri?", confirm_clr: "Kosongkan?", empty: "Kosong!", vid_tag: "Tag Video", file_link: "Tautan", xray_src: "Smart Match", json_src: "Smart Data", yt_copy: "Disalin!", sup_title: "DUKUNGAN ☕", sup_desc: "Bantu terus perbarui!", lbl_pix: "PIX (BRASIL)", btn_copy: "SALIN", copied: "DISALIN!", lbl_paypal: "PAYPAL", cfg_theme: "TEMA WARNA", cfg_keys: "PINTASAN", cfg_hide: "SEMBUNYIKAN", key_h: "Sembunyi/Tampil", key_s: "Panel Cari", key_b: "Bar Galeri", power_off: "Sembunyikan Antarmuka (Alt+X)" } }; const l = i18n[langCode] ? langCode : 'en'; const t = (key) => i18n[l][key] || i18n['en'][key]; /* --- CONFIG & STATE --- */ const defaultCollection = { name: 'Geral', items: [] }; const storedCollections = JSON.parse(GM_getValue('ymh_global_collections', '[]')); const storedHistory = JSON.parse(GM_getValue('ymh_global_history', '[]')); const storedTheme = GM_getValue('ymh_theme', '#00E676'); // Load persistence state for visibility const storedVisibility = GM_getValue('ymh_is_visible', true); const state = { collections: storedCollections.length ? storedCollections : [defaultCollection], activeCollectionIndex: GM_getValue('ymh_active_index', 0), history: storedHistory, page: 1, isOpen: false, isBarOpen: true, isVisible: storedVisibility, // Use stored value themeColor: storedTheme, sources: { unsplash: true, pexels: true, pixabay: true, wikimedia: true, pexelsVideo: true, pixabayVideo: true, mixkit: true, youtube: true }, orientation: 'landscape', minSize: 150, currentQuery: '', currentMode: 'photos', isScanning: false, isLoading: false, pulseInterval: null, scrollTimer: null }; /* --- HELPERS --- */ function saveCollections() { GM_setValue('ymh_global_collections', JSON.stringify(state.collections)); GM_setValue('ymh_active_index', state.activeCollectionIndex); } function saveHistory() { GM_setValue('ymh_global_history', JSON.stringify(state.history)); renderHistory(); } function getActiveCollection() { if (!state.collections[state.activeCollectionIndex]) state.activeCollectionIndex = 0; return state.collections[state.activeCollectionIndex]; } function wipeResults(type) { const id = type === 'video' ? 'ymh-res-v' : 'ymh-res-p'; const el = document.getElementById(id); if(el) el.innerHTML = ''; state.page = 1; state.isLoading = false; document.querySelector('.ymh-content').scrollTop = 0; } function extractValidImage(imgEl) { if (!imgEl) return null; if (imgEl.closest('#ymh-suite') || imgEl.closest('#ymh-bar') || imgEl.closest('#ymh-big-preview')) return null; let src = imgEl.src || imgEl.getAttribute('data-src') || imgEl.getAttribute('data-lazy-src') || imgEl.getAttribute('data-sfwthumb'); if (src && src.includes('blank.gif') && imgEl.srcset) { let parts = imgEl.srcset.split(','); if(parts.length > 0) src = parts[0].trim().split(' ')[0]; } if (src && (src.includes('blank.gif') || src.startsWith('data:'))) return null; return src; } function magicPixabayLink(url) { if (!url) return url; if (url.includes('cdn.pixabay.com')) { return url.replace(/(_tiny|_small|_medium|_large)\.(jpg|jpeg|mp4)/i, '_large.mp4'); } return url; } function magicPexelsLink(url) { const match = url.match(/\/video\/.*?(\d+)\/?/); if (match && match[1]) { return `https://www.pexels.com/download/video/${match[1]}/`; } return url; } function getFileNameFromUrl(url, type) { try { if(url.includes('pexels.com/download')) return 'pexels_' + Date.now() + (type === 'video' ? '.mp4' : '.jpg'); const cleanUrl = url.split('?')[0]; let filename = cleanUrl.split('/').pop(); filename = decodeURIComponent(filename); if (!filename.includes('.')) filename += (type === 'video' ? '.mp4' : '.jpg'); return filename; } catch (e) { return (type === 'video' ? 'video_' : 'image_') + Date.now() + (type === 'video' ? '.mp4' : '.jpg'); } } function getYoutubeID(url) { let vidId = ''; if(url.includes('v=')) vidId = url.split('v=')[1].split('&')[0]; else if(url.includes('youtu.be/')) vidId = url.split('youtu.be/')[1].split('?')[0]; return vidId; } function setTheme(color) { state.themeColor = color; GM_setValue('ymh_theme', color); document.documentElement.style.setProperty('--ymh-theme', color); } /* --- MENUS & SHORTCUTS --- */ GM_registerMenuCommand(`👁️ Toggle Panel (Alt+M)`, toggleSuite); GM_registerMenuCommand(`🎞️ Toggle Bar (Alt+B)`, toggleBar); GM_registerMenuCommand(`👻 Stealth Mode (Alt+X)`, toggleMasterVisibility); document.addEventListener('keydown', (e) => { if (e.altKey && (e.key === 'x' || e.key === 'X')) toggleMasterVisibility(); if (e.altKey && (e.key === 'm' || e.key === 'M')) toggleSuite(); if (e.altKey && (e.key === 'b' || e.key === 'B')) toggleBar(); if (e.altKey && (e.key === 's' || e.key === 'S')) toggleSuite(); }); function toggleMasterVisibility() { state.isVisible = !state.isVisible; GM_setValue('ymh_is_visible', state.isVisible); // Save to storage const elements = ['#ymh-suite', '#ymh-bar', '#ymh-trigger', '#ymh-big-preview']; elements.forEach(selector => { const el = document.querySelector(selector); if (el) { if (!state.isVisible) el.classList.add('ymh-invisible'); else el.classList.remove('ymh-invisible'); } }); } /* --- STYLES --- */ const css = ` :root { --ymh-theme: ${state.themeColor}; } #ymh-suite { position: fixed; top: 0; right: 0; width: 480px; height: 100vh; background: #121212; border-left: 1px solid #333; z-index: 2147483647; display: flex; flex-direction: column; transform: translateX(100%); transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1); font-family: 'Segoe UI', Roboto, sans-serif; color: #eee; box-shadow: -10px 0 60px rgba(0,0,0,0.9); } #ymh-suite.visible { transform: translateX(0); } .ymh-header { padding: 15px 20px; background: #1a1a1a; border-bottom: 2px solid var(--ymh-theme); display: flex; justify-content: space-between; align-items: center; } .ymh-title { font-weight: 900; color: #fff; letter-spacing: 1px; font-size: 16px; } .ymh-subtitle { color: var(--ymh-theme); font-size: 12px; margin-left: 5px; text-transform: uppercase; font-weight:bold; } .ymh-close { cursor: pointer; font-size: 20px; color: #888; transition:0.2s; margin-left:10px;} .ymh-close:hover { color: #fff; } .ymh-power { cursor: pointer; font-size: 18px; color: #D32F2F; transition:0.2s; margin-right: auto; margin-left: 15px; } .ymh-power:hover { color: #ff5252; transform: scale(1.1); text-shadow: 0 0 5px red; } .ymh-nav { display: flex; background: #222; } .ymh-nav-btn { flex: 1; padding: 12px 0; text-align: center; cursor: pointer; font-size: 12px; font-weight: 700; color: #666; border-bottom: 3px solid transparent; transition:0.2s; } .ymh-nav-btn:hover { background: #333; color: #ccc; } .ymh-nav-btn.active { color: #fff; border-bottom-color: var(--ymh-theme); background: #181818; } /* NEW ICON STYLES */ .ymh-nav-btn svg { width: 20px; height: 20px; fill: currentColor; vertical-align:middle; transition: 0.3s ease; } .ymh-nav-btn.active svg { fill: #fff; filter: drop-shadow(0 0 6px var(--ymh-theme)); transform: rotate(45deg); } .ymh-content { flex-grow: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; } .ymh-section { display: none; width: 100%; } .ymh-section.active { display: block; } .ymh-input { width: 100%; background: #000; border: 1px solid #444; color: #fff; padding: 12px; border-radius: 4px; font-size: 14px; outline: none; margin-bottom: 10px; } .ymh-input:focus { border-color: var(--ymh-theme); } .ymh-box { background: #1e1e1e; padding: 12px; border-radius: 6px; margin-bottom: 15px; border: 1px solid #333; } .ymh-label { font-size: 10px; font-weight: 800; color: #888; margin-bottom: 8px; display: block; text-transform: uppercase; } .ymh-chips { display: flex; gap: 6px; flex-wrap: wrap; } .ymh-chip { background: #2a2a2a; border: 1px solid #444; padding: 6px 12px; border-radius: 4px; font-size: 11px; cursor: pointer; user-select: none; transition: 0.2s; color: #aaa; } .ymh-chip:hover { color: #fff; border-color: #666; } .ymh-chip.selected { background: var(--ymh-theme); border-color: var(--ymh-theme); color: #000; font-weight: bold; } .ymh-chip.selected[data-src] { cursor: default; } .ymh-btn { width: 100%; padding: 12px; border: none; border-radius: 4px; cursor: pointer; font-weight: 800; font-size: 12px; display: flex; align-items: center; justify-content: center; gap: 8px; transition: 0.2s; text-transform: uppercase; } .btn-main { background: var(--ymh-theme); color: #000; box-shadow: 0 4px 10px rgba(0,0,0,0.2); } .btn-main:hover { filter: brightness(1.1); transform: translateY(-1px); } .btn-sec { background: #333; color: #ccc; margin-top: 10px; } .btn-sec:hover { background: #444; color: #fff; } .ymh-engines { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; } .ymh-eng-btn { background: #111; border: 1px solid #333; color: #aaa; padding: 10px; border-radius: 4px; cursor: pointer; font-size: 11px; text-align: center; transition: 0.2s; } .ymh-eng-btn:hover { border-color: var(--ymh-theme); color: #fff; background: #222; } #ymh-res-p, #ymh-res-v { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 20px; } .ymh-res-item { height: 130px; background: #000; border-radius: 6px; overflow: hidden; position: relative; border: 2px solid #222; cursor: pointer; transition: 0.2s; } .ymh-res-item:hover { border-color: var(--ymh-theme); transform: scale(1.02); z-index: 2; } .ymh-res-item img, .ymh-res-item video { width: 100%; height: 100%; object-fit: cover; } #ymh-bar { position: fixed; bottom: 0; left: 0; width: 100%; height: 160px; background: #0f0f0f; border-top: 3px solid var(--ymh-theme); z-index: 2147483646; transform: translateY(100%); transition: transform 0.3s; display: flex; flex-direction: column; } #ymh-bar.visible { transform: translateY(0); } .ymh-bar-head { padding: 8px 20px; background: #000; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #222; } .ymh-gal-ctrl { display: flex; align-items: center; gap: 10px; } .ymh-select { background: #222; color: #fff; border: 1px solid #444; padding: 5px; border-radius: 4px; font-size: 11px; outline: none; } .ymh-icon-btn { cursor: pointer; font-size: 14px; padding: 4px; border-radius: 4px; background: #222; border: 1px solid #444; color: #ccc; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; } .ymh-icon-btn:hover { background: #444; color: #fff; } .btn-danger:hover { background: #D32F2F; border-color: #D32F2F; } .ymh-bar-list { flex-grow: 1; display: flex; gap: 12px; padding: 15px; overflow-x: auto; align-items: center; } .ymh-col-item { min-width: 150px; height: 90px; border: 1px solid #333; border-radius: 6px; overflow: hidden; position: relative; group; transition: 0.2s; } .ymh-col-item:hover { border-color: var(--ymh-theme); } .ymh-col-item img, .ymh-col-item video { width: 100%; height: 100%; object-fit: cover; } .ymh-col-overlay { position: absolute; top:0; left:0; width:100%; height:100%; background: rgba(0,0,0,0.85); backdrop-filter: blur(2px); display: none; flex-direction: column; justify-content: space-evenly; align-items: center; padding: 5px; box-sizing: border-box; } .ymh-col-item:hover .ymh-col-overlay { display: flex; } .ymh-btn-row { display: flex; gap: 5px; width: 100%; justify-content: center; } .ymh-mini-btn { font-size: 10px; font-weight: bold; padding: 6px; border-radius: 4px; border: 1px solid #555; background: #000; color: #fff; cursor: pointer; text-align: center; transition: 0.2s; text-transform: uppercase; } .ymh-mini-btn:hover { transform: scale(1.05); } .btn-dl { width: 90%; border-color: var(--ymh-theme); color: var(--ymh-theme); } .btn-dl:hover { background: var(--ymh-theme); color: #000; } .btn-google { flex: 1; border-color: #4285F4; color: #4285F4; } .btn-google:hover { background: #4285F4; color: #fff; } .btn-yandex { flex: 1; border-color: #FC3F1D; color: #FC3F1D; } .btn-yandex:hover { background: #FC3F1D; color: #fff; } .btn-rmv { width: 90%; border-color: #D32F2F; color: #D32F2F; } .btn-rmv:hover { background: #D32F2F; color: #fff; } #ymh-big-preview { position: fixed; bottom: 180px; left: 20px; width: 480px; height: 270px; background: #000; border: 3px solid var(--ymh-theme); box-shadow: 10px 10px 40px rgba(0,0,0,0.9); z-index: 2147483655; display: none; border-radius: 8px; overflow: hidden; } #ymh-big-preview img, #ymh-big-preview video, #ymh-big-preview iframe { width: 100%; height: 100%; object-fit: contain; background: #111; border:none; } /* TRIGGER BUTTON */ #ymh-trigger { position: fixed; bottom: 170px; right: 20px; width: 64px; height: 64px; background: rgba(18, 18, 18, 0.85); backdrop-filter: blur(10px); border: 2px solid var(--ymh-theme); border-radius: 50%; z-index: 2147483645; cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--ymh-theme); box-shadow: 0 8px 32px rgba(0,0,0,0.5); transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); } #ymh-trigger:hover { transform: scale(1.1) rotate(90deg); color: #000; background: var(--ymh-theme); box-shadow: 0 10px 40px var(--ymh-theme); border-color: #fff; } .ymh-loading { grid-column: span 2; text-align: center; color: #888; padding: 20px; font-size: 12px; } .ymh-hist-item { padding: 10px; border-bottom: 1px solid #333; cursor: pointer; color: #ccc; } .ymh-hist-item:hover { background: #222; } .ymh-badge { position: absolute; bottom: 0; left: 0; width: 100%; background: linear-gradient(to top, rgba(0,0,0,0.9), transparent); color: #fff; font-size: 9px; padding: 15px 5px 3px 5px; text-align: right; box-sizing: border-box; } .ymh-yt-menu { position: absolute; bottom: 35px; left: 5%; width: 90%; background: #111; border: 1px solid var(--ymh-theme); border-radius: 4px; z-index: 10; display: flex; flex-direction: column; box-shadow: 0 5px 15px rgba(0,0,0,0.9); } .ymh-yt-opt { padding: 6px; text-align: center; font-size: 10px; color: #ccc; cursor: pointer; border-bottom: 1px solid #333; text-transform: uppercase; font-weight: bold; } .ymh-yt-opt:last-child { border-bottom: none; } .ymh-yt-opt:hover { background: var(--ymh-theme); color: #000; } .ymh-invisible { display: none !important; } /* CONFIG & SUPPORT */ .ymh-copy-row { display:flex; gap:5px; margin-bottom:10px; align-items:center; } .ymh-copy-input { flex:1; background:#111; border:1px solid #333; color:#ccc; padding:8px; border-radius:4px; font-size:10px; font-family:monospace; } .ymh-copy-btn { background:#222; border:1px solid var(--ymh-theme); color:var(--ymh-theme); padding:8px 10px; cursor:pointer; border-radius:4px; font-weight:bold; font-size:10px; } .ymh-copy-btn:hover { background:var(--ymh-theme); color:#000; } .ymh-crypto-chip { background:#222; border:1px solid #333; padding:8px 10px; border-radius:4px; cursor:pointer; font-size:11px; color:#ccc; display:flex; justify-content:space-between; align-items:center; transition:0.2s; margin-bottom:6px; } .ymh-crypto-chip img { width:16px; height:16px; margin-right:8px; vertical-align:middle; } .ymh-crypto-chip:hover { border-color:var(--ymh-theme); color:#fff; background:#181818; } .ymh-paypal-btn { width:100%; background:#003087; color:#fff; padding:12px; border-radius:4px; border:none; font-weight:bold; cursor:pointer; display:flex; align-items:center; justify-content:center; gap:8px; margin-top:15px; text-transform:uppercase; font-size:12px; transition:0.2s; text-decoration:none; box-sizing:border-box; } .ymh-paypal-btn img { width:16px; height:16px; } .ymh-paypal-btn:hover { background:#0045c2; } .ymh-copyright { margin-top: auto; text-align: center; font-size: 9px; color: #555; padding: 20px 0; border-top: 1px solid #222; } .ymh-theme-grid { display:flex; gap:10px; margin-bottom:20px; } .ymh-theme-btn { width:40px; height:40px; border-radius:6px; cursor:pointer; border:2px solid #333; } .ymh-theme-btn.active { border-color:#fff; } .ymh-shortcut-row { display:flex; justify-content:space-between; border-bottom:1px solid #333; padding:10px 0; font-size:11px; color:#aaa; } .ymh-shortcut-key { color:var(--ymh-theme); font-weight:bold; font-family:monospace; } `; GM_addStyle(css); // --- 6. HTML INTERFACE --- // Apply visibility class immediately based on stored state const visibilityClass = state.isVisible ? '' : 'ymh-invisible'; const html = `
${t('sup_desc')}
${t('lbl_pix')}