Greasy Fork

来自缓存

Greasy Fork is available in English.

Terabox Premium Unlocker

Enables all VIP (Premium) features on Terabox by simulating an active premium membership.

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         Terabox Premium Unlocker
// @namespace    terabox.lovedolove
// @version      1.0.4
// @description  Enables all VIP (Premium) features on Terabox by simulating an active premium membership.
// @match        *://www.terabox.com/*
// @match        *://terabox.com/*
// @match        *://dm.terabox.com/*
// @match        *://*.terabox.com/*
// @match        *://*.teraboxapp.com/*
// @match        *://*.terabox.link/*
// @match        *://*.1024tera.com/*
// @match        *://*.momerybox.com/*
// @match        *://*.nephobox.com/*
// @match        *://*.freeterabox.com/*
// @match        *://*.yartera.com/*
// @match        *://*.4funbox.com/*
// @match        *://*.mirrobox.com/*
// @match        *://*.gibibox.com/*
// @match        *://*.tibibox.com/*
// @require      https://update.greasyfork.icu/scripts/455943/1270016/ajaxHooker.js
// @icon         https://greasyfork.s3.us-east-2.amazonaws.com/vtcn761um75q267xs2zgfsa9wlig
// @homepage     http://greasyfork.icu/en/scripts/543870-terabox-premium-unlocker
// @supportURL   http://greasyfork.icu/en/scripts/543870-terabox-premium-unlocker/feedback
// @run-at       document-start
// @grant        none
// @license      MIT
// ==/UserScript==
/* global ajaxHooker*/
(function () {
  "use strict";

  // Auto-redirect to www.terabox.com from alternative domains
  const validDomains = ["www.terabox.com", "terabox.com", "dm.terabox.com"];
  const currentHostname = location.hostname;

  if (!validDomains.includes(currentHostname)) {
    const url = new URL(location.href);
    url.protocol = "https:";
    url.hostname = "www.terabox.com";
    location.replace(url.href);
    return; // Stop execution after redirect
  }

  // Hooking AJAX request to unlock premium
  ajaxHooker.hook((request) => {
    if (request.url.includes("/membership/proxy/user")) {
      request.response = (res) => {
        const json = JSON.parse(res.responseText);
        if (json.error_code === 0 && json.data) {
          let a = json.data.member_info;

          // Unlock VIP features
          a.is_vip = 1;
          a.vip_left_time = 9999999999; // Long duration for VIP
          a.vip_end_time = 9999999999; // Far future expiry
          a.vip_end_time_without_grace = 9999999999;
          a.can_cancel_renew = 1;
          a.is_auto_renew = 1;
          a.raw_price = 0;
          a.renew_price = 0;
          a.renew_time = 9999999999;
          a.show_grace_tips = 0;

          // Ensure support for VIP in country info
          json.data.cur_country.support_vip = 1;
          json.data.reg_country.support_vip = 1;

          // Modify reminder to avoid expiry warnings
          json.data.reminder.vip_expire_time = 9999999999;

          res.responseText = JSON.stringify(json);
        }
      };
    }
  });
})();