-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathjs_tweaks.yml
221 lines (205 loc) · 9.09 KB
/
js_tweaks.yml
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
---
EnableJSTweaks:
name: Enable JS Tweaks
desc: Loads Tweaked JS. If this is disabled, no other tweaks will be applied.
category: Core
file: library.js
strings:
- find: '"libraryroot",'
repl: '"libraryreet",'
HomePageGridSpacing:
name: Home Page Grid Spacing
desc: Change grid spacing between games on the HOME page.
category: Home Page
values: [ColumnSpacing,RowSpacing]
strings:
- find: 'gridColumnGap: 16,'
repl: 'gridColumnGap: @ColumnSpacing@,'
- find: 'gridRowGap: 24,'
repl: 'gridRowGap: @RowSpacing@,'
MoreScreenshotsAndDLC:
name: Increase Number of Screenshots and DLC displayed
desc: Increase Number of Screenshots and DLC displayed on game page.
category: Game Page
values: [Screenshots,DLC]
strings:
- find: vecScreenShots.slice(0, 4).map
repl: vecScreenShots.slice(0, @Screenshots@).map
- find: this.props.rgInfo.slice(0, 6)
repl: this.props.rgInfo.slice(0, @DLC@)
HoverPositionFix:
name: HoverPosition Fix for GameListEntry
desc: Fix hover position of GameList hover for long game names.
category: Game List
values: [Zoom]
strings:
- find: '%1% = m.nTop,'
repl: >-
%1% = (t.children[0] && t.children[0].childNodes[0]
&& t.children[0].childNodes[0].childNodes[0]
&& t.children[0].childNodes[0].childNodes[0].classList
&& t.children[0].childNodes[0].childNodes[0].classList.contains("gamelistentry_HoverOverlay_3cMVy")
&& t.children[0].childNodes[0].childNodes[0].classList.contains("gamelistentry_Container_2-O4Z"))
|| (t.children[0].classList && t.children[0].classList.contains("gamelistentry_FriendStatusHover_2iiN7"))
? m.nTop * 0.75 : m.nTop,
ScrollPastAddShelf:
name: Scroll past ADD SHELF Button on load
desc: On load, scroll the HOME page down 30 pixels to hide the ADD SHELF button.
category: Home Page
values: [ScrollOffset]
strings:
- find: this.SetStateLoaded(),
repl: this.SetStateLoaded(),document.getElementsByClassName("smartscrollcontainer_Body_3lDcz")[0].scrollTop = 30,
- find: 'scrollTop: 0'
repl: 'scrollTop: 30'
- find: '%1%.m_nScrollTop = 0, %1%.m_elTarget'
repl: '%1%.m_nScrollTop = 30, %1%.m_elTarget'
ChangeGameImageGridSizes:
name: Change Game Image Grid Sizes
desc: Default widths 111, 148, 222
category: Home Page
file: library.js
values: [SmallGridSize,MediumGridSize,LargeGridSize]
strings:
- find: '(n = 111, %1% = !0) : 2 == e ? n = 148 : 3 == e && (n = 222),'
repl: '(n = @SmallGridSize@, %1% = !0) : 2 == e ? n = @MediumGridSize@ : 3 == e && (n = @LargeGridSize@),'
VerticalNavBar:
name: Vertical Nav Bar
desc: Change gamepage navigation bar from horizontal to vertical.
category: Game Page
strings:
- find: 'p.push({~~x: %1%,'
repl: 'x: 0,'
- find: 'y: %1% * %2%'
repl: 'y: %1% * (%2% - 10)'
- find: '%1% = 0), %2% < %3% ?'
repl: '%1% = 0), true ?'
LandscapeGameImages:
name: Use Landscape Game Images
desc: Replace portrait game images across Steam library with landscape ones.
category: Home Page
strings:
- find: 'eAssetType: 0,'
repl: 'eAssetType: 3,'
- find: 'childHeight: 1.5 * n,'
repl: 'childHeight: n * 43 / 92,'
- find: s = e.nHeight,
repl: s = e.nWidth * 43 / 92,
- find: 'height: e.nItemHeight + i + "px"'
repl: 'minHeight: 125 + "px"'
- find: 2.108 * l.nItemWidth
repl: Math.max(2.108 * l.nItemWidth, 270)
- find: 2.108 * s.nItemWidth
repl: Math.max(2.108 * s.nItemWidth, 270)
- find: 'height: s + "px"'
repl: 'height: n ? Math.max(s, 150) + "px" : s + "px"'
StopWhatsNewLoad:
name: Stop What's New Events from Loading
desc: Replaces URL to load What's New events with blank
category: Home Page
strings:
- find: n = %1%.%2%.STORE_BASE_URL + "events/ajaxgetbesteventsforuser",
repl: n = "",
SmootherHomePageScrolling:
name: Smoother HOME page Scrolling
desc: Reduce number of ComputeLayout calls.
category: Home Page
strings:
- find: var t = this.m_elGrid.current.getBoundingClientRect();
repl: var t = this.m_elGrid.current.getBoundingClientRect(); /*
- find: t.top < window.innerHeight && t.bottom > 0 && this.ComputeLayout())
repl: >-
t.top < window.innerHeight && t.bottom > 0 && this.ComputeLayout()) */
var timeSince;
timeSince = performance.now() - this.lastTime;
this.lastTime = performance.now();
setTimeout(function(){timeSince > 60, this.ComputeLayout()}.bind(this),200)
GamePropertiesWindowSize:
name: Game Properties Window Size
desc: Change Game Properties Window width.
category: Windows
values: [PropertiesWidth]
strings:
- find: 'bForcePopOut: !0,~~popupWidth: 842,'
repl: 'popupWidth: 672,'
StickyBackgroundImage:
name: CLASSIC Sticky background image and spillover into sidebar
desc: (BETA) Set/Clear Custom Background right-click is not contextual.
category: Game Page
refs:
- '%a%.currentGameListSelection.nAppId'
- '"#CustomArt_SetCustomBackground")), %a%.createElement(%b%.%c%'
- 'Object(%a%.%b%)("#CustomArt_'
- - 'Object(%a%.%b%)([%c%.%d%], %e%.prototype, "OnChangeHero", null)'
- 'Object(%a%.%b%)([%c%.%d%], %e%.prototype, "OnRemoveHero", null)'
strings:
- find: 'rgHeaderImages: this.props.rgHeaderImages,'
repl: 'rgHeaderImages: "",'
- find: 'strMedium: "MediumWindow"~~};'
repl: >-
}; var sURL,
appId = (%a% && %a%.currentGameListSelection && %a%.currentGameListSelection.nAppId) || 0, sURL2="", sURL3="", sURL4="";
sURL = "customimages/" + appId + "_hero.png",
sURL2 = "customimages/" + appId + "_hero.jpg",
sURL3 = "assets/" + appId + "_library_hero.jpg",
sURL4 = "https://steamcdn-a.akamaihd.net/steam/apps/" + appId + "/library_hero.jpg";
- find: 'className: t.join(" "),'
repl: >-
className: t.join(" "),
style: {
background: "-webkit-linear-gradient(rgba(0,0,0,0) 0%, rgba(0,0,0,1) 60%),
url(" + sURL + ")" + ", url(" + sURL2 + ")" + ", url(" + sURL3 + ")" + ", url(" + sURL4 + ")"},
- find: 'src: this.props.rgBlurImages[this.state.nBlurImageIndex],'
repl: 'src: "",'
- find: '(this.is_hero_custom_image ? "#CustomArt_ClearCustomBackground" : "#CustomArt_SetCustomBackground")),'
repl: '("#CustomArt_SetCustomBackground")), %a%.createElement(%b%.%c%, {is_hero_current_image: !1, onSelected: this.OnRemoveHero}, Object(%a%.%b%)("#CustomArt_ClearCustomBackground")),'
- find: '}, t.prototype.OnChangeLogo = function(e) {'
repl: '}, t.prototype.OnRemoveHero = function(e) {this.OnChangeArtwork(Object.create({src: "src"}), this.m_refFileInputHero, 1)}, t.prototype.OnChangeLogo = function(e) {'
- find: 'Object(%a%.%b%)([%c%.%d%], %e%.prototype, "OnChangeHero", null),'
repl: 'Object(%a%.%b%)([%c%.%d%], %e%.prototype, "OnChangeHero", null), Object(%a%.%b%)([%c%.%d%], %e%.prototype, "OnRemoveHero", null),'
PressEnterToLaunchGames:
name: Press Enter to launch games
category: Game Page
strings:
- find: 'switch (t) {~~case 38:'
repl: 'case 13: return this.RunApp(S.a.currentGameListSelection.nAppId), void e.preventDefault(); case 38:'
- find: '}, t.prototype.MoveRangeSelectUpOneRow = function() {'
repl: '}, t.prototype.RunApp = function(e) {window.location.href = "steam://rungameid/" + e;}, t.prototype.MoveRangeSelectUpOneRow = function() {'
ExpandShowMoreDetails:
name: Expand Show More Details panel by default
category: Game Page
strings:
- find: 'var e, t = this.props.expand ? %1%.%2%.AppDetailsExpanded : %1%.%2%.AppDetailsCollapsed,'
repl: 'var e, t = this.props.expand ? %1%.%2%.AppDetailsCollapsed : %1%.%2%.AppDetailsExpanded,'
- find: 'this.props.expand ? this.state.gameInfoHeight + "px" : "0px"'
repl: 'this.props.expand ? "0px" : this.state.gameInfoHeight + "px"'
- find: 'className: %1%.%2%.GameInfoShadow'
repl: 'className: ""'
DimUninstalledGames:
name: Dim Uninstalled Games
desc: Make uninstalled Games on HOME PAGE partially transparent.
category: Home Page
strings:
- find: 'onContextMenu: this.OnContextMenu,~~hoverDelay: 300,'
repl: 'hoverDelay: 300, style: this.props.app.installed ? {} : {opacity: "var(--UninstalledGameImageOpacity)"},'
DontLoadHomeGameImages:
name: '**Experimental** Don''t load HOME game images, only alt text'
category: Home Page
strings:
- find: '!!t && this.BDisplayTitle() && D.createElement("span"'
repl: 'D.createElement("span"'
- find: 'className: so.a.Image,'
repl: 'className: so.a.Image, /*'
- find: 'onLoad: this.OnImageLoaded,'
repl: '*/rgSources: "", onIncrementalError: this.OnIncrementalError, onLoad: this.OnImageLoaded,'
DontLoadGamePageSections:
name: '**Experimental** Only load essential elements'
desc: Only load essential elements on game page (Play Button and Nav Bar)
category: Game Page
strings:
- find: '}, D.createElement(Zs, {'
repl: '}, /*D.createElement(Zs, {'
- find: '}, l), D.createElement(DS, {'
repl: '}, l), /*D.createElement(DS, {'
- find: this.GetAppsCollectionList(t))))
repl: this.GetAppsCollectionList(t)))