EDIT: GoogleDocs has introduced an Accept all suggestions feature now, so this hack is no longer necessary. You can find this under Tools > Review suggested edits > Accept all.

Google Docs is an excellent tool for collaborative word processing and perhaps the most commonly used app in G Suite, but sometimes it can leave you a little frustrated.

accept all suggestions sketch
With a little hack you can batch accept suggestions

Background:

It seems that Google forgot to include a key functionality that any Microsoft Word user would be very familiar with —  to “Accept All Changes”.

Microsoft Word Accept All Changes
Microsoft Word’s one-click ‘Accept All Changes’ functionality.

This function comes in handy when you have someone review an article, copy or any piece of text. In Microsoft Word, the editor hits the ‘Track Changes’ button but in Google Docs we prefer to be ‘Suggesting’ changes that can later be accepted by the actual writer, editor, sub-editor or proofreader.

Google Docs Editing Suggesting
Tracking edits in Google Docs by ‘Suggesting’ them helps retain edit history.

The way Google Docs is designed is such that the user is expected to accept changes one by one by clicking on the ✓ sign for each edit made. This can be a tiresome process if you want to accept all suggested changes. In addition to the misfortune of having to edit a bad piece, you now run the risk of carpal tunnel syndrome with all those mouse clicks!

Accept suggestion
Accepting suggestions one by one can be a hassle with floating comment boxes (otherwise excellent for collaboration).

Our lead programmer has approved the use of a clever little script that can make the job easier for us. One click and it works like magic!

accept all suggestions script
The script in action after just one click.

However, the script does require a little setting up.

Step 1: Carefully copy the script below.

javascript:(function(){ var d=document.getElementsByClassName("docos-accept-suggestion"); d = Array.prototype.slice.call(d); d.forEach(function(n){ var e = document.createEvent("MouseEvents"); e.initEvent("click", true, false); n.dispatchEvent(e,true); e = document.createEvent("MouseEvents"); e.initEvent("mousedown", true, false); n.dispatchEvent(e,true); e = document.createEvent("MouseEvents"); e.initEvent("mouseup", true, false); n.dispatchEvent(e,true); }); })();

Step 2: Add a new bookmark in your Chrome browser.

add page chrome bookmark
Right-click in your bookmarks bar and ‘Add Page’. (Any other approach will work equally well.)

Step 3: Drop the code.

easy access script bookmark
Name the bookmark appropriately, paste the script you copied in Step 1 into the URL field and hit ‘Save’.

Step 4: Test your script.

It should run smoothly, clicking through those floating comment boxes one by one, allowing you to do something more useful with your time. This can take a few moments, in case you expect it to do it in a fraction of a second.

Ta-da!

That’s it. Wasn’t that easy?

Tell us how it worked for you in the comments below and feel free to share this productivity hack with your team(s).

SHARE

20 comments

    1. Hi Amy,
      just tested this again on Chrome / Mac (59.0.3071.115 / 10.12.6) and works fine for me. Could be an issue with your browser version, or some browser plugin that interferes with the script…

  1. This no longer works as a stand-alone bookmarklet due to a change in security policy: Refused to execute inline script because it violates the following Content Security Policy directive: “script-src ‘strict-dynamic’ ‘unsafe-eval’ ‘unsafe-inline’ https: ‘nonce-Z1c8YRN+3BPQzlgSiWWgh3RGfm0′”. Note that ‘unsafe-inline’ is ignored if either a hash or nonce value is present in the source list.

    It still works if you paste it in to the JavaScript console. It’s very slow, unfortunately.

  2. There is actually a built in way to do this – it’s just very un-obvious.

    1. On your computer, open a document at docs.google.com.
    2. Click Tools and then Review suggested edits.
    3. A box will appear in the top right.
    4. To preview what your document will look like with or without the changes, click the Down arrow Down Arrow and choose an option.
    5. Click Accept all or Reject all.

    https://support.google.com/docs/answer/6033474?co=GENIE.Platform%3DDesktop&hl=en

  3. Using Chrome 71 and the script does absolutely nothing. When I create a new document and populate it with errors (lots of blue squiggly underlines) and click Tools and Review suggested edits, the box that opens up says, “No suggested edits.”

  4. Thanks so much! As a Chinese girl majored in Chinese Literature, I fixed this google docs issue with professional help on the internet.

    Absolutely amazing.

  5. Ha, this still worked today, thanks! I copy-pasted it into the console on Firefox 77. Front-end hacks for the win!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Back to top