JDownloader Automat

Send fireload.com (or any active webpage) URL to JDownloader using Click'n'Load 2 functionality.

Fra 07.05.2023. Se den seneste versjonen.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         JDownloader Automat
// @namespace    https://toplak.info
// @author       Bernard Toplak
// @version      1.0.1
// @licence      GPL3
// @description  Send fireload.com (or any active webpage) URL to JDownloader using Click'n'Load 2 functionality.
// @match        https://*.fireload.com/*
// @grant        GM.xmlHttpRequest
// ==/UserScript==

(function() {
    'use strict';

    var url = window.location.href;
    
    var jdownloaderUrl = 'http://127.0.0.1:9666/flash/add?urls='+url;

    GM.xmlHttpRequest({
        method: 'POST',
        url: jdownloaderUrl,
        /* 
            required to skip the pop-up requesting confirmation each time a new URL is added
            Additional change is necessary in JD settings: 
                go to Settings -> Advanced Settings (icon left) -> enter "remoteapi" and add "localhost" to the JSON
        */
        headers : {
            Referer: "http://localhost/"
        },
        onload: function(response) {
            console.log('URL sent to JDownloader: '+url);
        },
        onerror: function(error) {
            console.error('Error sending URL to JDownloader:', error);
        }
    });

})();