Skip to content

Instantly share code, notes, and snippets.

@derekpowell
Created March 10, 2017 21:57
Show Gist options
  • Save derekpowell/b8f1161489a6d9b6bd97862caef87ec6 to your computer and use it in GitHub Desktop.
Save derekpowell/b8f1161489a6d9b6bd97862caef87ec6 to your computer and use it in GitHub Desktop.
google docs - accept all changes
javascript:(function(){ var d=document.getElementsByClassName("docos-accept-suggestion"); d = Array.prototype.slice.call(d); var i=1; d.forEach(function(n){console.log("accepting"); 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); i++; i++; setTimeout( function(){ n.dispatchEvent(e,true); } , (i * 1000)); }); })();
@derekpowell
Copy link
Author

Cut/paste into web browser console on doc you want to accept changes in. This was stolen wholesale from a quora answer I believe.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment