Greasy Fork 还支持 简体中文。

MTurk Zing Receipt Compare Script

Allows you to press one button on Zing's "Are these two receipts the same"

目前為 2014-11-04 提交的版本,檢視 最新版本

  1. // ==UserScript==
  2. // @name MTurk Zing Receipt Compare Script
  3. // @author Austin3600 (WoLF)
  4. // @version 1.0
  5. // @description Allows you to press one button on Zing's "Are these two receipts the same"
  6. // HITs and it'll automatically pick that option and submit for you. There will
  7. // be a confirm pop-up (to avoid errors), you can quickly press Enter on your
  8. // keyboard to confirm & submit.
  9. // @match https://backend.ibotta.com/duplicate_receipt_moderation*
  10. // @grant none
  11. // @namespace https://greasyfork.org/users/6438
  12. // ==/UserScript==
  13.  
  14. var radios = document.getElementsByTagName("input");
  15. var button = document.getElementsByTagName("button");
  16. var submitBut;
  17. document.onkeydown = showkeycode;
  18.  
  19. for (i = 0; i < button.length; i++) {
  20. if (button[i].type == "submit") {
  21. submitBut = button[i];
  22. }
  23. }
  24.  
  25. function showkeycode(evt){
  26. var keycode = evt.keyCode;
  27. switch (keycode) {
  28. case 78: //n
  29. for (i = 0; i < radios.length; i++) {
  30. if (radios[i].type == "radio"){
  31. if (radios[i].value == "false") {
  32. radios[i].checked = true;
  33. if (confirm("Are you sure these two receipts are NOT the same?")) submitBut.click();
  34. }
  35. }
  36. }
  37. break;
  38. case 89: //y
  39. for (i = 0; i < radios.length; i++) {
  40. if (radios[i].type == "radio"){
  41. if (radios[i].value == "true") {
  42. radios[i].checked = true;
  43. if (confirm("Are you sure these two receipts ARE the same?")) submitBut.click();
  44. }
  45. }
  46. }
  47. break;
  48. default: break;
  49. }
  50. }