subtituladas.com link shortener bypass

Bypass helper for the link shortener

目前為 2024-01-26 提交的版本,檢視 最新版本

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         subtituladas.com link shortener bypass
// @version      1.0
// @description  Bypass helper for the link shortener
// @author       Rust1667
// @match        https://subtituladas.com/enlace/*
// @grant        none
// @namespace https://greasyfork.org/users/980489
// ==/UserScript==

// Modify the link "Descargar Torrent" removing the link shortener
(function() {
    'use strict';

    // Find the <a> element
    var linkElement = document.getElementById('link');
    if (linkElement) {
        var linkUrl = linkElement.href;

        // Check if '?s=' exists in the URL
        if (linkUrl.includes('?s=')) {
            var sIndex = linkUrl.indexOf('?s=') + 3; // 3 is the length of '?s='
            var extractedUrl = linkUrl.substring(sIndex);

            // Modify the href attribute of the <a> element
            linkElement.href = extractedUrl;
        }
    }
})();


// Boost the timer
function boostTimers() {
  const originalSetTimeout = window.setTimeout;
  const originalSetInterval = window.setInterval;

  Object.defineProperty(window, 'setTimeout', {
    value: function(func, delay) {
      if (delay === 1000) {
        delay = 50;
      }
      return originalSetTimeout.apply(this, arguments);
    }
  });

  Object.defineProperty(window, 'setInterval', {
    value: function(func, delay) {
      if (delay === 1000) {
        delay = 50;
      }
      return originalSetInterval.apply(this, arguments);
    }
  });
}

boostTimers();