Greasy Fork is available in English.

Steam Link Filter Bypass - 2024 SE

Bypasses Steam client / webstore external link filter

// ==UserScript==
// @name         Steam Link Filter Bypass - 2024 SE
// @icon         https://store.steampowered.com/favicon.ico
// @author       Axer128
// @namespace    http://tampermonkey.net/
// @license      MIT
// @version      1.2
// @description  Bypasses Steam client / webstore external link filter
// @match        https://steamcommunity.com/linkfilter/*
// @grant        none
// @run-at       document-idle
// ==/UserScript==

(function() {
    'use strict';

    function extractURL() {
        // Get all the text from the webpage
        const pageText = document.body.textContent;

        // Regular expression to match URLs starting with "https://" or "http://"
        const regex = /(https?|http):\/\/[^\s]+/;

        // Extract the first URL that matches the regular expression
        const match = pageText.match(regex);

        // Check if a match is found
        if (match && match.length > 0) {
            // Store the matched URL in the extractedURL variable
            const extractedURL = match[0];
            // Check if the extracted URL is not on steamcommunity.com
            if (!extractedURL.includes('steamcommunity.com')) {
                window.location.replace(extractedURL); // Redirect to the extracted URL
            } else {
                // If the extracted URL is on steamcommunity.com, re-run the script
                setTimeout(extractURL, 1500); // 1000 milliseconds = 1 seconds
            }
        }
    }

    // Use the window.onload event to run the script after the page has fully loaded
    window.onload = function() {
        // Add a delay before calling the extractURL function (optional)
        setTimeout(extractURL, 1000); // 1000 milliseconds = 1 seconds
    };
})();