import React, { Fragment } from 'react'; import { getMemory } from '../memory'; import { StolenDataEntry } from '../stolen-data-entry'; import { maskString, useEmitter } from '../util'; import CookieIcon from '../assets/icons/cookie.svg'; import WarningIcon from '../assets/icons/warning.svg'; import './stolen-data-cluster.scss'; const MAX_STRING_VALUE_LENGTH = 100; function StolenDataValue({ entry, refresh, }: { entry: StolenDataEntry; refresh: Function; prefixKey?: string; }) { const [version] = useEmitter(entry); let body = null; if (!entry.value) { body = <>; } else { body = (
{maskString(entry.value, 1, MAX_STRING_VALUE_LENGTH)}
); } return ( { entry.toggleMark(); refresh(); e.stopPropagation(); }} title={maskString(entry.value, 1, MAX_STRING_VALUE_LENGTH)} // style={{ color: entry.isMarked ? 'black' : 'gray' }} > {body} ); } function StolenDataRow({ entry, refresh, }: { entry: StolenDataEntry; refresh: Function; }) { const [version] = useEmitter(entry); return ( { entry.toggleMark(); refresh(); }} /> { entry.toggleMark(); refresh(); }} > {entry.name} {entry.source === 'cookie' ? ( ) : entry.request.hasCookie() ? ( ) : null} {entry.exposesOrigin() ? ( ) : entry.request.exposesOrigin() ? ( ) : null} {/* */} ); } export default function StolenDataCluster({ origin, shorthost, minValueLength, refresh, cookiesOnly, cookiesOrOriginOnly, }: { origin: string; shorthost: string; refreshToken: number; minValueLength: number; refresh: Function; cookiesOnly: boolean; cookiesOrOriginOnly: boolean; }) { const cluster = getMemory().getClustersForOrigin(origin)[shorthost]; const fullHosts = cluster.getFullHosts(); return (
{cluster.id}
{fullHosts.map((host, index) => ( {host}{' '} {`${fullHosts.length - 1 !== index ? '· ' : ''}`} ))}
{cluster .calculateRepresentativeStolenData({ minValueLength, cookiesOnly, cookiesOrOriginOnly, }) .map((entry) => ( ))}
Znalezione ustawienia:
//
//

// {cluster.id}{' '} // {cluster.hasCookies() ? '🍪' : ''} x{cluster.requests.length}{' '} // {/* getMemory().removeCookiesFor(origin, shorthost)} // * > // * Wyczyść cookiesy // * */} // { // cluster.autoMark(); // refresh(); // e.preventDefault(); // }} // > // Zaznacz auto // //

//
// {cluster.getFullHosts().map((host) => ( // // {host},{' '} // // ))} //
// // // {cluster // .calculateRepresentativeStolenData({ // minValueLength, // cookiesOnly, // cookiesOrOriginOnly, // }) // .map((entry) => ( // // ))} // //
//
); }