Skip to content

Instantly share code, notes, and snippets.

@peterhellberg
Last active February 27, 2025 14:30
Show Gist options
  • Save peterhellberg/bcf2a20b409e336419752d77b7c3a07e to your computer and use it in GitHub Desktop.
Save peterhellberg/bcf2a20b409e336419752d77b7c3a07e to your computer and use it in GitHub Desktop.
function dl(n) {
setTimeout(function(){
document.querySelector('span[class^="Notification-module_close__"]').click();
}, 500);
var more = document.querySelectorAll('div[class^="Dropdown-module_container__"]');
more[n].click();
more[n].querySelector('div[id^="DOWNLOAD_AND_TRANSFER_ACTION_"]').click();
more[n].querySelector('label[class^="RadioButton-module_radio_container__"] input').click();
more[n].querySelector('div[id^="DOWNLOAD_AND_TRANSFER_ACTION_"][id$="_CONFIRM"]').click();
};
@peterhellberg
Copy link
Author

peterhellberg commented Feb 19, 2025

Warning

This function will fail for any Sample books Amazon has added to your library. 🀦

Instructions

@peterhellberg
Copy link
Author

Important

This code is no longer relevant since Amazon has removed the download functionality.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment