SCP is basically a collection of internet horror stories, presented as an information file written by a fictional top- secret organization known as the S.C.P. Foundation, which stands for Secure, Contain, Protect. The subjects of these files; most often being anomalous/physics-defying creatures, artifacts, or places; are commonly known simply as S.C.P.'s.
A Cognitohazard is a common trope within these stories in which mere knowledge of the anomaly is harmful or dangerous in some way.
The SCP Wiki presents a really fun rabbit hole if you feel like delving into it/ have the time to spare. While there is no single, central canon connecting everything, you'll find that multiple files and tales are connected via cohesive, or at the very least, entertaining storylines. While I haven't kept up with it in a long time, I have fond memories of when I did.
Lol I suppose that's one way you could put it. It really is just one big community art project, and a large chunk of the appeal comes from seeing the crazy stuff people can come up with.
You don't have to do all of them... Some coverage is better than nothing. If youre going to link to a regex101 page of examples like the above poster, you could just loop through and verify matches on those same examples.
But wouldn't a simple media query for screen size accurately accommodate like 99% of devices, anyway? Phones and tablets usually have significantly smaller resolutions than PCs.
105
u/Voltra_Neo Mar 01 '22
Given what y'all do with this, I might as well publish my browser "detector" on npm
94
u/Mancobbler Mar 01 '22
At this point if I include any regex in my code, I also include a link to regex101.com with a bunch of examples of what it’s supposed to match.
48
u/nekokattt Mar 01 '22
Code like this is why everyone is shitting themselves that chrome and firefox changing from v99 to v100 is going to break loads of stuff.
29
u/pavilionhp_ learning from the best Mar 01 '22
This is from detectmobilebrowsers.com and is available in multiple other languages if you’d all like to know
23
u/RichCorinthian Mar 01 '22
It's OK, I'm sure there's a whole suite of unit tests to make sure it's correct and to prevent problems if you ever need to maintain or expand it. /s
4
u/RyanNerd shameless Mar 01 '22
The poor human transcriber. Smh.
3
u/Budgiebrain222 Mar 01 '22
This is that regex stuff?
3
u/Lich_Hegemon Mar 02 '22
Regex was a mistake
2
u/ftgander Mar 01 '22
I love Regex but this is too far
2
u/tills1993 Mar 02 '22
What the hell is the point of the iife here? Everything is already scoped to isMobile.
2
u/[deleted] Mar 02 '22
// @ts-ignore
2
u/LeagueJunior9782 Mar 09 '22
this isn't normal regex, this is advanced regex!
Now excuse me, i think my eyes bleed.
44
u/[deleted] Mar 01 '22
[removed] — view removed comment
21
u/[deleted] Mar 01 '22
[removed] — view removed comment