   the result."
   [url]
   (if (not-empty url)
-    (let [element   (-> (dommy/create-element :a)
-                        (dommy/set-attr! :href url))
+    (let [element (-> (dommy/create-element :a)
+                      (dommy/set-attr! :href url))
           shortened (str (.toLowerCase (.-host element)) (.-pathname element) (.-search element))]
       (hash-string shortened))
     0))

  (when url
    (-> (dommy/create-element :a)
        (dommy/set-attr! :href url)
        (.-protocol))))

(defn is-http?
  "Returns true if the string starts with http: or https:"

  (when url
    (-> (dommy/create-element :a)
        (dommy/set-attr! :href url)
        (.-hostname)
        (lower-case))))

(defn protocol
  "Returns the protocol for a URL"
