 ;; CSS reloading
 
 (defn current-links []
-  (.call (.. js/Array -prototype -slice) (.getElementsByTagName js/document "link")))
+  (.call (.. js/Array -prototype -slice)
+         (.getElementsByTagName js/document "link")))
 
 (defn truncate-url [url]
   (-> (first (string/split url #"\?")) 

    (or (= file trunc-href)
        (= (truncate-url request-url) trunc-href))))

#_(defn matches-file-new? [{:keys [file] } link-href]
    (.endsWith goog.string file (truncate-url link-href)))

(defn get-correct-link [f-data]
  (some (fn [l]
          (when (matches-file? f-data (.-href l)) l))
        (current-links)))

(defn clone-link [link url]
  (let [clone (.createElement js/document "link")]

  (go
   (<! (timeout 100))
   (on-cssload (:files files-msg))))
