NativeScript

LoremLoremLorem.

当前为 2019-03-01 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name NativeScript
  3. // @author Lp
  4. // @version 0.0.3
  5. // @description LoremLoremLorem.
  6. // @license MIT License.
  7. // @namespace https://greasyfork.org/users/164367
  8. // ==/UserScript==
  9. //***********************************
  10.  
  11. /**
  12. * Getnative jQuery Auto Add Translation
  13. * @param {number} addInterval Add Translation button click interval in seconds
  14. * @param {number} nextInterval Next button click interval in seconds
  15. * @param {number} newTranslateInterval Machine Translation button click interval in seconds
  16. */
  17.  
  18. var addInterval = prompt('Masukkan jeda interval')
  19. var newTranslateInterval = prompt('Masukkan jeda translate baru')
  20.  
  21. let no = parseInt(($($('.project-source-text')[0]).attr('id')).replace('ember', ''));
  22. // get numberId in source text
  23. // change ember1802 => 1802
  24. function auto(addInterval, newTranslateInterval) {
  25. setTimeout(function() {
  26. $('#ember' + no).click();
  27. //click ember id
  28. no++
  29. //loop
  30. auto(addInterval, newTranslateInterval);
  31. }, newTranslateInterval * 1000);
  32. $('.translate-mode-icon').click();
  33. // click translate
  34.  
  35. setTimeout(function() {
  36. $('.right button').click();
  37. }, addInterval * 1000);
  38.  
  39. };
  40. //save, next,
  41. auto(1, 2);
  42. //auto(1.5, 2.5);
  43.  
  44. /* fitur
  45. * save translate > 80% getAttribute
  46. * stop code debuger
  47. */