UNDYING!

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

当前为 2015-02-22 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name UNDYING!
  3. // @namespace dentarthurdent
  4. // @version 0.3
  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. // @copyright 2015, Thomas Nelson
  10. // @grant none
  11. // ==/UserScript==
  12.  
  13.  
  14. var inputs = document.getElementsByTagName('input');
  15. for (var j = 0; j < inputs.length; ++j)
  16. {
  17. if( inputs[j].value == "Go right back to the fight!" || inputs[j].value == "Return to the fight!" )
  18. {
  19. inputs[j].value = "UNDYING!";
  20. break;
  21. }
  22. if( inputs[j].value == "Go right back to the fight! (1 Ka)" || inputs[j].value == "Return to the fight! (1 Ka)" )
  23. {
  24. inputs[j].value = "UNDYING! (1 Ka)";
  25. break;
  26. }
  27. }