JDownloader Automat - Mod

Send URLs to JDownloader using Click'n'Load 2 functionality and close OCH page.

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         JDownloader Automat - Mod
// @namespace    reloxx13.jdownloader.automat-mod
// @author       Bernard Toplak
// @author       reloxx13
// @license MIT
// @version      1.1
// @description  Send URLs to JDownloader using Click'n'Load 2 functionality and close OCH page.
// @grant 		 window.close
// @grant 		 window.focus
// @grant        GM.xmlHttpRequest
// @run-at       document-end
// @match        https://*.fireload.com/*
// @match        https://*.1fichier.com/*
// @match        https://*.up-4ever.net/*
// @match        https://*.frdl.to/*
// @match        https://*.megaup.net/*
// @match        https://*.file-upload.org/*
// @match        https://*.ddownload.com/*
// @match        https://*.filefactory.com/*
// @match        https://*.rapidgator.net/*
// @match        https://*.send.cm/*
// @match        https://*.send.now/*
// @match        https://*.clickndownload.site/*
// @match        https://*.buzzheavier.com/*
// @match        https://*.mixdrop.ps/*
// ==/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,
        headers : {
            Referer: "http://localhost/"
        },
        data: 'urls='+ url,
        onload: function(response) {
          console.log('URL sent to JDownloader: '+url);

          setTimeout(() => {
            window.close();
          },1000);
        },
        onerror: function(error) {
            console.error('Error sending URL to JDownloader:', error);
        }
    });

})();