Bypass intercambiosvirtuales.org short-link tracker

Bypass some shorteners

目前為 2023-10-19 提交的版本,檢視 最新版本

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

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

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

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

你需要先安裝一款使用者腳本管理器擴展,比如 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);
}