http://qiita.com/advent-calendar/2014/javascript