Home > Blockchain >  What does this script do exactly?
What does this script do exactly?

Time:12-05

So I have been trying to understand how https://rblx.trade/catalog/deals (a site that tracks roblox's catalog in real time and communicates changes to the client) communicates with the client. For this I have been inspecting the site and saw this script which I assume is the one that communicates new data to the client.

<script id="__NEXT_DATA__" type="application/json">
                {
                  "props":{
                    "pageProps":{
                      "title":"Roblox Catalog Deals","meta":{"description":"Get the best deals and snipes on Roblox limited items with our deals page! Also turn on notifications to get notified immediately whenever an item gets put up for sale for a cheap price on the Roblox catalog!"}
                      },
                      "__N_SSG":true},
                      "page":"/catalog/deals","query":{},"buildId":"WlqGtyKoC3mZ3T4hTYU5G","runtimeConfig":{
                      "isStaging":false,"api":{"url":"https://rblx.trade","proxyFrontend":false},"sentry":{"dsn":"https://[email protected]/3","tracesSampleRate":0.01}
                      },"isFallback":false,"gsp":true,"scriptLoader":[]
                }
    </script>

The problem is do not know how what it does and how it works as I do not know javascript. I searched somewhat how the script type works and what dns means, but thats it. Any help understanding what this scripts does would be wonderful

CodePudding user response:

This is not completely Javascript, as you can see in the type type="application/json" its JSON, JSON is a notation to write objects in javascript. The script does not do anything by its own, just define a structure of information. Probably the logic that uses this information is somewhere else

  • Related