diff --git a/src/components/misc/SelfScanMsg.tsx b/src/components/misc/SelfScanMsg.tsx new file mode 100644 index 0000000..2c4e3a1 --- /dev/null +++ b/src/components/misc/SelfScanMsg.tsx @@ -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 ( + + Self-Scan + {messages[Math.floor(Math.random() * messages.length)]} +
+ + But if you want to see how this site is built, why not check out + the source code? + +
+ Do me a favour, and drop the repo a Star while you're there 😉 +
+ ); +}; + +export default SelfScanMsg; diff --git a/src/pages/Results.tsx b/src/pages/Results.tsx index 4da11a3..1c27219 100644 --- a/src/pages/Results.tsx +++ b/src/pages/Results.tsx @@ -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 => { } - + { address?.includes(window?.location?.hostname || 'web-check.as93.net') && } { resultCardData.map(({ id, title, result, refresh, Component }, index: number) => (