470,833 Members | 1,510 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,833 developers. It's quick & easy.

How to get the correct js content?

when I check this link:
[Z{Link redacted by moderation}]

I get bellow messy code:

how to get the correct format js content?
May 16 '22 #1
2 8886
5,463 Expert Mod 4TB
Hello markleo,

1) What you have appears to be a binary file - many stand-alone Hex-Editors that would let you see a more human readable format.
Either this isn't the JS file you were trying to obtain, the author has used a minifier - I'm not familiar enough those to be able to advise you, or you have stumbled upon something nefarious - no way to really tell from our end.

2) I could not verify the safety of the link you posted so I had to redact it from your post; however, I would advise you to contact the website owner to see if you can obtain the actual JS-File.

3) Externally linked image files are not always visible to many of our experts - you might want to edit your message by using the advanced editor to upload the image to your post and then embed the image.
May 16 '22 #2

I had an equivalent Java issue, so I tackle it along these lines:

The js record contains something like
window.someVarForReturn = 'content for return'
On html
Expand|Select|Wrap|Line Numbers
  1. <script src="file.js"></script>
  2. <script>console.log(someVarForReturn)</script>
For my situation the substance was html layout. So I followed through with something like this:

On js record
window.someVarForReturn = '<did>My template</div>'
On html
Expand|Select|Wrap|Line Numbers
  1. <script src="file.js"></script>
  2. <script>
  3. new DOMParser().parseFromString(someVarForReturn, 'text/html').body.children[0]
  4. </script>
Regards -
1 Week Ago #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

22 posts views Thread by Trevor Orton | last post: by
9 posts views Thread by pbd22 | last post: by
reply views Thread by mihailmihai484 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.