page editor

works if you can find the buttons, allows you to edit the page.

  1. // ==UserScript==
  2. // @name page editor
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.1.2
  5. // @description works if you can find the buttons, allows you to edit the page.
  6. // @author twarped
  7. // @include https://*/*
  8. // @include http://*/*
  9. // @exclude *docs.google.com/*/*
  10. // @exclude *sites.google.com/*/edit
  11. // @grant none
  12. // ==/UserScript==
  13.  
  14.  
  15. var editon = document. createElement("button");
  16. editon. innerHTML = "Edit On";
  17. var body = document. getElementsByTagName("body")[0];
  18. body. appendChild(editon);
  19. editon.addEventListener ("click", function() {
  20. javascript:document.body.contentEditable = 'true'; document.designMode='on'; void 0
  21. });
  22. var editoff = document. createElement("button");
  23. editoff. innerHTML = "Edit Off";
  24. var head = document. getElementsByTagName("body")[0];
  25. body. appendChild(editoff);
  26. editoff.addEventListener ("click", function() {
  27. javascript:document.body.contentEditable = 'false'; document.designMode='off'; void 0
  28. });