   (let [enabled? (= state "new")
         other-state (if enabled? "all" "new")
         to-enable (dom/getElement (str "gitique-show-" state))
-        to-disable (dom/getElement (str "gitique-show-" other-state))
-        wrapper (dom/getElement "js-repo-pjax-container")]
+        to-disable (dom/getElement (str "gitique-show-" other-state))]
     (.add (.-classList to-enable) "selected")
     (.remove (.-classList to-disable) "selected")
     (if (= state "new")
-      (.add (.-classList wrapper) "gitique-enabled")
-      (.remove (.-classList wrapper) "gitique-enabled"))
+      (.add (.-classList pjax-wrapper) "gitique-enabled")
+      (.remove (.-classList pjax-wrapper) "gitique-enabled"))
     (update-overall!)))
 
 (defn- add-button! []

(def token-key "gitique.github_access_token")
(def state (atom {:selected-commits '()
                  :current-pr nil}))

(declare add-icons! get-new-commits! update-icons!)
(declare log maybe-show-new)

    (swap! state assoc :current-pr current-pr)))

(defn ^:export watch []
  (let [is-valid-mutation? #(and (= (.-type %) "childList") (not-empty (.-addedNodes %)))
        observer (js/MutationObserver. #(when (some is-valid-mutation? %) (main)))]
    (.observe observer pjax-wrapper #js{:childList true :attributes false :characterData false})
    (main)))
