Is there a way to "uncompress" js files?

957
4
Jump to solution
10-25-2019 08:53 AM
JaniceBaird
Occasional Contributor II

I have created an app using web app builder and downloaded the files to host on my web server. When I want to make an edit to one of the downloaded js files, the file is compressed (all the white space has been removed). Is there a way to get white space back into these files so I can read them without adding my own white space?

For an example, see the main.js file under the jimu.js folder in a downloaded app.

Thanks,

Janice.

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

Janice,

  No there is no way to un-obfuscate the file from an AGOL WAB app download. You could import the app into WAB Developer and then you would have un-obfuscated code.

View solution in original post

4 Replies
RobertScheitlin__GISP
MVP Emeritus

Janice,

  No there is no way to un-obfuscate the file from an AGOL WAB app download. You could import the app into WAB Developer and then you would have un-obfuscated code.

JaniceBaird
Occasional Contributor II

Thanks Robert!

0 Kudos
JaniceBaird
Occasional Contributor II

To anyone interested... I did find out that I can format "obfuscated" (Thanks for the word Robert!) json and JavaScript files in Microsoft Visual Studio simply by selecting "Format Document" from the Edit Menu. Totally cool!

Now, I just need to figure out how to "re-obfuscate" the code when deploying to my web server.

Janice.

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Though it can be formatted, the variable names will still be simplified with letters instead of actual names. The better way is to import the app into  WAB developer and the work with the app there. Then you can use the build script to your specific version of WAB to re-obfuscate the code.

0 Kudos