View all keystrokes in Google Docs

    Since May 2010, Google Docs introduced a new document format that retains a detailed version history. You can unscrew actions back, as if in a slow motion movie. A text editor saves keystrokes up to the microsecond.

    Journalist and hacker James Somers managed to crack the internal Google Docs format and extract timestamps for each keystroke. Thus, you can see the history of the creation of the document from beginning to end. Moreover, the Google Docs keylogger is very advanced: it assigns unique identifiers to symbols, so it even knows where each letter is copied from and to!

    The most important thing is that the history of keystrokes and other people's documents that your colleagues shared with you is open to you. This can be called unexpected program behavior. If I create a document and then share it, I cannot expect all colleagues to see the full story of how this text was created, what words were corrected and what sentences were deleted before the document was posted for public viewing.

    James Somers has been creating text editors for several years. The introduction of the new Google Docs format in 2010 was a personal challenge for him, and he began to carefully study, wrote a Chrome extension to intercept keystrokes, created the first version of the “player” with a history of edits.

    The breakthrough happened at the moment when James noticed on the tabNetwork in Chrome Inspector, that after each keystroke, Chrome generates a call save.



    For example, when a point is typed at the end of a sentence, the following information is sent:



    This data is stored in the change history, along with time stamps. A complete version history of a Google Docs document can be obtained by going to the “Revision History” menu. It is called a URL that looks like this:

    docs.google.com/document/d/#{docid}/revisions/load?id=#{docid}&start=1330&end=1341

    One need only change the parameters startand endthe URL, to download a complete history of changes to the document. We put the unit first, and select the last number using the random search method with binary search .

    To generate "videos" with a history of keystrokes, James Somers launched a siteDraftback.com , which works through the Google API. By uploading your (or someone else's) documents there, you can see how they were created.



    Draftback automatically generates a graph with the frequency of edits in time (above).

    Sommers says that most of his colleagues were unpleasantly surprised when he told them about such “side” functionality of Google Docs. Although, this is quite a logical function: how else to save the history of edits, if not using a keylogger?

    But, on the other hand, such a function can reveal new facets of the writers and poets, show the history of journalistic articles and texts of state laws ... It’s only necessary for the author to work in Google Docs, and at the end of the work he should put his work out in the open access. We can see from beginning to end how each text was created.

    Also popular now: