MODIFIED LIME FOR BEZCO

Automatically insert your badge list into your forum posts!

  1. // ==UserScript==
  2. // @name MODIFIED LIME FOR BEZCO
  3. // @namespace http://fusionfalllegacy.com/
  4. // @version 1.0
  5. // @description Automatically insert your badge list into your forum posts!
  6. // @match http://interact.modulatornetwork.com/FFL/index.php?action=post*
  7. // @grant none
  8. // ==/UserScript==
  9.  
  10. var Siggy = "[center][url=http://goo.gl/4ZXdm6][img]http://i.imgur.com/xszqW1u.png[/img][/url][/center]"
  11.  
  12. var isReady = false
  13. var waitLoop
  14.  
  15. function mainFunction(button,editor){
  16. console.log(button.onclick)
  17. button.onclick = function(){
  18. editor.value = editor.value.replace("\n\n"+Siggy,"")+"\n\n"+Siggy
  19. }
  20. }
  21.  
  22. function waitForButtons(){
  23. if(document.getElementsByClassName("button_submit").length==2&&document.getElementsByClassName("editor").length==1){
  24. isReady = true
  25. clearInterval(waitLoop)
  26. mainFunction(document.getElementsByClassName("button_submit")[0],document.getElementsByClassName("editor")[0])
  27. }
  28. }
  29.  
  30. waitLoop = setInterval(waitForButtons,100)