Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name Hide games on Steam
- // @namespace http://tampermonkey.net/
- // @version 0.5.1
- // @description Hides games on Steam comming soon search
- // @author ZeDoCaixao
- // @match http://store.steampowered.com/search/*
- // @require https://code.jquery.com/jquery-3.1.0.min.js
- // @grant M_xmlhttpRequest
- // @grant GM_setValue
- // @grant GM_getValue
- // ==/UserScript==
- (function() {
- 'use strict';
- var ids = GM_getValue("steamhidden");
- if (typeof ids === 'undefined' || !ids) {
- ids = [];
- }
- ids.forEach(function(id) {
- $('a[data-ds-appid='+id+']').remove();
- });
- $('.search_result_row').each(function() {
- var id = this.getAttribute('data-ds-appid');
- var el = $(this);
- var e = el.children('.responsive_search_name_combined').children('div').children('p');
- 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());
- $("#hide_"+id).click(function() {
- ids.push(id);
- GM_setValue("steamhidden", ids);
- el.remove();
- event.preventDefault();
- });
- });
- })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement