Last active
April 20, 2023 10:11
-
-
Save tomasz-nolberczak/58e548b96b5c4a175a4c9faef155a595 to your computer and use it in GitHub Desktop.
Skrypt ułatwiający pobieranie wszystkich plików z danego folderu z Chomikuj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Skrypt ułatwiający pobieranie wszystkich plików z danego folderu z Chomikuj | |
Wklej w konsolę przeglądarki. Pobieranie plików jeden po drugim nastąpi po chwili. | |
*/ | |
let filesToDownload = $('#FilesListContainer').find('.fileItemContainer'); | |
downloadFile(0, filesToDownload.length - 1); | |
function downloadFile(index, max) { | |
setTimeout(function () { | |
let fileToDownload = filesToDownload.eq(index); | |
fileToDownload.find('.downloadAction').trigger('click'); | |
setTimeout(function () { | |
$('#downloadWarningForm').submit(); | |
}, 1500); | |
index++; | |
if (index <= max) downloadFile(index, max); | |
}, 4000); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment