Show Linux games when you scroll on the Steam store page

Sorry not working anymore, I'll update if I find a way to fix it but it's unlikely. Display Linux games instead of Windows games on the Steam Store page when you scroll down

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。

您需要先安装用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name        Show Linux games when you scroll on the Steam store page
// @namespace   wetwildwoods.org
// @description Sorry not working anymore, I'll update if I find a way to fix it but it's unlikely. Display Linux games instead of Windows games on the Steam Store page when you scroll down
// @include     http://store.steampowered.com/
// @include     https://store.steampowered.com/
// @version     1.3
// @grant       none
// @run-at document-start
// ==/UserScript==

document.addEventListener('DOMContentLoaded', function() {
  var links = document.getElementsByTagName("a");
  for(var i = 0; i < links.length; i++) {
    var link = links[i];
    var index = link.href.indexOf("os=win");
    if(index > 0) {
      link.href = link.href.replace(/os\=win/g, 'os=linux');
    }
  }

  $J.fn.pagedautoloader = function( options ) {
      var settings = $J.extend({
          triggerStart: 0,
          template_url: false
      }, options );
      settings.template_url = settings.template_url.replace(/os\=win/g, 'os=linux');

      return this.each(function( i, ele ) {

          ele.indices = {chunks: 0};

          var offset = $J(ele).offset();
          this.nNextTrigger = $J(ele).height() + offset.top - 750;

          ele.bTriggerActive = false;
          ele.tagIndex = 0;
          ele.nRecommendedDataIndex = 0;
          ele.rgSeenApps = [];
          ele.nPage = 0;
          ele.bMoreContent = true;


          var loadFunc = function() {
              ele = this;

              if( this.bTriggerActive || g_bDisableAutoloader )
              {
                  return;
              }

              this.bTriggerActive = true;

              if( this.bMoreContent )
              {
                  $J(this).show();
                  ele.nPage = ele.nPage + 1;

                  this.bTriggerActive = true;

                  $J('#content_loading').show();

                  var jqxhr = $J.ajax( {
                      url: settings.template_url,
                      data: {
                          page: this.nPage
                      },
                      type: 'GET'
                  }).done(function( data ) {
                      ele.index++;
                      var newElement = $J(data);

                      GDynamicStore.DecorateDynamicItems(newElement);

                      $J(ele).append(newElement);
                      ele.bTriggerActive = false;

                      var nCurrentScroll = $J(window).scrollTop() + $J(window).height();
                      ele.nNextTrigger = $J(ele).height() + offset.top - 750;
                      if(nCurrentScroll > ele.nNextTrigger)
                      {
                          loadFunc.apply(ele);
                      }

                  }).fail(function(){
                      ele.bMoreContent = false;
                  }).always(function() {
                      $J('#content_loading').hide();
                  });
              }

              bAutoLoaderReady = true;
          };

          var scrollFunc = function( event ){
              if ( g_bDisableAutoloader )
                  return;

              if( bAutoLoaderReady )
                  WebStorage.SetLocal('home_scroll',$J(window).scrollTop(), true);

              var nCurrentScroll = $J(window).scrollTop() + $J(window).height();
              if(nCurrentScroll > this.nNextTrigger)
              {
                  loadFunc.apply(this);
              }
          };

          $J(document).scroll( function() { return scrollFunc.apply(ele); } );
      });

  };
});