Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions aprilFools.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// 1. Install dotjs for Chrome:
// mac: https://github.com/defunkt/dotjs
// ubuntu: https://github.com/glenbot/dotjs-ubuntu
// windows: https://github.com/p3lim/dotjs-win
// 2. Change the `cssURL` variable to point to your own customized stylesheet
// 3. Copy this file as `default.js` in the .js directory
// 4. ???
// 5. PROFIT



// CHANGE THIS:
var cssURL = "https://raw.github.com/wesbos/aprilFools.css/master/aprilFools.css";




// only do this *on or after* April Fools 2013
if(new Date() > new Date(2013, 3, 1, 0, 0, 0, 0))

// alternative: only do this *on* April Fools day 2013
// var d = new Date();
// if(d.getFullYear() == 2013 && d.getMonth() == 3 && d.getDate() == 1)

{
var css = document.createElement("link");
css.setAttribute("rel", "stylesheet");
css.setAttribute("type", "text/css");
css.setAttribute("href", cssURL);
document.getElementsByTagName("head")[0].appendChild(css);
}
6 changes: 6 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,9 @@ Ubuntu (Chromium): `~/.config/chromium/Default/User StyleSheets/Custom.css`


## See them all in [aprilFools.css](https://github.com/wesbos/aprilFools.css/blob/master/aprilFools.css)

## aprilFools.js

[aprilFools.js](aprilFools.js) is a script to dynamically load `aprilFools.css` *on or after* April Fools day 2013.

You'll need to install [dotjs](https://github.com/defunkt/dotjs) to get this to work (there's no good javascript analog to `Custom.css`, thankfully). Then copy over the contents of [aprilFools.js](aprilFools.js) into it. Be sure to change the `cssURL` to a customized URL with enabled features.