dofd1d2

Uzupelnia pola z cc i tankami

  1. // ==UserScript==
  2. // @name dofd1d2
  3. // @description Uzupelnia pola z cc i tankami
  4. // @namespace soowal
  5. // @include http://*erepublik.com/*/economy/donate-money/*?*
  6. // @include http://*erepublik.com/*/economy/donate-items/*?*
  7. // @require https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js
  8. // @require http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js
  9. // @version 1
  10. // @grant GM_getValue
  11. // @grant GM_setValue
  12. // @grant GM_listValues
  13. // @grant GM_xmlhttpRequest
  14. // @grant GM_info
  15. // @grant unsafeWindow
  16. // ==/UserScript==
  17.  
  18.  
  19. function doscript()
  20. {
  21. var el = Math.round(unsafeWindow.window.location.search.substr(1) * 100) / 100;
  22. if(!isNaN(el) && el > 0)
  23. {
  24. $('#donate_money_0').val(el+'');
  25. if(unsafeWindow.window.location.toString().indexOf('donate-items') > -1)
  26. {
  27. var obj = $('input[quality="7"][industry="2"]');
  28. if(obj.length)
  29. {
  30. $(obj).parent().prev().find('input').val(el+'');
  31. }
  32. }
  33. }
  34. }
  35.  
  36. $(function()
  37. {
  38. doscript();
  39. });