Skip to content

Instantly share code, notes, and snippets.

@pyr
Last active August 29, 2015 14:16
Show Gist options
  • Save pyr/42a74159735a1a5ecea0 to your computer and use it in GitHub Desktop.
Save pyr/42a74159735a1a5ecea0 to your computer and use it in GitHub Desktop.
URL animations
(ns tableflip.core
(:require-macros [cljs.core.async.macros :refer [go]])
(:require [cljs.core.async :refer [timeout <!]]))
(go
(loop [[cur & next] (cycle ["┬─┬ノ( º _ ºノ)"
"(╯°□°)╯︵ ┻━┻"
"(╯°□°)╯ ┬─┬"
"(╯°□°)╯ ┻━┻"
"(╯°□°)╯ ┬─┬"
"(╯°□°)╯ ┻━┻"])]
(.replaceState js/window.history #js {} "" (str "/#" cur))
(<! (timeout 1000))
(recur next)))
(defproject tableflip "0.1.0"
:dependencies [[org.clojure/clojure "1.6.0"]
[org.clojure/clojurescript "0.0-2913"]
[org.clojure/core.async "0.1.346.0-17112a-alpha"]]
:plugins [[lein-cljsbuild "1.0.4"]]
:source-paths ["src"]
:cljsbuild {
:builds [{:id "cuteworld"
:source-paths ["src"]
:compiler {:main tableflip.core
:output-to "app.js"
:output-dir "out"
:optimizations :none
:source-map true}}]})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment