steam-theming-utils 3.3.0 → 3.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/cdp/db/accountpreferences.js +1 -0
- package/cdp/db/apppage.js +8 -1
- package/cdp/db/client.js +34 -20
- package/cdp/db/shoppingcart.js +2 -1
- package/cdp/db/storemenu.js +14 -0
- package/lib/build_class_modules.js +1 -0
- package/package.json +7 -6
- package/src/api.js +1 -1
- package/src/postcss_plugins/append_important.js +5 -0
- package/src/postcss_plugins/selector_replacer.js +5 -4
- package/src/shared.js +15 -1
package/README.md
CHANGED
|
@@ -31,6 +31,7 @@ Note that running any script requires Steam running with `-cef-enable-debugging`
|
|
|
31
31
|
| notificationspage | https://steamcommunity.com/my/notifications |
|
|
32
32
|
| profileedit | https://steamcommunity.com/my/edit |
|
|
33
33
|
| shoppingcart | https://store.steampowered.com/cart |
|
|
34
|
+
| storemenu | https://store.steampowered.com (or any Steam store page) |
|
|
34
35
|
|
|
35
36
|
## Errors
|
|
36
37
|
|
|
@@ -3,6 +3,7 @@ exportedModules = [
|
|
|
3
3
|
["authorizeddevices", (e) => e.AuthorizedDeviceGroup],
|
|
4
4
|
["cookies", (e) => e.CookieSection],
|
|
5
5
|
["familymanagement", (e) => e.FamilySettingsContainer],
|
|
6
|
+
["familymanagementinvites", (e) => e.IncomingInviteRow],
|
|
6
7
|
["familymanagementtabs", (e) => e.GraphicalAssetsTabs],
|
|
7
8
|
// TODO: shared with steam settings notif page
|
|
8
9
|
["notifications", (e) => e.NotificationSection],
|
package/cdp/db/apppage.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
exportedModules = [
|
|
2
|
-
|
|
2
|
+
// TODO: not found if no broadcast
|
|
3
|
+
["broadcastembed", (e) => e.bordered_container],
|
|
4
|
+
["broadcastlivestreamicon", (e) => e.bordered_live_stream_icon],
|
|
3
5
|
["capsule", (e) => e.MainCapsuleImageContainer],
|
|
4
6
|
["capsulecontainer", (e) => e.SeeAllLink],
|
|
5
7
|
["carousel", (e) => e.pipScrollerContainer],
|
|
@@ -7,6 +9,11 @@ exportedModules = [
|
|
|
7
9
|
["creatorhomecarousel", (e) => e.CreatorHomeWithItems],
|
|
8
10
|
["focusring", (e) => e.FocusRingRoot],
|
|
9
11
|
["gamehover", (e) => e.GameHoverCapsuleCtn],
|
|
12
|
+
["gametrailer", (e) => e.TimeDash],
|
|
13
|
+
["gametrailercontainer", (e) => e.TrailerPlayer],
|
|
14
|
+
["gametrailercontrols", (e) => e.RowLimit],
|
|
10
15
|
["scrollsnapcarousel", (e) => e.ScrollSnapCarousel],
|
|
16
|
+
["sidebaraccessibilityinfo", (e) => e.FeatureNameContainer],
|
|
11
17
|
["sidebarcontrollerinfo", (e) => e.StoreSidebarContainer],
|
|
18
|
+
["storeitemscarousel", (e) => e.StoreItemsCarousel],
|
|
12
19
|
];
|
package/cdp/db/client.js
CHANGED
|
@@ -39,12 +39,19 @@ specialModules = {
|
|
|
39
39
|
* These are not seen in webpackCache for some reason.
|
|
40
40
|
* TODO: unify with the rest ?
|
|
41
41
|
* TODO: is absence of top-level await a bug ?
|
|
42
|
+
*
|
|
43
|
+
* 674:
|
|
44
|
+
* - bbcodeeditor
|
|
45
|
+
* - bbcodesuggestions
|
|
46
|
+
* - clanimagechooser
|
|
47
|
+
* - clanimagepickandresize
|
|
48
|
+
* - sharewithfriends
|
|
42
49
|
*/
|
|
43
50
|
(async () => {
|
|
44
51
|
window.parsedModules = [
|
|
45
52
|
...(
|
|
46
53
|
await Promise.all(
|
|
47
|
-
["awardicon", "broadcast", "gamenotes", "gamerecording"].map(
|
|
54
|
+
["674", "awardicon", "broadcast", "gamenotes", "gamerecording"].map(
|
|
48
55
|
async (e) =>
|
|
49
56
|
(await fetch(`https://steamloopback.host/${e}.js`)).text(),
|
|
50
57
|
),
|
|
@@ -60,16 +67,28 @@ specialModules = {
|
|
|
60
67
|
switch (true) {
|
|
61
68
|
case exists("IconList"):
|
|
62
69
|
return "awardicon";
|
|
70
|
+
case exists("DragTarget"):
|
|
71
|
+
return "bbcodeeditor";
|
|
72
|
+
case exists("BBCode"):
|
|
73
|
+
return "bbcodesuggestions";
|
|
63
74
|
case exists("PopOutVideoTitleBar"):
|
|
64
75
|
return "broadcastembeddable";
|
|
76
|
+
case exists("BroadcastPlayerLite"):
|
|
77
|
+
return "broadcastplayer";
|
|
65
78
|
case exists("StoreSaleImage_mini"):
|
|
66
79
|
return "broadcastwidgets";
|
|
80
|
+
case exists("ImagesOuterContainer"):
|
|
81
|
+
return "clanimagechooser";
|
|
82
|
+
case exists("Image") && Object.keys(e).length === 1:
|
|
83
|
+
return "clanimagepickandresize";
|
|
67
84
|
case exists("ClipUploadStatus"):
|
|
68
85
|
return "clipupload";
|
|
69
86
|
case exists("GameNotesPopup"):
|
|
70
87
|
return "gamenotespopups";
|
|
71
88
|
case exists("ClipSavedHint"):
|
|
72
89
|
return "gamerecordingclip";
|
|
90
|
+
case exists("ShareDescription"):
|
|
91
|
+
return "sharewithfriends";
|
|
73
92
|
}
|
|
74
93
|
})();
|
|
75
94
|
|
|
@@ -95,7 +114,6 @@ exportedModules = [
|
|
|
95
114
|
["appactionbutton", (e) => e.PlayButtonContainer],
|
|
96
115
|
["appactivityday", (e) => e.AppActivityDay],
|
|
97
116
|
["appactivitydlc", (e) => e.CarouselControlsPadding],
|
|
98
|
-
["appcarouseltrailer", (e) => e.AppCarouselTrailerCtn],
|
|
99
117
|
["appdetails", (e) => e.AppDetailsOverviewPanel],
|
|
100
118
|
["appdetailsachievementssection", (e) => e.AchievementHoverContainer],
|
|
101
119
|
["appdetailsactivitysection", (e) => e.ActivityFeedContainer],
|
|
@@ -143,6 +161,7 @@ exportedModules = [
|
|
|
143
161
|
["appportrait", (e) => e.NoCapsuleImage],
|
|
144
162
|
["appportraithover", (e) => e.AppPortraitHover],
|
|
145
163
|
["appproperties", (e) => e.AppProperties],
|
|
164
|
+
["apppropertiescustomizationsection", (e) => e.AssetWrapper],
|
|
146
165
|
["artworkmodal", (e) => e.Creator && e.ShareButton],
|
|
147
166
|
["audio", (e) => e.VolumeSliderLabel],
|
|
148
167
|
["audiosettings", (e) => e.AudioAppCtn],
|
|
@@ -159,9 +178,7 @@ exportedModules = [
|
|
|
159
178
|
["basiclibrarysettingszoo", (e) => e.GiantHeading],
|
|
160
179
|
["basicpartnereventspage", (e) => e.BasicPartnerEventsPage],
|
|
161
180
|
["bbcode", (e) => e.ChatMessageSteamStore],
|
|
162
|
-
["bbcodeeditor", (e) => e.DragTarget],
|
|
163
181
|
["bbcodes", (e) => e.QuoteAuthor],
|
|
164
|
-
["bbcodesuggestions", (e) => e.BBCode],
|
|
165
182
|
["bluetoothsettings", (e) => e.NotConnectedLabel && e.Header],
|
|
166
183
|
["borrowgamedialog", (e) => e.BorrowGameDialog],
|
|
167
184
|
["bottombar", (e) => e.BottomBarContainer],
|
|
@@ -171,7 +188,6 @@ exportedModules = [
|
|
|
171
188
|
["broadcastchat", (e) => e.BroadcastChat],
|
|
172
189
|
["broadcastchatannouncement", (e) => e.GiveawayWinnerBox],
|
|
173
190
|
["broadcastfirsttime", (e) => e.BroadcastFirstTimeDialog],
|
|
174
|
-
["broadcastplayer", (e) => e.BroadcastPlayerLite],
|
|
175
191
|
["broadcastsettings", (e) => e.ConfigureMic],
|
|
176
192
|
["broadcaststatus", (e) => e.BroadcastStatusBody],
|
|
177
193
|
["browserviewfindinpage", (e) => e.ControlButton],
|
|
@@ -189,9 +205,8 @@ exportedModules = [
|
|
|
189
205
|
["chattabs", (e) => e.ChatTabTransitionGroup],
|
|
190
206
|
["checkforupdatesdialog", (e) => e.CheckForUpdatesDialog],
|
|
191
207
|
["claimitemshared", (e) => e.DialogCtn],
|
|
192
|
-
["clanimagechooser", (e) => e.ImagesOuterContainer],
|
|
193
|
-
["clanimagepickandresize", (e) => e.Image && Object.keys(e).length === 1],
|
|
194
208
|
["clipdecorator", (e) => e.ClipDecorator],
|
|
209
|
+
["cliphighlightcontextmenu", (e) => e.HighlightContextMenuItem],
|
|
195
210
|
["clipmanager", (e) => e.ClipActions],
|
|
196
211
|
["clipplayback", (e) => e.PlaybackControlsCtn],
|
|
197
212
|
["clipplaybackscrollbar", (e) => e.ScrollBarCtn],
|
|
@@ -254,8 +269,6 @@ exportedModules = [
|
|
|
254
269
|
["desktopsecuritysettings", (e) => e.SteamGuardIcon],
|
|
255
270
|
["desktoptoasts", (e) => e.DesktopToastPopup],
|
|
256
271
|
["dialogs", (e) => e.DialogTitle && e.DialogContent],
|
|
257
|
-
["discoveryqueuewidget", (e) => e.DiscoveryQueueApp],
|
|
258
|
-
["discoveryqueuewizard", (e) => e.DeckVerifiedLogo],
|
|
259
272
|
["discussionwidget", (e) => e.DiscussContainer],
|
|
260
273
|
["displayscaledialog", (e) => e.YouCanChangeThisLater],
|
|
261
274
|
["displaysettings", (e) => e.TimeRangeControls && !e.BandwidthInput],
|
|
@@ -285,6 +298,7 @@ exportedModules = [
|
|
|
285
298
|
["familysettings", (e) => e.AuthorizeUserField],
|
|
286
299
|
["familysharedcomponents", (e) => e.FamilyMemberRowTop],
|
|
287
300
|
["fastscrolloverlay", (e) => e.FastScrollOverlay],
|
|
301
|
+
["floatingconfirmation", (e) => e.FloatingConfirmation],
|
|
288
302
|
["focusring", (e) => e.FocusRingRoot],
|
|
289
303
|
["footer", (e) => e.BasicFooter],
|
|
290
304
|
["footericons", (e) => e.Knockout],
|
|
@@ -324,19 +338,22 @@ exportedModules = [
|
|
|
324
338
|
["gamepadpage", (e) => e.GamepadPage && !e.LeftStick],
|
|
325
339
|
["gamepadpagedsettings", (e) => e.PagedSettingsDialog_PageList_ShowTitle],
|
|
326
340
|
["gamepadsearch", (e) => e.GamepadSearch],
|
|
327
|
-
["gamepadslider", (e) => e.DefaultValueIsColorRange],
|
|
341
|
+
["gamepadslider", (e) => e.DefaultValueIsColorRange && !e.LearnMore],
|
|
328
342
|
["gamepadtabbedpage", (e) => e.CanBeHeaderBackground],
|
|
329
343
|
["gamepadtoasts", (e) => e.GamepadToastPlaceholder],
|
|
330
344
|
["gamepadui", (e) => e.GamepadUIPopupWindowBody],
|
|
331
345
|
["gamepaduisvglibrary", (e) => e.WifiBar1],
|
|
332
346
|
["gamepaduiappoverlay", (e) => e.OverlayPosition],
|
|
333
347
|
["gamepaduiappoverlayvirtualmenucontainer", (e) => e.VirtualMenuContainer],
|
|
334
|
-
["gamerecordingaudiosessionfield", (e) => e.VU],
|
|
335
348
|
["gamerecordingbitrate", (e) => e.BitrateButton],
|
|
349
|
+
["gamerecordingclipprogressdialog", (e) => e.ClipProgressDialog],
|
|
336
350
|
["gamerecordingdesktopdialog", (e) => e.GameRecordingDesktopDialog],
|
|
351
|
+
["gamerecordingexportdialog", (e) => e.PlaceholderThumbnail],
|
|
337
352
|
["gamerecordingplayer", (e) => e.GameRecordingPlayer],
|
|
338
353
|
["gamerecordingquickaccess", (e) => e.BackgroundRecordingQuickSettingRow],
|
|
339
354
|
["gamerecordingsettings", (e) => e.RecordingMode],
|
|
355
|
+
["gamerecordingsettingspage", (e) => e.VU],
|
|
356
|
+
["gamerecordingsettingspageintro", (e) => e.SinglePageIntro],
|
|
340
357
|
["gamerecordingshare", (e) => e.ExportProgressContainer],
|
|
341
358
|
["gamerecordingtour", (e) => e.TourBox],
|
|
342
359
|
["gamerecordingwarning", (e) => e.WarningBox && !e.VU],
|
|
@@ -358,7 +375,6 @@ exportedModules = [
|
|
|
358
375
|
["jumplist", (e) => e.JumpListItemText],
|
|
359
376
|
["keyboardsettings", (e) => e.KeyboardThemeButtons],
|
|
360
377
|
["keycapture", (e) => e.Capturing && !e.RecommendedNote],
|
|
361
|
-
["languagescreen", (e) => e.LanguageScreen],
|
|
362
378
|
["launchoptionsdialog", (e) => e.LaunchOptionDialog],
|
|
363
379
|
["library", (e) => e.LibraryContextMenu && !e.OverlayTransitionDurationMS],
|
|
364
380
|
["libraryassetimage", (e) => e.GreyBackground],
|
|
@@ -381,7 +397,7 @@ exportedModules = [
|
|
|
381
397
|
["logsettings", (e) => e.ManualOverlayContainer],
|
|
382
398
|
["main", (e) => e.throbberContainer],
|
|
383
399
|
["mainbrowser", (e) => e.MainBrowserContainer],
|
|
384
|
-
["mainmenu", (e) => e.IsVirtualKeyboardShown],
|
|
400
|
+
["mainmenu", (e) => e.IsVirtualKeyboardShown && e.ViewPlaceholder],
|
|
385
401
|
["mainmenuapprunning", (e) => e.NavigationBox],
|
|
386
402
|
["mainpanelapprunning", (e) => e.MainPanelAppRunning],
|
|
387
403
|
["managefriends", (e) => e.GenerateLinkButton],
|
|
@@ -401,7 +417,6 @@ exportedModules = [
|
|
|
401
417
|
["networkconnectiondialog", (e) => e.ConnectionStatus],
|
|
402
418
|
["networkdiagnosticsdialog", (e) => e.ColumnDisplayName],
|
|
403
419
|
["networkinfodialog", (e) => e.InfoDialogBody],
|
|
404
|
-
["networkscreen", (e) => e.NetworkScreen],
|
|
405
420
|
["networksettings", (e) => e.NetworkWarning && e.OfflineMode],
|
|
406
421
|
["newlogindialog", (e) => e.MessagingContainer],
|
|
407
422
|
["newloginpanel", (e) => e.CreateAccountButton],
|
|
@@ -410,7 +425,7 @@ exportedModules = [
|
|
|
410
425
|
["nonetworkoverlay", (e) => e.NoNetwork],
|
|
411
426
|
["notificationcontent", (e) => e.DownloadCompleteText],
|
|
412
427
|
["notificationssettings", (e) => e.FriendsDescription],
|
|
413
|
-
["oobecontrols", (e) => e.
|
|
428
|
+
["oobecontrols", (e) => e.OOBE],
|
|
414
429
|
["oobeerrorscreen", (e) => e.EqualWidthButtonPair],
|
|
415
430
|
["overflowbox", (e) => e.OverflowBox],
|
|
416
431
|
["overlappingtransition", (e) => e.ContentWrapper && e.TransitionGroup],
|
|
@@ -441,7 +456,7 @@ exportedModules = [
|
|
|
441
456
|
["personastatusicons", (e) => e.PersonaStatusIcon],
|
|
442
457
|
["pininput", (e) => e.DigitInputField],
|
|
443
458
|
["playersdialog", (e) => e.PlayersDialog],
|
|
444
|
-
["powermenu", (e) => e.SuspendDialog],
|
|
459
|
+
["powermenu", (e) => e.SuspendDialog && e.ActionButton],
|
|
445
460
|
["presenterpopup", (e) => e.Speaker],
|
|
446
461
|
["progressbar", (e) => e.ProgressBarFieldStatus],
|
|
447
462
|
["qrcode", (e) => e.QRBits],
|
|
@@ -460,7 +475,6 @@ exportedModules = [
|
|
|
460
475
|
["reactions", (e) => e.ReactorName],
|
|
461
476
|
["recentchatssteamdeck", (e) => e.RecentChatsList],
|
|
462
477
|
["recentlycompleted", (e) => e.RecentlyCompleted],
|
|
463
|
-
["reloadingdialog", (e) => e.Popup && Object.keys(e).length === 1],
|
|
464
478
|
["remainderlist", (e) => e.ItemWrapper],
|
|
465
479
|
["remoteplay", (e) => e.ContentForm],
|
|
466
480
|
["remoteplaydialog", (e) => e.SegmentedInput && Object.keys(e).length === 3],
|
|
@@ -481,6 +495,7 @@ exportedModules = [
|
|
|
481
495
|
(e) => e.OverlayContainer && e.SpacingContainer,
|
|
482
496
|
],
|
|
483
497
|
["screenshotmanagerdialog", (e) => e.ScreenshotFormRow],
|
|
498
|
+
["screenshotmanagerphaselist", (e) => e.PhaseListContainer],
|
|
484
499
|
["screenshotpopout", (e) => e.PopupScreenshotModal],
|
|
485
500
|
["screenshots", (e) => e.ClickableScreenshot],
|
|
486
501
|
["scrollfade", (e) => e.ScrollFade],
|
|
@@ -497,7 +512,6 @@ exportedModules = [
|
|
|
497
512
|
["sharedappdetailsheader", (e) => e.BoxSizerDelete],
|
|
498
513
|
["sharedialog", (e) => e.ShareButton && e.ShareIcon],
|
|
499
514
|
["sharescreenshotupload", (e) => e.ShareScreenshotDialog],
|
|
500
|
-
["sharewithfriends", (e) => e.ShareDescription],
|
|
501
515
|
["shorttemplates", (e) => e.ShortTemplate],
|
|
502
516
|
["shutdowndialog", (e) => e.ShutdownDialog],
|
|
503
517
|
["soundtrackoverlay", (e) => e.ContainerScroll && e.Back && !e.Art],
|
|
@@ -531,8 +545,7 @@ exportedModules = [
|
|
|
531
545
|
["systemmanagement", (e) => e.HDRBadge],
|
|
532
546
|
["systemreport", (e) => e.SystemReportDialog],
|
|
533
547
|
["systemsettings", (e) => e.SteamRuntimeSystemInfoDialogContent],
|
|
534
|
-
["throbber", (e) => e.
|
|
535
|
-
["timezonescreen", (e) => e.TimezoneScreen],
|
|
548
|
+
["throbber", (e) => e.throbber_center_wrapper],
|
|
536
549
|
["titlebarcontrols", (e) => e.NotificationBellAnimation],
|
|
537
550
|
["toggle", (e) => e.ToggleRow && e.Off],
|
|
538
551
|
["tooltip", (e) => e.TextToolTip],
|
|
@@ -547,6 +560,7 @@ exportedModules = [
|
|
|
547
560
|
["vodplayer", (e) => e.BroadcastCtn],
|
|
548
561
|
["voicechatheadersteamdeck", (e) => e.ActiveCall],
|
|
549
562
|
["voicesettings", (e) => e.MicrophoneTest],
|
|
563
|
+
["voicesettingsfriends", (e) => e.TransmissionTypeSettings],
|
|
550
564
|
["vrdashboard", (e) => e.DashboardBarPopupList],
|
|
551
565
|
// Generic, but returns 1 module
|
|
552
566
|
["vrdashboardpopups", (e) => e.PopupRoot],
|
package/cdp/db/shoppingcart.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
exportedModules = [
|
|
2
|
+
["cartfollowcreator", (e) => e.CartCreatorCtn],
|
|
3
|
+
["creatorhome", (e) => e.DevSummaryCtn],
|
|
2
4
|
["shoppingcart", (e) => e.ShoppingCartModal],
|
|
3
|
-
["shoppingcartcount", (e) => e.ShoppingCartCountCtn],
|
|
4
5
|
["shoppingcartitem", (e) => e.DropDownThin],
|
|
5
6
|
["giftrecipient", (e) => e.GiftRecipientPickerFormCtn],
|
|
6
7
|
["storesalewidget", (e) => e.StoreSalePriceWidget],
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
exportedModules = [
|
|
2
|
+
["browsesection", (e) => e.BrowseContentGrid],
|
|
3
|
+
["capsulelist", (e) => e.CapsuleList],
|
|
4
|
+
["discount", (e) => e.OriginalPrice],
|
|
5
|
+
["discoveryqueue", (e) => e.DiscoveryQueue],
|
|
6
|
+
["dynamicmenu", (e) => e.DynamicMenu],
|
|
7
|
+
["dynamicmenufeaturedhardwaresection", (e) => e.FeaturedHardware],
|
|
8
|
+
["dynamicmenusection", (e) => e.SpecialsLinkColumn],
|
|
9
|
+
["dynamicmenutopcategoriessection", (e) => e.TopCategories],
|
|
10
|
+
["dynamicmenutransitiongroup", (e) => e.TransitionGroup],
|
|
11
|
+
["popover", (e) => e.PopoverContainer],
|
|
12
|
+
["search", (e) => e.searchBarMinWidth],
|
|
13
|
+
["storemenu", (e) => e.Container],
|
|
14
|
+
];
|
|
@@ -21,6 +21,7 @@ const BROWSER_EVENT = "finished-request";
|
|
|
21
21
|
*/
|
|
22
22
|
const SELECTORS = {
|
|
23
23
|
accountpreferences: "[data-featuretarget]",
|
|
24
|
+
apppage: "[data-featuretarget]",
|
|
24
25
|
gameslist: "[data-featuretarget='gameslist-root']",
|
|
25
26
|
notificationspage: "#react_root",
|
|
26
27
|
profileedit: "#react_root",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "steam-theming-utils",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.4.0",
|
|
4
4
|
"description": "A collection of scripts for easier Steam theming",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
},
|
|
9
9
|
"type": "module",
|
|
10
10
|
"bin": {
|
|
11
|
-
"steam-theming-utils": "
|
|
11
|
+
"steam-theming-utils": "src/index.js"
|
|
12
12
|
},
|
|
13
13
|
"types": "./src/api.d.ts",
|
|
14
14
|
"exports": {
|
|
@@ -16,9 +16,10 @@
|
|
|
16
16
|
"./postcss-plugins": "./src/postcss_plugins/index.js"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"chrome-remote-interface": "^0.33.
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"
|
|
19
|
+
"chrome-remote-interface": "^0.33.3",
|
|
20
|
+
"find-process": "^2.0.0",
|
|
21
|
+
"lilconfig": "^3.1.3",
|
|
22
|
+
"postcss": "^8.5.6",
|
|
23
|
+
"prettier": "^3.7.4"
|
|
23
24
|
}
|
|
24
25
|
}
|
package/src/api.js
CHANGED
|
@@ -22,6 +22,11 @@ export const appendImportantPlugin =
|
|
|
22
22
|
(node) => !opts.filter.some((e) => e.test(node.parent.selector)),
|
|
23
23
|
);
|
|
24
24
|
for (const node of nodes) {
|
|
25
|
+
// !important is invalid in @keyframes
|
|
26
|
+
if (node.parent.parent.name === "keyframes") {
|
|
27
|
+
continue;
|
|
28
|
+
}
|
|
29
|
+
|
|
25
30
|
node.important = true;
|
|
26
31
|
}
|
|
27
32
|
});
|
|
@@ -40,7 +40,7 @@ function getClassMap(page) {
|
|
|
40
40
|
|
|
41
41
|
export const selectorReplacerPlugin = () => (css) => {
|
|
42
42
|
const { file } = css.source.input;
|
|
43
|
-
const
|
|
43
|
+
const fileName = path.basename(file);
|
|
44
44
|
|
|
45
45
|
const splitPath = file.split(path.sep);
|
|
46
46
|
const page = PAGES.find((e) => splitPath.includes(e));
|
|
@@ -54,12 +54,13 @@ export const selectorReplacerPlugin = () => (css) => {
|
|
|
54
54
|
return;
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
-
const
|
|
57
|
+
const modName = path.parse(fileName).name;
|
|
58
|
+
const mod = map?.[modName];
|
|
58
59
|
const ignoredPaths = config.ignore || [];
|
|
59
60
|
const src = path.join(cwd, argv.base);
|
|
60
61
|
const skipFile = ignoredPaths.some((e) => file.startsWith(path.join(src, e)));
|
|
61
62
|
if (!mod && !skipFile) {
|
|
62
|
-
console.error("[%s] no such module",
|
|
63
|
+
console.error("[%s] no such module", fileName);
|
|
63
64
|
return;
|
|
64
65
|
}
|
|
65
66
|
|
|
@@ -67,7 +68,7 @@ export const selectorReplacerPlugin = () => (css) => {
|
|
|
67
68
|
rule.selector = rule.selector.replace(SELECTOR, (_, s) => {
|
|
68
69
|
const id = mod[s];
|
|
69
70
|
if (!id) {
|
|
70
|
-
console.error("[%s] %o is undefined",
|
|
71
|
+
console.error("[%s] %o is undefined", fileName, `#${s}`);
|
|
71
72
|
return;
|
|
72
73
|
}
|
|
73
74
|
|
package/src/shared.js
CHANGED
|
@@ -2,6 +2,7 @@ import fs from "node:fs";
|
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import { fileURLToPath } from "node:url";
|
|
4
4
|
import cdp from "chrome-remote-interface";
|
|
5
|
+
import * as findProcess from "find-process";
|
|
5
6
|
import { runWithResult } from "./api.js";
|
|
6
7
|
import { STORE_BASE_URL } from "./constants.js";
|
|
7
8
|
|
|
@@ -56,6 +57,8 @@ export async function getPageUrl(page) {
|
|
|
56
57
|
return pageObj(await resolve("SteamIDEditPage"));
|
|
57
58
|
case "shoppingcart":
|
|
58
59
|
return pageObj(await resolve("StoreCart"));
|
|
60
|
+
case "storemenu":
|
|
61
|
+
return pageObj(await resolve("StoreFrontPage"));
|
|
59
62
|
}
|
|
60
63
|
}
|
|
61
64
|
|
|
@@ -65,9 +68,20 @@ export async function getPageUrl(page) {
|
|
|
65
68
|
* @param {(targets: cdp.Target[]) => cdp.Target} target
|
|
66
69
|
*/
|
|
67
70
|
export async function createConnection(target) {
|
|
71
|
+
// https://github.com/yibn2008/find-process/issues/83
|
|
72
|
+
const processes = await findProcess.default.default("name", "steamwebhelper");
|
|
73
|
+
const port = Number(
|
|
74
|
+
processes
|
|
75
|
+
.find((e) => e.cmd.includes("--remote-debugging-port="))
|
|
76
|
+
.cmd.match(/--remote-debugging-port=(\d+)/)?.[1],
|
|
77
|
+
);
|
|
78
|
+
if (Number.isNaN(port)) {
|
|
79
|
+
throw new Error("Is Steam running?");
|
|
80
|
+
}
|
|
81
|
+
|
|
68
82
|
const connection = await cdp({
|
|
69
83
|
host: "127.0.0.1",
|
|
70
|
-
port
|
|
84
|
+
port,
|
|
71
85
|
target,
|
|
72
86
|
});
|
|
73
87
|
|