Skip to content

Instantly share code, notes, and snippets.

@ijash
Last active November 7, 2019 17:23
Show Gist options
  • Save ijash/a51958c46bfa7f45bab3d8098a089386 to your computer and use it in GitHub Desktop.
Save ijash/a51958c46bfa7f45bab3d8098a089386 to your computer and use it in GitHub Desktop.
//https://playlist.mp3-youtube-converter.org/
let downloadForm = document.querySelector('table');
let checkBoxes = downloadForm.querySelectorAll(`[type*="checkbox"]`);
let startArr = parseInt(prompt('select starting number', 'INPUT NUMBER ONLY!'));
let limitArr = 20;
let countArr = limitArr;
countArr = startArr + countArr
countArr = (countArr > checkBoxes.length ? checkBoxes.length - startArr : limitArr-1);
// check
for (let i = startArr - 1; i < (countArr+startArr); i++) {
checkBoxes[i].checked = true;
};
// uncheck
for (let i = startArr - 1; i < (countArr+startArr); i++) {
checkBoxes[i].checked = false;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment