Created
November 28, 2014 00:25
-
-
Save defndaines/b740d8ffa9c2b5a521e8 to your computer and use it in GitHub Desktop.
next-link Function for Light Table
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn- next-link [dom] | |
; Single page wishlists will not have the element at all. | |
(if-let [a-last (first (html/select dom [:#wishlistPagination :li.a-last]))] | |
; The last page will not have a link, just text. | |
(if-let [nxt (-> a-last :content first :attrs)] | |
(az-link (:href nxt))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment