UNDYING!

Changes the flavor text on a button in the Kingdom of Loathing.

  1. // ==UserScript==
  2. // @name UNDYING!
  3. // @namespace dentarthurdent
  4. // @version 1
  5. // @description Changes the flavor text on a button in the Kingdom of Loathing.
  6. // @include http://www.kingdomofloathing.com/choice.php*
  7. // @include http://127.0.0.1:*/choice.php*
  8. // @include http://localhost:*/choice.php*
  9. // @grant none
  10. // ==/UserScript==
  11.  
  12.  
  13. var inputs = document.getElementsByTagName('input');
  14. for (var j = 0; j < inputs.length; ++j)
  15. {
  16. if( inputs[j].value.search("Go right back to the fight!") >= 0 )
  17. {
  18. inputs[j].value = inputs[j].value.replace( "Go right back to the fight!", "UNDYING!" );
  19. break;
  20. }
  21. if( inputs[j].value.search("Return to the fight!") >= 0 )
  22. {
  23. inputs[j].value = inputs[j].value.replace( "Return to the fight!", "UNDYING!" );
  24. break;
  25. }
  26. }