(function() { // Array of random image URLs hosted online const imageUrls = [ 'https://files.catbox.moe/aeithu.png', 'https://files.catbox.moe/77zmqa.png', 'https://files.catbox.moe/q4dfg0.png', 'https://files.catbox.moe/477f8f.png', 'https://files.catbox.moe/j8wual.png', 'https://files.catbox.moe/bx2y0o.png', 'https://files.catbox.moe/t9xer1.png', 'https://files.catbox.moe/ts9wm2.png', 'https://files.catbox.moe/1nlr91.png', 'https://files.catbox.moe/gn387s.png', 'https://files.catbox.moe/e250yp.png', 'https://files.catbox.moe/bsq9kf.png', 'https://files.catbox.moe/a1fi6v.png', 'https://files.catbox.moe/dnhkui.png', 'https://files.catbox.moe/xhbc5c.png', 'https://files.catbox.moe/qotvr2.png', 'https://files.catbox.moe/976nhb.png', 'https://files.catbox.moe/njhpzw.png', 'https://files.catbox.moe/y7yzie.png', 'https://files.catbox.moe/8ecm5v.png', 'https://files.catbox.moe/y71pzq.png', 'https://files.catbox.moe/hytv2d.png', 'https://files.catbox.moe/znevk0.png', 'https://files.catbox.moe/yv3m6o.png', 'https://files.catbox.moe/fb7prm.png', 'https://files.catbox.moe/pmdq9h.png', 'https://files.catbox.moe/j5p9ly.png', 'https://files.catbox.moe/wyes8b.png', 'https://files.catbox.moe/33wpqi.png', 'https://files.catbox.moe/xq9pon.png', 'https://files.catbox.moe/fql7r1.png', 'https://files.catbox.moe/qze5p5.png', 'https://files.catbox.moe/qmrlk1.png', 'https://files.catbox.moe/gro1kk.png', 'https://files.catbox.moe/thi6rs.png', 'https://files.catbox.moe/0mdnj5.png', 'https://files.catbox.moe/a6fj3d.png', 'https://files.catbox.moe/bvqoy3.png', 'https://files.catbox.moe/v9icvj.png', 'https://files.catbox.moe/9l86yc.png', 'https://files.catbox.moe/dnhkui.png', 'https://files.catbox.moe/u5mqdt.png', 'https://files.catbox.moe/oafji4.png', 'https://files.catbox.moe/ml0369.png', 'https://files.catbox.moe/g8mikd.png', 'https://files.catbox.moe/boqa91.png', 'https://files.catbox.moe/hzou3k.png', 'https://files.catbox.moe/c85ng6.png', 'https://files.catbox.moe/zig3xh.png', 'https://files.catbox.moe/haeeg9.png', 'https://files.catbox.moe/hqo0d8.png', 'https://files.catbox.moe/x6sxpx.png', 'https://files.catbox.moe/m47zxx.png', 'https://files.catbox.moe/rm9t32.png', 'https://files.catbox.moe/mrmb2s.png', 'https://files.catbox.moe/0g7ynv.png', 'https://files.catbox.moe/59tvuw.png', 'https://files.catbox.moe/6u9dxq.png', 'https://files.catbox.moe/1bzhow.png', 'https://files.catbox.moe/3x3b6c.png', 'https://files.catbox.moe/rhbtk8.png', 'https://files.catbox.moe/svn35s.png', 'https://files.catbox.moe/i6rnls.png', 'https://files.catbox.moe/pofp3i.png', 'https://files.catbox.moe/bishk9.png', 'https://files.catbox.moe/infb0v.png', 'https://files.catbox.moe/4ok1b7.png', 'https://files.catbox.moe/0c31wl.png', 'https://files.catbox.moe/0o3d7j.png', 'https://files.catbox.moe/7a3hpd.png', 'https://files.catbox.moe/sj71fl.png', 'https://files.catbox.moe/5iq0sy.png', 'https://files.catbox.moe/8vgm5z.png', 'https://files.catbox.moe/rkwhnk.png', 'https://files.catbox.moe/adornn.png', 'https://files.catbox.moe/kmjoxe.png', 'https://files.catbox.moe/o8d3aq.png', 'https://files.catbox.moe/rfd7km.png' // Add more image URLs here ]; // Helper function to get a random item from an array function getRandomItem(arr) { return arr[Math.floor(Math.random() * arr.length)]; } // Function to generate a similar but randomized string to "coinslot" function generateRandomSimilarString(baseString = "coinslot") { const characters = 'abcdefghijklmnopqrstuvwxyz'; const baseArray = baseString.split(''); const newArray = [...baseArray]; // Add two random letters for (let i = 0; i < 2; i++) { const randomChar = characters.charAt(Math.floor(Math.random() * characters.length)); newArray.splice(Math.floor(Math.random() * newArray.length), 0, randomChar); } // Remove two letters for (let i = 0; i < 2; i++) { newArray.splice(Math.floor(Math.random() * newArray.length), 1); } return newArray.join(''); } // Function to simulate a file drop on the dropzone async function simulateFileDrop() { const randomImageUrl = getRandomItem(imageUrls); const imageName = randomImageUrl.split('/').pop(); // Extract the file name from the URL // Fetch the image data const response = await fetch(randomImageUrl); if (!response.ok) { console.error('Failed to fetch image:', randomImageUrl); return; } const blob = await response.blob(); // Create a File object with the correct name and type const file = new File([blob], imageName, { type: blob.type }); // Create a DataTransfer object and add the file to it const dataTransfer = new DataTransfer(); dataTransfer.items.add(file); // Create a drop event const dropEvent = new DragEvent('drop', { dataTransfer: dataTransfer, bubbles: true, cancelable: true }); // Find the dropzone element and dispatch the drop event const dropzone = document.querySelector('.dropzone'); if (dropzone) { dropzone.dispatchEvent(dropEvent); console.log('File dropped successfully.'); } else { console.error('Dropzone element not found.'); } } // Function to populate the form fields automatically function populateForm() { // Find the text area and set random similar text const textArea = document.querySelector('textarea[name="body"]'); if (textArea) { textArea.value = generateRandomSimilarString(); // Generate similar string } // Simulate setting the image file simulateFileDrop(); // Click the submit button after 1 second setTimeout(() => { const submitButton = document.querySelector('input[name="post"]'); if (submitButton) { submitButton.click(); } else { console.error('Submit button not found.'); } }, 4000); // 1 second delay } // Set up a loop to repeat the process every 10 seconds setInterval(populateForm, 14000); })();