// ==UserScript==
// @name Alexandria
// @version .01
// @description Concise request
// @author SarahAshlee90
// @include /^https://(www|s3)\.(mturkcontent|amazonaws)\.com/
// @grant none
// @require https://code.jquery.com/jquery-3.1.1.min.js
// ==/UserScript==
$('#mturk_form > div > h1').hide();
$('#mturk_form > div > p').hide();
$('#mturk_form > div > h3:nth-child(3)').hide();
$('#mturk_form > div > div:nth-child(4)').hide();
$('#mturk_form > div > h3:nth-child(5)').hide();
$('#examples').hide();
const radios_and_checkboxes = document.querySelectorAll('[type="checkbox"],[type="radio"]');
function preclick (elements_to_click, ...numbers) {
const radios_and_checkboxes_to_preclick = [];
Array.prototype.slice.call(arguments).forEach(el => radios_and_checkboxes_to_preclick.push(el));
radios_and_checkboxes_to_preclick.forEach(element => radios_and_checkboxes[element].click());
// console.log(`There are a total of ${radios_and_checkboxes.length} checkboxes/radio's on this page. The requested preclicks are numbers ${radios_and_checkboxes_to_preclick}`);
}
preclick(21,27);