diff --git a/src/main/lemondronor/circlebot/adsbx.cljs b/src/main/lemondronor/circlebot/adsbx.cljs index fa5ac96..fd6aab8 100644 --- a/src/main/lemondronor/circlebot/adsbx.cljs +++ b/src/main/lemondronor/circlebot/adsbx.cljs @@ -40,6 +40,15 @@ (/ (.getTime (js/Date.)) 1000)) +(defn delete-node [page selector] + (.evaluate + page + (fn [selector] + (let [node (.querySelector js/document selector)] + (.removeChild (.-parentNode node) node))) + selector)) + + (defn screenshot-aircraft ([icao lat lon] (screenshot-aircraft icao lat lon {})) @@ -70,6 +79,7 @@ url (clj->js {:referer "https://adsbexchange.com/"}))])) (timeout 3000) + (delete-node page "#adsense") (p/all [(.type (.-keyboard page) "l") (timeout 1000)]) (let [path (get options :output-path (str "screenshot-"