Greasy Fork镜像 支持简体中文。

a9 - 5 radios

Keybinds for the 5 radios in the a9 HITs

目前為 2016-11-08 提交的版本,檢視 最新版本

// ==UserScript==
// @name         a9 - 5 radios
// @namespace    http://kadauchi.com/
// @version      1.0.1
// @description  Keybinds for the 5 radios in the a9 HITs
// @author       Kadauchi
// @icon         http://i.imgur.com/oGRQwPN.png
// @include      /^https://(www|s3)\.(mturkcontent|amazonaws)\.com/
// @grant        GM_log
// @require      https://code.jquery.com/jquery-3.1.1.min.js
// @hitname      Shoe (WARNING: This HIT may contain adult content. Worker discretion is advised.)
// @hitsave      https://s3.amazonaws.com/mturk_bulk/hits/235915880/onYNjrCy3S1NRlSfqUcH4Q.html
// ==/UserScript==

var autosubmit = false;

function _rate (i) {
  $(':radio').eq(i).click();
  if (autosubmit) {
    $(':submit').click();
  }
}

$(document).keydown(function (e) {
  switch (e.which) {
    case 49: case 97: // 1, Numpad 1
      _rate(0);
      break;
    case 50: case 98: // 2, Numpad 2
      _rate(1);
      break;
    case 51: case 99: // 3, Numpad 3
      _rate(2);
      break;
    case 52: case 100: // 4, Numpad 4
      _rate(3);
      break;
    case 53: case 101: // 5, Numpad 5
      _rate(4);
      break;
    case 13: // Enter
      $(':submit').click();
      break;
  }
});

window.focus();

QingJ © 2025

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