Venue Quality

Hide instructions and a & s or 1 & 2 on number pad

当前为 2015-07-29 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Venue Quality
  3. // @version 0.5
  4. // @description Hide instructions and a & s or 1 & 2 on number pad
  5. // @author ikarma
  6. // @include https://www.mturk.com/mturk/*
  7. // @grant none
  8. // @namespace https://greasyfork.org/users/9054
  9. // @require https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js
  10. // ==/UserScript==
  11.  
  12.  
  13. var requesterName = $( 'tr:contains(Requester:)' ).last().children().first().next().text().trim();
  14.  
  15.  
  16. if ( requesterName == 'Venue Quality' ) {
  17. document.getElementsByClassName('overview-wrapper')[0].style.display='none';
  18.  
  19. var $j = jQuery.noConflict(true);
  20.  
  21. document.addEventListener( "keydown", kas, false);
  22. }
  23.  
  24. function kas(i) {
  25. if ( i.keyCode == 65 || i.keyCode == 97 ) { //A or npad 1
  26. $j('input[name="Answer_1"]').eq(0).click();
  27. $j('input[name="/submit"]').eq(0).click();
  28. }
  29. if ( i.keyCode == 83 || i.keyCode == 98 ) { //S or npad 2
  30. $j('input[name="Answer_1"]').eq(1).click();
  31. $j('input[name="/submit"]').eq(0).click();
  32. }
  33.  
  34. }
  35.  
  36.