You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For 3 years, SteamUI-OldGlory has used the python library jsbeautifier to beautify the JS code included with Steam with no problems. However, in a recent update the beautifying process has stopped working halfway through the original file.
letn=l.IE.fromObject({accountid_owner:e.GetAccountID()});this.OnNotification(this.m_nNextTestNotificationID++,13,n.serializeBinary())}TestAchievement(e){return(0,n.mG)(this,void0,void0,(function*(){if(!e)returnvoidconsole.log("provide the appid for a game you own that also has achievements");constt=yieldm.d.RequestAppDetails(e);letr=null;if(t&&0!=t.achievements.vecHighlight.length){lete=a.RandomInt(0,t.achievements.vecHighlight.length-1);r=t.achievements.vecHighlight[e]}elseconsole.log("TestAchievement - Couldn't find app details or highlighted achievements for "+e+" so making one up."),r={strName:"won a race",strDescription:"You placed 1st!",strImage:"https://cdn.cloudflare.steamstatic.com/steamcommunity/public/images/apps/270880/2aec8af4b4b23cb6054d9aea06194621cdd66945.jpg",strID:"1"};letn={achievement_id:r.strID,appid:e,name:r.strName,description:r.strDescription,image_url:r.strImage,achieved:!0,rtime_unlocked:1622670460,current_progress:0,max_progress:0,min_progress:0,global_achieved_pct:10},i=l.fT.fromObject(n);this.OnNotification(this.m_nNextTestNotificationID++,5,i.serializeBinary())}))}
Expected Output
The code should have looked like this after beautification:
letn=l.IE.fromObject({accountid_owner: e.GetAccountID()});this.OnNotification(this.m_nNextTestNotificationID++,13,n.serializeBinary())}TestAchievement(e){return(0,n.mG)(this,void0,void0,(function*(){if(!e)returnvoidconsole.log("provide the appid for a game you own that also has achievements");constt=yieldm.d.RequestAppDetails(e);letr=null;if(t&&0!=t.achievements.vecHighlight.length){lete=a.RandomInt(0,t.achievements.vecHighlight.length-1);r=t.achievements.vecHighlight[e]}elseconsole.log("TestAchievement - Couldn't find app details or highlighted achievements for "+e+" so making one up."),r={strName: "won a race",strDescription: "You placed 1st!",strImage: "https://cdn.cloudflare.steamstatic.com/steamcommunity/public/images/apps/270880/2aec8af4b4b23cb6054d9aea06194621cdd66945.jpg",strID: "1"};letn={achievement_id: r.strID,appid: e,name: r.strName,description: r.strDescription,image_url: r.strImage,achieved: !0,rtime_unlocked: 1622670460,current_progress: 0,max_progress: 0,min_progress: 0,global_achieved_pct: 10},i=l.fT.fromObject(n);this.OnNotification(this.m_nNextTestNotificationID++,5,i.serializeBinary())}))}
Actual Output
The code actually looked like this after beautification:
letn=l.IE.fromObject({accountid_owner: e.GetAccountID()});this.OnNotification(this.m_nNextTestNotificationID++,13,n.serializeBinary())}TestAchievement(e){return(0,n.mG)(this,void0,void0,(function*(){if(!e)returnvoidconsole.log("provide the appid for a game you own that also has achievements");constt=yieldm.d.RequestAppDetails(e);letr=null;if(t&&0!=t.achievements.vecHighlight.length){lete=a.RandomInt(0,t.achievements.vecHighlight.length-1);r=t.achievements.vecHighlight[e]}elseconsole.log("TestAchievement - Couldn't find app details or highlighted achievements for "+e+" so making one up."),r={strName: "won a race",strDescription: "You placed 1st!",strImage: "https://cdn.cloudflare.steamstatic.com/steamcommunity/public/images/apps/270880/2aec8af4b4b23cb6054d9aea06194621cdd66945.jpg",strID: "1"};letn={achievement_id: r.strID,appid: e,name: r.strName,description: r.strDescription,image_url: r.strImage,achieved: !0,rtime_unlocked: 1622670460,current_progress: 0,max_progress: 0,min_progress: 0,global_achieved_pct: 10},i=l.fT.fromObject(n);this.OnNotification(this.m_nNextTestNotificationID++,5,i.serializeBinary())}))}
That is, after the https://, the rest of the code refused to beautify and was on 1 line. Is the file too big or are there too many special characters? eg: (!, /)
Steps to Reproduce
Obtain a copy of chunk~2dcc5aaf7.js (located in [Steam Directory]/steamui)
Attempt to beautify the JS file with the following Python code:
The text was updated successfully, but these errors were encountered:
Jonius7
changed the title
Beautifer stops beautifying halfway through the file
[Python] Beautifer stops beautifying halfway through the file
May 3, 2023
Is the file too big or are there too many special characters? eg: (!, /)
It is more likely that there's a some part of that URL that is getting recognized wrong. Please try changing the URL to be something shorter/simpler and see what happens.
Description
For 3 years, SteamUI-OldGlory has used the python library
jsbeautifier
to beautify the JS code included with Steam with no problems. However, in a recent update the beautifying process has stopped working halfway through the original file.Input
The file in question is
chunk~2dcc5aaf7.js
, since it's over 7MB I'll post it on Mediafire if needed and add snippets here to the issue:https://www.mediafire.com/file/g1zbcexf09eb7y0/chunk%257E2dcc5aaf7.js/file
The code looked like this before beautification (snippet below):
Expected Output
The code should have looked like this after beautification:
Actual Output
The code actually looked like this after beautification:
That is, after the
https://
, the rest of the code refused to beautify and was on 1 line. Is the file too big or are there too many special characters? eg: (!, /)Steps to Reproduce
Obtain a copy of
chunk~2dcc5aaf7.js
(located in[Steam Directory]/steamui
)Attempt to beautify the JS file with the following Python code:
Inspect the output file
chunk~2dcc5aaf7.beaut.js
A copy of the output file is provided here: https://www.mediafire.com/file/erg8zpirhbifr7n/chunk%257E2dcc5aaf7.beaut.js/file
Environment
OS: Windows 11, Python 3.8.16
Settings
Default settings
The text was updated successfully, but these errors were encountered: