From 5e932905efe594815d278c6a61e5ad08fcb882d3 Mon Sep 17 00:00:00 2001 From: Amm0ni4 Date: Sat, 24 Feb 2024 19:30:54 +0100 Subject: [PATCH] linkify result url on bypass.city --- Bypass_All_Shortlinks.meta.js | 1 + Bypass_All_Shortlinks.user.js | 31 +++++++++++++++++++++++++ extra_bypasses/bypass.city.user.js | 36 ++++++++++++++++++++++++++++++ supported_sites.txt | 1 + 4 files changed, 69 insertions(+) create mode 100644 extra_bypasses/bypass.city.user.js diff --git a/Bypass_All_Shortlinks.meta.js b/Bypass_All_Shortlinks.meta.js index d9fb631..25db964 100644 --- a/Bypass_All_Shortlinks.meta.js +++ b/Bypass_All_Shortlinks.meta.js @@ -648,6 +648,7 @@ // @match *://*.r1.foxylinks.site/* // @include /(free-content.pro|((ebaticalfel|downbadleaks|megadropsz|megadumpz|stownrusis|iedprivatedqu).com))\/s\?/ // @include /adbypass.eu/ +// @include /(bypass.city|adbypass.org)\/bypass\?bypass=/ // @include /mundopolo.net/ // @include /comohoy.com/ // @include /sphinxanime.com\/short/ diff --git a/Bypass_All_Shortlinks.user.js b/Bypass_All_Shortlinks.user.js index a44cfa5..0d71b7e 100644 --- a/Bypass_All_Shortlinks.user.js +++ b/Bypass_All_Shortlinks.user.js @@ -648,6 +648,7 @@ // @match *://*.r1.foxylinks.site/* // @include /(free-content.pro|((ebaticalfel|downbadleaks|megadropsz|megadumpz|stownrusis|iedprivatedqu).com))\/s\?/ // @include /adbypass.eu/ +// @include /(bypass.city|adbypass.org)\/bypass\?bypass=/ // @include /mundopolo.net/ // @include /comohoy.com/ // @include /sphinxanime.com\/short/ @@ -1766,6 +1767,36 @@ })(); // ----- ----- ----- +// ----- bypass.city redirect helper ----- +(function() { + 'use strict'; + let url = window.location.href; + const isValidUrl = url => { try { new URL(url); return true; } catch (error) { return false; } }; + + function makeUrlClickable(element) { + let url = element.textContent.match(/(https?:\/\/\S+)/)[0]; + if (url && isValidUrl(url)) { + let link = document.createElement('a'); link.href = url; link.textContent = url; + element.innerHTML = element.innerHTML.replace(url, link.outerHTML); + return url; + } + } + + if (/(bypass.city|adbypass.org)\/bypass\?bypass=/.test(url)){ + window.addEventListener('load', function() { //After window loaded + let checkInterval = setInterval(function() { //Check every 0.5s if the link is available + let linkContainerElement = document.querySelector('div.mantine-fn96xv:nth-child(3)'); + if (linkContainerElement && linkContainerElement.innerHTML.includes('http')) { + clearInterval(checkInterval); + let targetUrl = makeUrlClickable(linkContainerElement); + // if (confirm("redirect to " + targetUrl + " ?")) {window.location.assign(targetUrl);}; + } + }, 500); + }); + } +})(); +// ----- ----- ----- + // ----- Extra bypasses ----- (function() { 'use strict'; diff --git a/extra_bypasses/bypass.city.user.js b/extra_bypasses/bypass.city.user.js new file mode 100644 index 0000000..4e15336 --- /dev/null +++ b/extra_bypasses/bypass.city.user.js @@ -0,0 +1,36 @@ +// ==UserScript== +// @name bypass.city redirect helper +// @include /(bypass.city|adbypass.org)\/bypass\?bypass=/ +// @run-at document-start +// @icon https://www.google.com/s2/favicons?sz=64&domain=bypass.city +// ==/UserScript== + +// ----- bypass.city redirect helper ----- +(function() { + 'use strict'; + let url = window.location.href; + const isValidUrl = url => { try { new URL(url); return true; } catch (error) { return false; } }; + + function makeUrlClickable(element) { + let url = element.textContent.match(/(https?:\/\/\S+)/)[0]; + if (url && isValidUrl(url)) { + let link = document.createElement('a'); link.href = url; link.textContent = url; + element.innerHTML = element.innerHTML.replace(url, link.outerHTML); + return url; + } + } + + if (/(bypass.city|adbypass.org)\/bypass\?bypass=/.test(url)){ + window.addEventListener('load', function() { //After window loaded + let checkInterval = setInterval(function() { //Check every 0.5s if the link is available + let linkContainerElement = document.querySelector('div.mantine-fn96xv:nth-child(3)'); + if (linkContainerElement && linkContainerElement.innerHTML.includes('http')) { + clearInterval(checkInterval); + let targetUrl = makeUrlClickable(linkContainerElement); + // if (confirm("redirect to " + targetUrl + " ?")) {window.location.assign(targetUrl);}; + } + }, 500); + }); + } +})(); +// ----- ----- ----- diff --git a/supported_sites.txt b/supported_sites.txt index f5dcbec..1028ba1 100644 --- a/supported_sites.txt +++ b/supported_sites.txt @@ -631,6 +631,7 @@ sigmalinks.in r1.foxylinks.site /(free-content.pro|((ebaticalfel|downbadleaks|megadropsz|megadumpz|stownrusis|iedprivatedqu).com))\/s\?/ /adbypass.eu/ +/(bypass.city|adbypass.org)\/bypass\?bypass=/ /mundopolo.net/ /comohoy.com/ /sphinxanime.com\/short/