From 1e4a9a99c6eb35bb333f6312d2dc63c23ed39630 Mon Sep 17 00:00:00 2001 From: Antonin Hildebrand Date: Wed, 14 Mar 2018 23:01:20 +0100 Subject: [PATCH] implant: add :scope-content scraper --- .../dirac/implant/automation/scrapers.cljs | 31 ++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/src/implant/dirac/implant/automation/scrapers.cljs b/src/implant/dirac/implant/automation/scrapers.cljs index 01e2121867..69071ce905 100644 --- a/src/implant/dirac/implant/automation/scrapers.cljs +++ b/src/implant/dirac/implant/automation/scrapers.cljs @@ -4,7 +4,6 @@ [chromex.logging :refer-macros [log warn error info]] [cljs.core.async :refer [put! " + value)] + (str name ": " display-value))) + ; -- suggest box UI (code completions) -------------------------------------------------------------------------------------- (defn find-suggest-box-element [] @@ -196,6 +215,16 @@ (map print-callstack-location) (print-list))) +(defmethod scrape :scope-content [_ & _] + (safe->> (find-scope-section-elements) + (first) + (build-rep) + (select-subreps interesting-scope-tree-item-rep?) + (partition-all 2) + (map extract-scope-info) + (print-list) + )) + (defmethod scrape :suggest-box [_ & _] (if-let [suggest-box-el (find-suggest-box-element)] (safe->> suggest-box-el