mirror of
https://github.com/Lissy93/web-check.git
synced 2025-05-28 14:17:54 +02:00
Display lil message when user scans this site
This commit is contained in:
parent
5f7b20626d
commit
77b8feb435
49
src/components/misc/SelfScanMsg.tsx
Normal file
49
src/components/misc/SelfScanMsg.tsx
Normal file
@ -0,0 +1,49 @@
|
||||
|
||||
import styled from 'styled-components';
|
||||
import colors from 'styles/colors';
|
||||
import { StyledCard } from 'components/Form/Card';
|
||||
|
||||
const StyledSelfScanMsg = styled(StyledCard)`
|
||||
margin: 0px auto 1rem;
|
||||
width: 95vw;
|
||||
a { color: ${colors.primary}; }
|
||||
b { font-weight: extra-bold; }
|
||||
span, i { opacity: 0.85; }
|
||||
img {
|
||||
width: 5rem;
|
||||
float: right;
|
||||
border-radius: 4px;
|
||||
}
|
||||
`;
|
||||
|
||||
const messages = [
|
||||
'Nice try! But scanning this app is like trying to tickle yourself. It just doesn\'t work!',
|
||||
'Recursive scanning detected. The universe might implode...or it might not. But let\'s not try to find out.',
|
||||
'Hey, stop checking us out! We\'re blushing... 😉',
|
||||
'Hmmm, scanning us, are you? We feel so special!',
|
||||
'Alert! Mirror scanning detected. Trust us, we\'re looking good 😉',
|
||||
'We\'re flattered you\'re trying to scan us, but we can\'t tickle ourselves!',
|
||||
'Oh, inspecting the inspector, aren\'t we? Inception much?',
|
||||
'Just a second...wait a minute...you\'re scanning us?! Well, that\'s an interesting twist!',
|
||||
'Scanning us? It\'s like asking a mirror to reflect on itself.',
|
||||
'Well, this is awkward... like a dog chasing its own tail!',
|
||||
'Ah, I see you\'re scanning this site... But alas, this did not cause an infinite recursive loop (this time)',
|
||||
];
|
||||
|
||||
const SelfScanMsg = () => {
|
||||
return (
|
||||
<StyledSelfScanMsg>
|
||||
<img src="https://i.ibb.co/0tQbCPJ/test2.png" alt="Self-Scan" />
|
||||
<b>{messages[Math.floor(Math.random() * messages.length)]}</b>
|
||||
<br />
|
||||
<span>
|
||||
But if you want to see how this site is built, why not check out
|
||||
the <a href='https://github.com/lissy93/web-check'>source code</a>?
|
||||
</span>
|
||||
<br />
|
||||
<i>Do me a favour, and drop the repo a Star while you're there</i> 😉
|
||||
</StyledSelfScanMsg>
|
||||
);
|
||||
};
|
||||
|
||||
export default SelfScanMsg;
|
@ -5,7 +5,6 @@ import { ToastContainer } from 'react-toastify';
|
||||
|
||||
import colors from 'styles/colors';
|
||||
import Heading from 'components/Form/Heading';
|
||||
import Card from 'components/Form/Card';
|
||||
import Modal from 'components/Form/Modal';
|
||||
import Footer from 'components/misc/Footer';
|
||||
import Nav from 'components/Form/Nav';
|
||||
@ -34,6 +33,7 @@ import TraceRouteCard from 'components/Results/TraceRoute';
|
||||
import CarbonFootprintCard from 'components/Results/CarbonFootprint';
|
||||
import SiteFeaturesCard from 'components/Results/SiteFeatures';
|
||||
import DnsSecCard from 'components/Results/DnsSec';
|
||||
import SelfScanMsg from 'components/misc/SelfScanMsg';
|
||||
|
||||
import ProgressBar, { LoadingJob, LoadingState, initialJobs } from 'components/misc/ProgressBar';
|
||||
import ActionButtons from 'components/misc/ActionButtons';
|
||||
@ -462,7 +462,7 @@ const Results = (): JSX.Element => {
|
||||
}
|
||||
</Nav>
|
||||
<ProgressBar loadStatus={loadingJobs} showModal={showErrorModal} showJobDocs={showInfo} />
|
||||
|
||||
{ address?.includes(window?.location?.hostname || 'web-check.as93.net') && <SelfScanMsg />}
|
||||
<ResultsContent>
|
||||
{
|
||||
resultCardData.map(({ id, title, result, refresh, Component }, index: number) => (
|
||||
|
Loading…
x
Reference in New Issue
Block a user