Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save cuylerstuwe/0b81e81df29dfc717265a0751bfa64f6 to your computer and use it in GitHub Desktop.
Save cuylerstuwe/0b81e81df29dfc717265a0751bfa64f6 to your computer and use it in GitHub Desktop.
A Turkernator userscript.
// ==UserScript==
// @name A9 - Are the items exact? - Keybinds
// @version 1.0.1
// @include hit_set_id:3NE6EBGK58WRF4Y79I0YPEOFMAE3EQ
// @require https://gist.github.com/salembeats/7148acc820cdbc73f9c6d1f5a74f2844/raw/bc19f574867153816ca011a495284eddf1f12fac/mturk-hit-shorthand.user.library.js
// ==/UserScript==
const settings = { autoSubmit: false };
const submit = () => $('#submitButton').click();
const [yesYes, noYes, unsureNo] = $createDosForValueAttr(
["yesMatch", "yesEnough"],
["noMatch", "yesEnough"],
["unsureMatch", "notEnough"],
{
every: el => el.click(),
after: () => !settings.autoSubmit || submit()
}
);
e$('keydown', ({ key }) =>
_switch(key, {
"1": yesYes(),
"2": noYes(),
"3": unsureNo(),
"4": submit()
})
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment