SourceForge Instant Download

Bypass SourceForge download timer and disable post-download redirect

Tính đến 21-07-2024. Xem phiên bản mới nhất.

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.

(Tôi đã có Trình quản lý tập lệnh người dùng, hãy cài đặt nó!)

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.1
// @author      -
// @description Bypass SourceForge download timer and disable post-download redirect
// @run-at      document-start
// ==/UserScript==

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];
  },
});