Skip to content

Instantly share code, notes, and snippets.

@aice09
Last active November 19, 2023 16:21
Show Gist options
  • Save aice09/51287f4f02c3bc915a7df4232605f326 to your computer and use it in GitHub Desktop.
Save aice09/51287f4f02c3bc915a7df4232605f326 to your computer and use it in GitHub Desktop.
Automatically download MangaFreak files
// Before running this code, please make sure to configure your browser settings to allow automatic downloads.
// Define the base URL and set the initial number
let baseUrl = 'https://images.mangafreak.net/downloads/One_Piece_';
let startNumber = 1; // You can change this to any specific number set by the user
for (let i = startNumber; i <= 1083; i++) { // Change the end number to 1083 or any specific number set by the user
setTimeout(() => {
// Format the number with leading zeros
let num = i;
// Open the URL in a new window or tab
window.open(baseUrl + num);
}, (i - startNumber) * 1000); // Adjust the timeout delay based on the current number
}
@aice09
Copy link
Author

aice09 commented Nov 19, 2023

How to use this code.

  1. Open your browser and ensure that the download settings allow for automatic downloads without constant prompts.
  2. Navigate to Manga Freak (e.g., One Piece) and right-click. Select "Inspect" or press F12 to open the developer tools.
  3. In the developer tools, go to the "Console" tab. Paste the provided code.
  4. Adjust the numerical value in the code based on the specific item you want to download. Press "Enter" to execute the code.
  5. During the first attempt, a notification may appear in the address bar regarding multiple downloads. Select the option that allows multiple downloads to proceed. This ensures smooth execution in subsequent code runs.
  6. To merge the PDF use https://smallpdf.com/merge-pdf

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