Skip to content

Instantly share code, notes, and snippets.

@camille-hdl
Last active August 29, 2015 14:16
Show Gist options
  • Save camille-hdl/a4bae3e7b85fdb80ba18 to your computer and use it in GitHub Desktop.
Save camille-hdl/a4bae3e7b85fdb80ba18 to your computer and use it in GitHub Desktop.
ASCII kirby URL http://jsbin.com/haziyu
(function() {
if(!!window.history) {
var curHash = "";
var nextIndex = 0;
var setHash = function(str, title) {
curHash = str;
window.history.replaceState({}, title, '#'+str);
};
var states = ["(>°.°)>","(^°o°)^","<(°.°<)","^(°o°^)"];
var ms = 500;
var i = setInterval(function() {
if(typeof states[nextIndex] == "undefined") {
nextIndex = 0;
}
setHash(states[nextIndex]);
nextIndex++;
},ms);
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment