diff --git a/Bypass_All_Shortlinks.meta.js b/Bypass_All_Shortlinks.meta.js index c4ad1e5..0dd732c 100644 --- a/Bypass_All_Shortlinks.meta.js +++ b/Bypass_All_Shortlinks.meta.js @@ -4,7 +4,7 @@ // @run-at document-start // @author Amm0ni4 // @noframes -// @version 92.3.23 +// @version 92.3.25 // @grant GM_setValue // @grant GM_getValue // @grant GM_addStyle diff --git a/Bypass_All_Shortlinks.user.js b/Bypass_All_Shortlinks.user.js index 7b54602..20b5574 100644 --- a/Bypass_All_Shortlinks.user.js +++ b/Bypass_All_Shortlinks.user.js @@ -4,7 +4,7 @@ // @run-at document-start // @author Amm0ni4 // @noframes -// @version 92.3.23 +// @version 92.3.25 // @grant GM_setValue // @grant GM_getValue // @grant GM_addStyle @@ -1808,10 +1808,15 @@ const isValidUrl = url => { try { new URL(url); return true; } catch (error) { return false; } }; function makeUrlClickable(element) { - let url = element.textContent.match(/(https?:\/\/\S+)/)[0]; + let initialUrl = element.textContent; + let url = element.textContent.replace('The resolved url is: ', '') + if (!url.startsWith('http')) { + url = 'https://' + url; + } + url = url.match(/(https?:\/\/\S+)/)[0]; if (url && isValidUrl(url) && !url.endsWith('...')) { let link = document.createElement('a'); link.href = url; link.textContent = url; - element.innerHTML = element.innerHTML.replace(url, link.outerHTML); + element.innerHTML = 'The resolved url is: ' + element.innerHTML.replace(initialUrl, link.outerHTML); return url; } } @@ -1820,10 +1825,12 @@ 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')) { + if (linkContainerElement) { clearInterval(checkInterval); let targetUrl = makeUrlClickable(linkContainerElement); - isValidUrl(targetUrl) && window.location.assign(targetUrl); + if (isValidUrl(targetUrl)) { + setTimeout(function() { window.location.assign(targetUrl); }, 4000); + } } }, 500); }); diff --git a/extra_bypasses/bypass.city.user.js b/extra_bypasses/bypass.city.user.js index 81458bc..4b4fd33 100644 --- a/extra_bypasses/bypass.city.user.js +++ b/extra_bypasses/bypass.city.user.js @@ -12,10 +12,15 @@ const isValidUrl = url => { try { new URL(url); return true; } catch (error) { return false; } }; function makeUrlClickable(element) { - let url = element.textContent.match(/(https?:\/\/\S+)/)[0]; + let initialUrl = element.textContent; + let url = element.textContent.replace('The resolved url is: ', '') + if (!url.startsWith('http')) { + url = 'https://' + url; + } + url = url.match(/(https?:\/\/\S+)/)[0]; if (url && isValidUrl(url) && !url.endsWith('...')) { let link = document.createElement('a'); link.href = url; link.textContent = url; - element.innerHTML = element.innerHTML.replace(url, link.outerHTML); + element.innerHTML = 'The resolved url is: ' + element.innerHTML.replace(initialUrl, link.outerHTML); return url; } } @@ -24,10 +29,12 @@ 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')) { + if (linkContainerElement) { clearInterval(checkInterval); let targetUrl = makeUrlClickable(linkContainerElement); - isValidUrl(targetUrl) && window.location.assign(targetUrl); + if (isValidUrl(targetUrl)) { + setTimeout(function() { window.location.assign(targetUrl); }, 4000); + } } }, 500); });