A9 Image Survey - 1 Location

Makes the A9 Image Survey - 1 (Location HITs) easier to do (only keyboard).

  1. // ==UserScript==
  2. // @name A9 Image Survey - 1 Location
  3. // @namespace https://gf.qytechs.cn/en/scripts/19949-a9-image-survey-1-location
  4. // @version 0.41
  5. // @description Makes the A9 Image Survey - 1 (Location HITs) easier to do (only keyboard).
  6. // @author walco005
  7. // incl. is removed but kept here in case it is REALLY needed *.mturkcontent.com/*
  8. // @include https://s3.amazonaws.com/mturk_bulk/*
  9. // @include https://www.mturk.com/mturk/*groupId=3SI493PTTXCN8RR0YUKNNXB592FZDB*
  10. // @grant GM-Log
  11. // @require http://code.jquery.com/jquery-2.1.0.min.js
  12. // ==/UserScript==
  13.  
  14. //Using just the What location portion of the h4 since using the whole thing was creating issues.
  15. var x = false;
  16. if ($("h4:contains(What location)").length){
  17. window.focus();
  18. $("h4:contains(What location)").append(
  19. "<br> Press the following key to select each location, then press ENTER to submit. <br> 1 - Bedroom <br> 2 - Bathroom<br> 3 - Kitchen<br > 4 - Living Room<br> 5 - Dining Area<br> 6 - Store<br> 7 - Other Location<br> 8 - Cannot Identify"
  20. );
  21. $(document).keydown(function(e) {
  22. switch(e.keyCode) {
  23. case 49:
  24. $("select[data-reactid='.0.0.1.2:$q1scene.2']").val("context_bedroom");
  25. if(!x) changeButton();
  26. break;
  27. case 50:
  28. $("select[data-reactid='.0.0.1.2:$q1scene.2']").val("context_bathroom");
  29. if(!x) changeButton();
  30. break;
  31. case 51:
  32. $("select[data-reactid='.0.0.1.2:$q1scene.2']").val("context_kitchen");
  33. if(!x) changeButton();
  34. break;
  35. case 52:
  36. $("select[data-reactid='.0.0.1.2:$q1scene.2']").val("context_living_room");
  37. if(!x) changeButton();
  38. break;
  39. case 53:
  40. $("select[data-reactid='.0.0.1.2:$q1scene.2']").val("context_dining_area");
  41. if(!x) changeButton();
  42. break;
  43. case 54:
  44. $("select[data-reactid='.0.0.1.2:$q1scene.2']").val("context_store");
  45. if(!x) changeButton();
  46. break;
  47. case 55:
  48. $("select[data-reactid='.0.0.1.2:$q1scene.2']").val("context_other");
  49. if(!x) changeButton();
  50. break;
  51. case 56:
  52. $("select[data-reactid='.0.0.1.2:$q1scene.2']").val("context_unknown");
  53. if(!x) changeButton();
  54. break;
  55. default:
  56. break;
  57. case 13:
  58. if(x) $("input[value='Submit']").click();
  59. break;
  60. }
  61. });
  62. }
  63.  
  64. if ($("td:contains(All HITs Available to You)").length){
  65. location.reload();
  66. i++;
  67. }
  68.  
  69. function changeButton() {
  70. $("h4:contains(What location)").removeClass("qHeadlineTodo");
  71. $("h4:contains(What location)").addClass("qHeadlineDone");
  72. $("input[data-reactid='.0.0.1.4.0']").removeClass("btn-default");
  73. $("input[data-reactid='.0.0.1.4.0']").addClass("btn-success");
  74. $("input[data-reactid='.0.0.1.4.0']").prop("disabled", false);
  75. x = true;
  76. }

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址