Accept-All Bookmark for Google Docs Suggestions

  Have you tried Google Doc’s suggestion capability? While it’s great for collaboration, unfortunately they forgot to add an “Accept All” button! I wrote a bookmark script that allows you to accept all suggestions at once in Google Chrome. To use this script do the following:
  • Open up the Bookmarks Manager: The “Burger” Menu (three horizontal lines) -> Bookmarks -> Bookmarks Manager
  • Right click in the white space under Organize and select Add Page
  • In NAME, enter “Accept All”
  • In URL, paste the following script as one line:
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); }); })();
  • Now move that bookmark near the top so that it is accessible in your bookmarks (show bookmarks by The Burger Menu -> Bookmarks -> Show bookmarks bar).
What this script does is loop through all of the accept checkmarks and emulates a mouse click, down, and up event, causing each one to be accepted.
I hope it saves you time!
  Robert Buccigrossi
[Edited 8/30/2016 — Updated function because Google changed the class name]