This gist works on the following page http://support.vanmoof.com/
The code is used, in this case, to count the total number of topics there are on this support page.
The basic idea is to first get the elements whose text you are interested in. https://developers.google.com/web/tools/chrome-devtools/console/command-line-reference
The $() returns an array of Element objects https://developer.mozilla.org/en-US/docs/Web/API/Document/querySelector
You can then use the methods and properties described on this page to extract the info you need https://developer.mozilla.org/en-US/docs/Web/API/Element
For getting total views (last 30 days) from Quora
Go to your profile, select answers based on 30 day views
Scroll down infinitely to load all answers
aaa = Array.from($$('a.ui_qtext_more_link')); aaa.forEach((e) => e.click())
Search in the page if there is any occurrence of (more)
If yes, open these to reveal the total views.
cc = Array.from($$('.meta_num')); s = 0; cc.forEach((c) => s = s+ parseInt(c.textContent)); console.log(s)
The only issue here is that the counts in thousands and above are displayed as 6.3k. This is returned to us as 6. Not good.