steamutils 1.1.13 → 1.1.15
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/.idea/codeStyles/codeStyleConfig.xml +5 -0
- package/.idea/steamutils.iml +1 -1
- package/.idea/vcs.xml +1 -1
- package/SteamClient.js +17 -2
- package/package.json +1 -1
package/.idea/steamutils.iml
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
<module type="WEB_MODULE" version="4">
|
|
3
3
|
<component name="NewModuleRootManager">
|
|
4
4
|
<content url="file://$MODULE_DIR$">
|
|
5
|
-
<excludeFolder url="file://$MODULE_DIR$/temp" />
|
|
6
5
|
<excludeFolder url="file://$MODULE_DIR$/.tmp" />
|
|
6
|
+
<excludeFolder url="file://$MODULE_DIR$/temp" />
|
|
7
7
|
<excludeFolder url="file://$MODULE_DIR$/tmp" />
|
|
8
8
|
</content>
|
|
9
9
|
<orderEntry type="inheritedJdk" />
|
package/.idea/vcs.xml
CHANGED
package/SteamClient.js
CHANGED
|
@@ -707,7 +707,9 @@ function SteamClient({
|
|
|
707
707
|
}, 60000, 'autoRequestFreeLicense')
|
|
708
708
|
}
|
|
709
709
|
if (autoPlay) {
|
|
710
|
-
|
|
710
|
+
onCookie(function () {
|
|
711
|
+
autoGamePlay()
|
|
712
|
+
})
|
|
711
713
|
}
|
|
712
714
|
})
|
|
713
715
|
|
|
@@ -998,6 +1000,16 @@ function SteamClient({
|
|
|
998
1000
|
}
|
|
999
1001
|
}
|
|
1000
1002
|
|
|
1003
|
+
function onCookie(callback) {
|
|
1004
|
+
if(getCookies() ){
|
|
1005
|
+
callback(getCookies())
|
|
1006
|
+
} else {
|
|
1007
|
+
onEvent('webSession', function (webSession) {
|
|
1008
|
+
callback(webSession?.cookies?.join?.(';'))
|
|
1009
|
+
}, true, 90000)
|
|
1010
|
+
}
|
|
1011
|
+
}
|
|
1012
|
+
|
|
1001
1013
|
function init() {
|
|
1002
1014
|
bindEvent()
|
|
1003
1015
|
login()
|
|
@@ -1052,7 +1064,10 @@ function SteamClient({
|
|
|
1052
1064
|
const ownedAppsCount = shouldLog ? (ownedApps?.length || 0) : 0
|
|
1053
1065
|
let recommendedApps = Math.random() > 0.5 ? _.shuffle(userData.rgRecommendedApps || []) : []
|
|
1054
1066
|
if (!recommendedApps?.length) {
|
|
1055
|
-
|
|
1067
|
+
try {
|
|
1068
|
+
recommendedApps = (await axios.request({url: 'https://raw.githubusercontent.com/5x/easy-steam-free-packages/master/src/script/packages_db.json'}))?.data?.packages || []
|
|
1069
|
+
} catch (e) {
|
|
1070
|
+
}
|
|
1056
1071
|
}
|
|
1057
1072
|
_.remove(recommendedApps, app => ownedApps.includes(app))
|
|
1058
1073
|
recommendedApps = _.shuffle(recommendedApps)
|