Skip to content

Instantly share code, notes, and snippets.

@psyomn
Created May 24, 2013 14:32
Show Gist options
  • Select an option

  • Save psyomn/5643926 to your computer and use it in GitHub Desktop.

Select an option

Save psyomn/5643926 to your computer and use it in GitHub Desktop.
Adds random eerie strings when browsing with Chrome. It was crudely made to scare a friend of mine.
// ==UserScript==
// @name Induced Paranoia
// @description They're out to get you.
// @version 1.0
// ==/UserScript==
(function ()
{
var phrases = [
"They're watching you"
, "go away"
, "get off"
, "aAWAsadm,12-9j#"
, "we know your every step."
, "They're going to get you"
, "why are you here?"
, "you should not be here"
, "wake up"
, "this is a dream"
, "you're in a coma"
, "this is not real"
, "don't you remember?"
];
/* All the documents */
var elements = document.all;
/* The total number of elements */
var elements_length = document.all.length;
/* For looping */
var i;
for (i=0; i<elements_length; ++i){
/* No children? */
if (elements[i].childNodes.length == 0 ){
if (Math.floor(Math.random()*100) >= 90){
elements[i].innerHTML = phrases[Math.floor(Math.random()*phrases.length)];
}
}
}
}());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment