id changer

changes a html object's id to whatever you want without inspect. works great with my button clicker

  1. // ==UserScript==
  2. // @name id changer
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.1.2
  5. // @description changes a html object's id to whatever you want without inspect. works great with my button clicker
  6. // @author twarped
  7. // @match http*://*/*
  8. // @exclude sites.google.com/*/edit
  9. // @exclude docs.google.com/*/*
  10. // @grant none
  11. // ==/UserScript==
  12.  
  13. var id = document. createElement("button");
  14. id.innerHTML='change id'
  15. var idbutton = document. getElementsByTagName("body")[0];
  16. idbutton. appendChild(id);
  17. id.addEventListener ("click",function idmaker(){
  18. var thing = prompt('id','');
  19. if(thing != null){
  20. var change = prompt('id ' +thing+ ' change to','')
  21. }
  22. document.getElementById(thing).id = change;
  23. });