SourceForge Instant Download

Bypass SourceForge download timer and disable post-download redirect

Pada tanggal 23 Agustus 2024. Lihat %(latest_version_link).

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 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        SourceForge Instant Download
// @namespace   mevanlc
// @license     MIT
// @match       https://*.sourceforge.net/projects/*/files/*/download
// @match       https://*.sf.net/projects/*/files/*/download
// @grant       none
// @version     1.2
// @author      -
// @description Bypass SourceForge download timer and disable post-download redirect
// @run-at      document-start
// ==/UserScript==

(() => {

  function main() {
    if (!SF) {
      return setTimeout(main, 100);
    }

    const SFOverride = {
      downloadDelay: 1,
      downloadRedirectDelay: 9999999999,
    };

    SF = new Proxy(SF, {
      set: function (obj, prop, value) {
        if (SFOverride.hasOwnProperty(prop)) {
          console.log(`!!! userscript: ignoring attempt to set SF.${prop}=${value}`);
          return true;
        }
        obj[prop] = value;
        return true;
      },
      get: function (obj, prop) {
        if (SFOverride.hasOwnProperty(prop)) {
          console.log(`!!! userscript: returning override SF.${prop}=${SFOverride[prop]}`);
          return SFOverride[prop];
        }
        return obj[prop];
      },
    });
  }

  main();

})();