Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name MERLAMT 0.38 (10/21/2019)
- // @version 1.0
- // @author Nobody
- // @include /^https://(www|s3)\.(mturkcontent|amazonaws)\.com/
- // @grant none
- // ==/UserScript==
- 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(0,4,9,14,19,24,29,34,39,44,49,54,59,64,69,74)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement