473,288 Members | 1,726 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,288 software developers and data experts.

How to get the correct js content?

7 Nibble
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

✓ answered by sjain6

Hi,

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>
  5.  
Regards -

2 13531
zmbd
5,501 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
sjain6
2
Hi,

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>
  5.  
Regards -
Jun 17 '22 #3

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

Similar topics

8
by: Stromboli | last post by:
Hi, I have my site available in a couple of languages most of the files are indexf.html (french), indexi.html (italian) and indexde.html (german).. I'd like to start using multiviews but I've...
22
by: Trevor Orton | last post by:
Hello, I'm having a slight problem using the W3C html validator and I've reviewed the FAQ's with no luck so hopefully someone here would be kind enough to point me in the right direction. I...
0
by: Managed Code | last post by:
Hello All, Here is my issue and thanks in advance for any assistance. I have a base page with a dropdownlist that fires an event with the selected index. The content page catches the event and...
9
by: pbd22 | last post by:
Hi. This is just a disaster management question. I am using XMLHTTP for the dynamic loading of content in a very crucial area of my web site. Same as an IFrame, but using XMLHTTP and a DIV. I...
1
by: Anthony Planz | last post by:
Hello, I have a problem with displaying Greek fonts in a content placeholder. The Masterpage content displays correct, the content inside the content placeholder not. Example:...
1
by: redgoals | last post by:
Hi All, I will be creating a white label website for car hire dealers. My main website will be called something like: carhire.com, the content on carhire.com will be pulled in from a database. ...
1
by: iorchSG | last post by:
Hi, I’m migrating an application from HP-UX to Solaris Apache 1.3.27 HP-UX B.11.11 U 9000/800 Solaris SunOS 5.10 Generic_147440-10 sun4u sparc SUNW,SPARC-Enterprise In solaris, my whole...
5
by: kcbehnet | last post by:
I am using a navigation form with top navigation control named as "NavigationControTop" and left navigation control named as "NavigationControLeft". The subform where the main content is displayed is...
0
by: dseals22 | last post by:
How can I get my current content to slide to the left and bring in new content from the right (after clicking on button 1) when an existing student's username and password are correct, and if it's...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.