-
-
Save josuebasurto/4963190 to your computer and use it in GitHub Desktop.
Thanks to Uri Shaked (https://gist.github.com/urish) Valentine's Day Message on Google - Open the attached file, copy all the text from it (or get it here)
- Go to http://www.google.com/ in Google Chrome, press Ctrl+Shift+J (or on Mac ⌥⌘J).
- Paste the text you copied in step 1 into the console Window
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Copyright (C) 2013, Uri Shaked, GDG Tel-Aviv Lead. */ | |
/* | |
- Open the attached file, copy all the text from it (or get it here) | |
- Go to http://www.google.com/ in Google Chrome, press Ctrl+Shift+J (or on Mac ⌥⌘J). | |
- Paste the text you copied in step 1 into the console Window | |
*/ | |
var jq = document.createElement("script"); | |
jq.setAttribute("src", "https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"); | |
jq.setAttribute("type", "text/javascript"); | |
jq.onload = function () { | |
$ = jQuery; | |
function e(e, t) { | |
return e + Math.random() * (t - e) | |
} | |
function t(t) { | |
var n = "☺♥☼ GDG Tijuana"; | |
var r = { | |
position: "absolute", | |
top: 0, | |
color: "hsl(" + Math.ceil(e(340, 360)) + ", 100%, " + e(30, 70) + "%)", | |
left: e(0, t.width()) + "px", | |
opacity: 1, | |
"z-index": 50, | |
"font-size": e(16, 42) + "px" | |
}; | |
var i = $("<div />").css(r).html(n).appendTo(t).fadeIn("fast"); | |
var s = i.outerHeight(true); | |
i.animate({ | |
top: t.height() - s + "px", | |
opacity: 0 | |
}, 6e3, "linear", function () { | |
i.fadeOut("fast", function () { | |
i.remove() | |
}) | |
}) | |
} | |
$(function () { | |
setInterval(function () { | |
t($("body")) | |
}, 100) | |
}) | |
}; | |
document.getElementsByTagName("head")[0].appendChild(jq); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment