CSS Perverts
Published in

CSS Perverts

the nsa is reading all of your social security numbers RIGHT NOW

Hide Your Deepest Darkest Secrets From the NSA

using jQuery

The National Science Agency has been collecting all of our information on Facebook and it’s a real problem. My dad is scared, my sister only wants to communicate via the more secure “snail mail,” and I’m having a hard time blogging about my personal life because I’m afraid that those details would end up in the wrong hands.

It’s a good thing I can jQuery.

The secret to hiding your secrets from the NSA is first asking if they are NSA. We voted on this government, so it is not allowed to lie to us. What we are going to do is ask if the user is NSA and hide our secrets if that is the case. If they are not NSA, then we should let them read our secrets because that’s why Sir Glenn Berners-Danzig built the World Wide Web. If there is anyone who cares more about American rights and secrets, it is him.

So let’s say we have an HTML document that contains our secrets. We also want to add a message for NSA so that they know they’re not allowed to view our secrets.

<!-- message to NSA —->
<div id=”nsa”>
<h1>No, NSA!</h1>
<h3>You won’t be reading MY secrets today!</h3>
</div>
<!-— my secrets —->
<div id=”secrets”>
<h1>My deepest darkest secrets</h1>
<h3>by Jenn Schiffer</h3>

<p>Here are some of my deepest darkest secrets. I sure hope the NSA isn’t reading this!</p>

<ul>
<li>example of a secret</li>
<li>another example of a secret I have</li>
</ul>
</div>

So we want to do the following when a user comes to this page:

  1. Hide everything initially
  2. Allow the user to confirm that they are NSA or not
  3. Show only the message to the NSA if they are NSA, or show my secrets if they are not NSA

Fortunately for us, jQuery has two functions built solely for hiding and showing secrets: hide() and show(). Here is the code for performing our three tasks:

$(function(){

// hide everything initially
$(‘div’).hide();
// Allow the user to confirm their NSA status
var areYouNSA = window.confirm(‘Click OK if you are NSA.’);
// show content based on areYouNSA answer
if ( areYouNSA ) {
// they are NSA, so show them NSA message
$(‘#nsa’).show();
}
else {
// they are not NSA, so show them the secrets
$(‘#secrets’).show();
}
})();

This is just one of many ways to protect your deepest darkest secrets from NSA. My fellow CSS Pervert, Nick, will probably tell you that this is all bullshit and that you’re an idiot if you think this will hide your info from anyone, and he is right.

Click here for the live demo.

Jenn Schiffer is the award-winning body double of both LeBron James and Mark Zuckerberg, and a woman in technology.

--

--

The most important articles about code and technology you’ll ever read.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store