// ==UserScript==
// @name Privacy Media Downloader
// @namespace http://tampermonkey.net/
// @version 1.0
// @description Painel com detecção de vídeos do Privacy
// @author Você
// @match *://*.privacy.com.br/*
// @connect privacy.com.br
// @connect *
// @grant GM_setClipboard
// @grant GM_addStyle
// ==/UserScript==
(function() {
'use strict';
GM_addStyle(`
#ultra-media-panel {
position: fixed; top: 15px; right: 15px; width: 360px; max-height: 85vh;
background: #0a0a0a; color: #00ffcc; z-index: 9999999; border: 1px solid #00ffcc;
padding: 15px; border-radius: 12px; overflow-y: auto; font-family: sans-serif;
box-shadow: 0 0 30px rgba(0, 255, 204, 0.5); border-top: 5px solid #00ffcc;
display: none; transition: all 0.3s ease;
}
#ultra-minimized-btn {
position: fixed; top: 15px; right: 15px; width: 45px; height: 45px;
background: #00ffcc; color: #000; z-index: 10000000; border-radius: 50%;
display: none; align-items: center; justify-content: center;
cursor: pointer; font-weight: bold; font-size: 20px;
box-shadow: 0 0 15px rgba(0, 255, 204, 0.6);
}
.panel-header {
display: flex; justify-content: space-between; align-items: center;
margin-bottom: 10px; border-bottom: 1px solid #222; padding-bottom: 8px;
}
.minimize-btn {
cursor: pointer; font-size: 20px; color: #00ffcc; font-weight: bold;
padding: 0 5px; line-height: 10px;
}
.media-item {
background: #141414; margin-bottom: 12px; padding: 12px; border-radius: 8px;
border: 1px solid #222; display: flex; flex-direction: column; gap: 8px;
}
.media-header { display: flex; align-items: center; gap: 12px; }
.media-preview {
width: 70px; height: 70px; border-radius: 6px; object-fit: cover;
border: 1px solid #00ffcc; background: #000; flex-shrink: 0;
}
.media-body { flex: 1; overflow: hidden; }
.type-badge {
font-size: 9px; background: #00ffcc; color: #000; padding: 2px 6px;
border-radius: 3px; font-weight: bold; text-transform: uppercase;
}
.badge-img { background: #ff00cc; color: #fff; }
.action-btn {
background: #222; border: 1px solid #444; color: #fff; padding: 10px;
cursor: pointer; border-radius: 5px; width: 100%; font-size: 11px;
font-weight: bold; text-transform: uppercase; transition: 0.3s;
}
.action-btn:hover { background: #00ffcc; color: #000; border-color: #00ffcc; }
.media-info { font-size: 10px; color: #aaa; word-break: break-all; margin-top: 5px; }
`);
const detectedMedia = new Map();
// Criar Painel Principal
const panel = document.createElement('div');
panel.id = 'ultra-media-panel';
panel.innerHTML = `
💎 MEDIA HUB
_
`;
document.body.appendChild(panel);
// Criar Botão Minimizado (Flutuante)
const minBtn = document.createElement('div');
minBtn.id = 'ultra-minimized-btn';
minBtn.innerHTML = '🎬';
minBtn.title = "Abrir Media Finder";
document.body.appendChild(minBtn);
// Eventos de Minimizar/Maximizar
minBtn.onclick = () => {
minBtn.style.display = 'none';
panel.style.display = 'block';
};
panel.querySelector('#hide-panel-btn').onclick = () => {
panel.style.display = 'none';
minBtn.style.display = 'flex';
};
const updateUI = () => {
const container = panel.querySelector('#media-list-container');
container.innerHTML = '';
detectedMedia.forEach((data, id) => {
const item = document.createElement('div');
item.className = 'media-item';
const isImg = data.type === 'IMAGE';
const previewHtml = isImg ? `[IMG]${data.url}[/IMG]` : `
🎬
`;
item.innerHTML = `
${previewHtml}
${data.type}
${data.name}
${isImg ? '📥 BAIXAR IMAGEM' : '🚀 ABRIR NO PLAYER'}
`;
item.querySelector('button').onclick = () => {
if (isImg) {
window.open(data.url, '_blank');
} else {
window.open(`https://m3u8-player.net/?url=${encodeURIComponent(data.url)}`, '_blank');
}
};
container.appendChild(item);
});
// Só mostra o painel automaticamente na primeira detecção se não estiver minimizado
if (detectedMedia.size > 0 && minBtn.style.display !== 'flex') {
panel.style.display = 'block';
}
};
const addMedia = (url, type) => {
if (!url || url.includes('.ts')) return;
let fileName = "";
let baseId = "";
if (type === 'IMAGE') {
try {
if (url.includes('eyJidWNrZXQi')) {
const *We dont do base 64 codes here*Part = url.split('/').pop();
const decoded = atob(*We dont do base 64 codes here*Part);
fileName = decoded.match(/--([^"]+)\.(jpe?g|png|webp)/i)?.[1] || "imagem_privacy";
baseId = decoded.match(/[a-f0-9-]{36}/i)?.[0] || url;
} else {
fileName = url.split('/').pop().split('?')[0];
baseId = url;
}
} catch(e) { fileName = "img_detectada"; baseId = url; }
if (url.includes('avatar') || url.includes('profile')) return;
} else {
fileName = url.split('/').pop().split('?')[0];
baseId = fileName.substring(0, 30);
const existing = detectedMedia.get(baseId);
if (existing && existing.url.length >= url.length) return;
}
if (detectedMedia.has(baseId) && type === 'IMAGE') return;
detectedMedia.set(baseId, { url, name: fileName, type });
updateUI();
};
const scan = () => {
document.querySelectorAll('video, source, a[href*=".m3u8"]').forEach(el => {
const src = el.src || el.currentSrc || el.href;
if (src) addMedia(src, 'VIDEO');
});
document.querySelectorAll('img').forEach(img => {
if (img.src && (img.src.includes('privacy.com.br') || img.src.match(/\.(jpg|jpeg|png|webp)/i))) {
if (img.naturalWidth > 200 || img.src.includes('eyJidWNrZXQi')) addMedia(img.src, 'IMAGE');
}
});
};
// Hooks de Rede
const open = XMLHttpRequest.prototype.open;
XMLHttpRequest.prototype.open = function() {
this.addEventListener('load', () => {
const url = this.responseURL;
if (url.includes('.m3u8')) addMedia(url, 'VIDEO');
if (url.includes('image.privacy.com.br')) addMedia(url, 'IMAGE');
});
open.apply(this, arguments);
};
const observer = new MutationObserver(scan);
observer.observe(document.body, { childList: true, subtree: true });
setInterval(scan, 4000);
scan();
})();