import React from 'react'; import ReactDOM from 'react-dom'; import { useEmitter } from '../../util'; import { getMemory } from '../../memory'; browser.browserAction.setBadgeBackgroundColor({ color: '#ffb900' }); async function getCurrentTab() { const [tab] = await browser.tabs.query({ active: true, windowId: browser.windows.WINDOW_ID_CURRENT, }); return tab; } import './../../styles/global.scss'; import './toolbar.scss'; const Toolbar = () => { const [origin, setOrigin] = React.useState(null); const [minValueLength, setMinValueLength] = React.useState( localStorage.getItem('minValueLength') === null ? 7 : (localStorage.getItem('minValueLength') as unknown as number) ); const [cookiesOnly, setCookiesOnly] = React.useState(false); const [stolenDataView, setStolenDataView] = React.useState(true); const [cookiesOrOriginOnly, setCookiesOrOriginOnly] = React.useState(false); const [eventCounts, setEventCounts] = useEmitter(getMemory()); const [marksOccurrence, setMarksOccurrence] = React.useState(false); const [warningDataDialogAck, setWarningDataDialogAck] = React.useState( localStorage.getItem('warningDataDialogAck') === null ? true : localStorage.getItem('warningDataDialogAck') == 'true' ? true : false ); const [logoVisibility, setLogoVisibility] = React.useState( localStorage.getItem('logoVisibility') === null ? false : localStorage.getItem('logoVisibility') == 'true' ? true : false ); React.useEffect(() => { const listener = async () => { console.log('tab change!'); const tab = await getCurrentTab(); const url = new URL(tab.url); if (url.origin.startsWith('moz-extension')) { return; } setOrigin(url.origin); }; browser.tabs.onUpdated.addListener(listener); listener(); return () => { browser.tabs.onUpdated.removeListener(listener); }; }); React.useEffect(() => { for (const cluster of Object.values(getMemory().getClustersForOrigin(origin))) { if (cluster.hasMarks()) { return setMarksOccurrence(true); } } return setMarksOccurrence(false); }, [eventCounts['*'], origin]); return (
{origin ? ( <> Analiza strony {origin} ) : ( Przejdź do wybranej strony internetowej )}
{stolenDataView ? ( ) : ( )}
12
21
33

Liczba wykrytych domen podmiotów trzecich

Strona wp.pl wysłała informacje o części Twojej historii przeglądania do facebook.com, adnsx.com (i 43 innych).

Dokonała też zapisu i odczytu plików Cookie dla domen doubleclick.google.net, 3dsio.com (i 59 innych).

Takie przetwarzanie danych może być niezgodne z prawem. Kliknij w przycisk Generuj raport, aby pomóc ustalić, czy ta strona nie narusza RODO.
Pokaż szczegóły
); }; ReactDOM.render(, document.getElementById('toolbar'));