Skip to content

Instantly share code, notes, and snippets.

@tmatzxzone
Created March 20, 2024 19:57
Show Gist options
  • Save tmatzxzone/4b0f96d2a086078dd299e24207201f3c to your computer and use it in GitHub Desktop.
Save tmatzxzone/4b0f96d2a086078dd299e24207201f3c to your computer and use it in GitHub Desktop.
Convert Pixeldrain Folder Link to Single link using browser console
// Extract file IDs and construct single URLs
const fileData = window.viewer_data.api_response.files;
const singleUrls = fileData.map(file => `https://pixeldrain.com/u/${file.id}`);
// Construct log message
const logMessage = ["Single URLs:"];
singleUrls.forEach(url => logMessage.push(url));
// Create a Blob containing the log message
const blob = new Blob([logMessage.join("\n")], { type: "text/plain" });
// Create a link element to trigger the download
const link = document.createElement("a");
link.download = "single_urls.txt";
link.href = URL.createObjectURL(blob);
link.click();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment