I wrote a Chrome extension that counts words in a Google Doc, and compares them to suggested word counts from a data source (CSV, table, or database).
My method was to parse each span.kix-lineview-text-block
on the page, which stopped working when Google switched to an SVG canvas display. Here's a screenshot showing all word counts at 0.
The recommended alternative to parsing the page is authentication. That is, using Oauth 2.0 to authorize requests and edit content through the well-documented Google Docs API.
GDocs' API Overview makes sense. But I'm new to authentication, and too much of a noob to make sense of this answer. Google offers a quickstart tutorial, but I haven't been able to get it working as an extension.
Clearly there's a gap in my knowledge, and I'm at a loss for what to search for ("Google Docs chrome extension authentication" lead me here...) Most of Google's examples use Java/PHP/Python, which makes me wonder if I'm barking up the wrong tree.
Could someone smarter than me point out what I'm looking for and/or where to learn it?
TL;DR - I have a mostly-working Chrome extension that needs data from a Google Doc. How do I draw the rest of the owl?