Bypass intercambiosvirtuales.org short-link tracker

Bypass some shorteners

当前为 2024-03-25 提交的版本,查看 最新版本

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         Bypass intercambiosvirtuales.org short-link tracker
// @version      1.0
// @description  Bypass some shorteners
// @author       Rust1667
// @match        http://1v.to/t/*
// @match        https://1v.to/t/*
// @run-at       document-start
// @namespace    https://greasyfork.org/users/980489
// ==/UserScript==

function base64Decode(base64String) {
  const cleanString = base64String.replace('ø', '').replace('+P', '');
  const decodedString = atob(cleanString);
  return decodedString;
}

function base64DecodeNTimes(string, times) {
  let decodedString = string;
  for (let i = 0; i < times; i++) {
    decodedString = base64Decode(decodedString);
    console.log(decodedString);
  }
  return decodedString;
}

function getDecodedURL() {
  var currentURL = window.location.href;
  if ( currentURL.match("http://1v.to/t/") != null || currentURL.match("https://1v.to/t/") != null) {
    var encodedURL = currentURL.replace('http://1v.to/t/', '').replace('https://1v.to/t/', '');
    var decodedURL = base64DecodeNTimes(encodedURL, 5);
  }
  return decodedURL
}

myDecodedURL = getDecodedURL()

window.location.replace( myDecodedURL );

if (myDecodedURL.startsWith("magnet:?")) {
  alert(myDecodedURL);
}