Steam Link Filter Bypass - 2024 SE

Bypasses Steam client / webstore external link filter

  1. // ==UserScript==
  2. // @name Steam Link Filter Bypass - 2024 SE
  3. // @icon https://store.steampowered.com/favicon.ico
  4. // @author Axer128
  5. // @namespace http://tampermonkey.net/
  6. // @license MIT
  7. // @version 1.2
  8. // @description Bypasses Steam client / webstore external link filter
  9. // @match https://steamcommunity.com/linkfilter/*
  10. // @grant none
  11. // @run-at document-idle
  12. // ==/UserScript==
  13.  
  14. (function() {
  15. 'use strict';
  16.  
  17. function extractURL() {
  18. // Get all the text from the webpage
  19. const pageText = document.body.textContent;
  20.  
  21. // Regular expression to match URLs starting with "https://" or "http://"
  22. const regex = /(https?|http):\/\/[^\s]+/;
  23.  
  24. // Extract the first URL that matches the regular expression
  25. const match = pageText.match(regex);
  26.  
  27. // Check if a match is found
  28. if (match && match.length > 0) {
  29. // Store the matched URL in the extractedURL variable
  30. const extractedURL = match[0];
  31. // Check if the extracted URL is not on steamcommunity.com
  32. if (!extractedURL.includes('steamcommunity.com')) {
  33. window.location.replace(extractedURL); // Redirect to the extracted URL
  34. } else {
  35. // If the extracted URL is on steamcommunity.com, re-run the script
  36. setTimeout(extractURL, 1500); // 1000 milliseconds = 1 seconds
  37. }
  38. }
  39. }
  40.  
  41. // Use the window.onload event to run the script after the page has fully loaded
  42. window.onload = function() {
  43. // Add a delay before calling the extractURL function (optional)
  44. setTimeout(extractURL, 1000); // 1000 milliseconds = 1 seconds
  45. };
  46. })();