Greasy Fork is available in English.

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

  1. // ==UserScript==
  2. // @name Show Linux games when you scroll on the Steam store page
  3. // @namespace wetwildwoods.org
  4. // @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
  5. // @include http://store.steampowered.com/
  6. // @include https://store.steampowered.com/
  7. // @version 1.3
  8. // @grant none
  9. // @run-at document-start
  10. // ==/UserScript==
  11.  
  12. document.addEventListener('DOMContentLoaded', function() {
  13. var links = document.getElementsByTagName("a");
  14. for(var i = 0; i < links.length; i++) {
  15. var link = links[i];
  16. var index = link.href.indexOf("os=win");
  17. if(index > 0) {
  18. link.href = link.href.replace(/os\=win/g, 'os=linux');
  19. }
  20. }
  21.  
  22. $J.fn.pagedautoloader = function( options ) {
  23. var settings = $J.extend({
  24. triggerStart: 0,
  25. template_url: false
  26. }, options );
  27. settings.template_url = settings.template_url.replace(/os\=win/g, 'os=linux');
  28.  
  29. return this.each(function( i, ele ) {
  30.  
  31. ele.indices = {chunks: 0};
  32.  
  33. var offset = $J(ele).offset();
  34. this.nNextTrigger = $J(ele).height() + offset.top - 750;
  35.  
  36. ele.bTriggerActive = false;
  37. ele.tagIndex = 0;
  38. ele.nRecommendedDataIndex = 0;
  39. ele.rgSeenApps = [];
  40. ele.nPage = 0;
  41. ele.bMoreContent = true;
  42.  
  43.  
  44. var loadFunc = function() {
  45. ele = this;
  46.  
  47. if( this.bTriggerActive || g_bDisableAutoloader )
  48. {
  49. return;
  50. }
  51.  
  52. this.bTriggerActive = true;
  53.  
  54. if( this.bMoreContent )
  55. {
  56. $J(this).show();
  57. ele.nPage = ele.nPage + 1;
  58.  
  59. this.bTriggerActive = true;
  60.  
  61. $J('#content_loading').show();
  62.  
  63. var jqxhr = $J.ajax( {
  64. url: settings.template_url,
  65. data: {
  66. page: this.nPage
  67. },
  68. type: 'GET'
  69. }).done(function( data ) {
  70. ele.index++;
  71. var newElement = $J(data);
  72.  
  73. GDynamicStore.DecorateDynamicItems(newElement);
  74.  
  75. $J(ele).append(newElement);
  76. ele.bTriggerActive = false;
  77.  
  78. var nCurrentScroll = $J(window).scrollTop() + $J(window).height();
  79. ele.nNextTrigger = $J(ele).height() + offset.top - 750;
  80. if(nCurrentScroll > ele.nNextTrigger)
  81. {
  82. loadFunc.apply(ele);
  83. }
  84.  
  85. }).fail(function(){
  86. ele.bMoreContent = false;
  87. }).always(function() {
  88. $J('#content_loading').hide();
  89. });
  90. }
  91.  
  92. bAutoLoaderReady = true;
  93. };
  94.  
  95. var scrollFunc = function( event ){
  96. if ( g_bDisableAutoloader )
  97. return;
  98.  
  99. if( bAutoLoaderReady )
  100. WebStorage.SetLocal('home_scroll',$J(window).scrollTop(), true);
  101.  
  102. var nCurrentScroll = $J(window).scrollTop() + $J(window).height();
  103. if(nCurrentScroll > this.nNextTrigger)
  104. {
  105. loadFunc.apply(this);
  106. }
  107. };
  108.  
  109. $J(document).scroll( function() { return scrollFunc.apply(ele); } );
  110. });
  111.  
  112. };
  113. });