0

There is this site, which shows some statistical user data, and it creates a HTML5 graph, based on a JSON response that it receives from the server.

I have manually examined the JSON response from the server, and it looks like the following:

{  
  "points":[  
  {  
     "date":"2019-07-29",
     "num":"4443"
  },
  {  
     "date":"2019-07-28",
     "num":"4596"
  },
  {  
     "date":"2019-07-27",
     "num":"5125"
  }
  ]
}

I would like to "download" this JSON response, and format it in a special way, but I can't make external requests to the endpoint (from an external application)

I would like to do it all, while being on the site.

Would it be possible to "inject" a javascript that would do this, or build a Chrome Extension that is able to read this response, and format it in the way that it's required?

Additionally, is there a way to "extend" the Developer Tools, with a little snippet, that would just format this data in a different way?

(If possible, I would like to do as few clicks as possible, to achieve this)

Laureant
  • 979
  • 3
  • 18
  • 47
  • 1
    chrome web extension would be the way to go in your case – Jaromanda X Jul 31 '19 at 09:28
  • 1
    Your extension should have a content script that inserts a ` – wOxxOm Jul 31 '19 at 09:29
  • @wOxxOm The last thing you mentioned sounds really good. So I just basically run a code in the DevTools console, that intercepts the response, and creates a file, or an alternative print? Or I can actually have a tab in the DevTools which is a little bit more elegant? – Laureant Jul 31 '19 at 10:22
  • 1) To have a tab in devtools you need an extension. 2) The snippets thingy is [this](https://developers.google.com/web/tools/chrome-devtools/javascript/snippets). – wOxxOm Jul 31 '19 at 11:22

0 Answers0