Advertisement
Guest User

Untitled

a guest
Feb 25th, 2018
298
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.25 KB | None | 0 0
  1. // ==UserScript==
  2. // @name Hide games on Steam
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.5.1
  5. // @description Hides games on Steam comming soon search
  6. // @author ZeDoCaixao
  7. // @match http://store.steampowered.com/search/*
  8. // @require https://code.jquery.com/jquery-3.1.0.min.js
  9. // @grant M_xmlhttpRequest
  10. // @grant GM_setValue
  11. // @grant GM_getValue
  12. // ==/UserScript==
  13.  
  14. (function() {
  15. 'use strict';
  16. var ids = GM_getValue("steamhidden");
  17. if (typeof ids === 'undefined' || !ids) {
  18. ids = [];
  19. }
  20. ids.forEach(function(id) {
  21. $('a[data-ds-appid='+id+']').remove();
  22. });
  23. $('.search_result_row').each(function() {
  24. var id = this.getAttribute('data-ds-appid');
  25. var el = $(this);
  26. var e = el.children('.responsive_search_name_combined').children('div').children('p');
  27. e.html('<span style="margin-top: -1em; vertical-align: super; font-size: smaller;"> <a href=""javascript:void()" id="hide_'+id+'">[hide]</a></span>' + e.html());
  28. $("#hide_"+id).click(function() {
  29. ids.push(id);
  30. GM_setValue("steamhidden", ids);
  31. el.remove();
  32. event.preventDefault();
  33. });
  34. });
  35. })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement