forked from Lutymane/Steam-Scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGame-Inventories-Count.user.js
More file actions
34 lines (31 loc) · 1.12 KB
/
Copy pathGame-Inventories-Count.user.js
File metadata and controls
34 lines (31 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// ==UserScript==
// @name Game Inventories Count
// @icon https://store.steampowered.com/favicon.ico
// @namespace top_xex
// @version 1.7
// @description It shows how many game inventories user has
// @author Lite_OnE
// @match *://steamcommunity.com/*/*/inventory*
// @match *://steamcommunity.com/groups/InventoryService
// @grant none
// ==/UserScript==
var Inventories = null;
var Count = 0;
$J(document).ready(function(){
if(location.href.includes('InventoryService'))
{
Count = $J('.group_associated_game_icon').length;
$J('.rightbox_content_header').contents()[0].textContent += ' COUNT: ' + Count;
}
else
{
Inventories = $J('[id*=inventory_link_]');
Count = Inventories.length;
$J('.games_list_tabs_ctn.responsive_hidden').before('<div class="fraud_warning"><div class="fraud_warning_box"><span>Game Inventories Count: ' + Count + '</span></div></div>');
setTimeout(function(){
Inventories.each(function(){
$J(this).attr('style', 'display:block;');
});
}, 500);
}
});