diff --git a/README.md b/README.md index 4e530dc..c7730cf 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,10 @@ # pushy -[![Build Status](https://travis-ci.org/kibu-australia/pushy.svg?branch=master)](https://travis-ci.org/kibu-australia/pushy) A Clojurescript library for quick and easy HTML5 pushState. ## Install -[![Clojars Project](http://clojars.org/kibu/pushy/latest-version.svg)](http://clojars.org/kibu/pushy) +[![Clojars Project](http://clojars.org/sparrho/pushy/latest-version.svg)](http://clojars.org/sparrho/pushy) ## Usage diff --git a/project.clj b/project.clj index 21d71bf..0ff74cd 100644 --- a/project.clj +++ b/project.clj @@ -1,6 +1,6 @@ -(defproject kibu/pushy "0.3.8" - :description "HTML5 pushState for Clojurescript" - :url "https://github.com/kibu-australia/pushy" +(defproject sparrho/pushy "0.3.10" + :description "HTML5 pushState for Clojurescript (Sparrho fork)" + :url "https://github.com/Sparrho/pushy" :license {:name "Eclipse Public License" :url "http://www.eclipse.org/legal/epl-v10.html"} diff --git a/src/pushy/core.cljs b/src/pushy/core.cljs index 10c0d17..e11c388 100644 --- a/src/pushy/core.cljs +++ b/src/pushy/core.cljs @@ -19,7 +19,7 @@ (defn- set-retrieve-token! [t] (set! (.. t -retrieveToken) (fn [path-prefix location] - (str (.-pathname location) (.-search location)))) + (str (.-pathname location) (.-search location) (.-fragment location)))) t) (defn- set-create-url! [t] @@ -49,9 +49,12 @@ (defn- get-token-from-uri [uri] (let [path (.getPath uri) - query (.getQuery uri)] + query (.getQuery uri) + fragment (.getFragment uri)] ;; Include query string in token - (if (empty? query) path (str path "?" query)))) + (cond-> path + (seq query) (str "?" query) + (seq fragment) (str "#" fragment)))) (defn pushy "Takes in three functions: