Discussions » Creation Requests

filecr.com auto downloader

§
Posted: 02.11.2024.
Edited: 02.11.2024.

I tried the following script as an autodownloader script for filecr.com
The script is meant for unattended / automatic initiation of downloads.

But, it didn't seem to work.


// ==UserScript==
// @name Auto Click Download Links on anygame.net (FileCR)
// @namespace https://greasyfork.org
// @version 1.0
// @description Automatically clicks links containing ai.net or ai.in on ai.com pages after they load
// @author Your Name
// @match https://anygame.net/*
// @grant none
// ==/UserScript==

(function() {
'use strict';

// Function to click on the links
function clickLinks() {
const links = document.querySelectorAll('a');
links.forEach(link => {
if (link.href.includes('download.xyz') || link.href.includes('filecr.xyz')) {
link.click();
}
});
}

// Create a MutationObserver to watch for new links
const observer = new MutationObserver(mutations => {
mutations.forEach(mutation => {
if (mutation.addedNodes.length) {
clickLinks(); // Click links whenever new nodes are added
}
});
});

// Start observing the document body for changes
observer.observe(document.body, {
childList: true,
subtree: true
});

// Optionally, also check for existing links right away
clickLinks();
})();

Post reply

Sign in to post a reply.