Direct Links From Steam

Skips Steam's redirect page and causes external site links to be direct.

  1. // ==UserScript==
  2. // @name Direct Links From Steam
  3. // @namespace http://tampermonkey.net/
  4. // @version 1.0
  5. // @description Skips Steam's redirect page and causes external site links to be direct.
  6. // @author Guessed#8822
  7. // @license MIT
  8. // @include https://steamcommunity.com/*
  9. // @include https://store.steampowered.com/*
  10. // @require http://code.jquery.com/jquery-latest.js
  11. // ==/UserScript==
  12.  
  13. $(document).ready(function() {
  14. $('a').each(function() {
  15. try {
  16. if($(this).attr('href').indexOf('linkfilter') > -1) { //this looks for urls that include the redirect page
  17. var wrkstr = $(this).attr('href');
  18. wrkstr = wrkstr.slice(wrkstr.indexOf('url=http')+4); //slice off everything before the url= parameter
  19. if (wrkstr.indexOf('&') > -1) {
  20. wrkstr = wrkstr.substring(0, wrkstr.indexOf('&')); //remove any parameters after url
  21. }
  22. $(this).attr('href', wrkstr); //write the fixed URL to the href attribute
  23. }
  24. } catch(error) { //this handles a-tags that have no href value
  25. }
  26. });
  27. });

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址