Home > OS >  How to view a Javascript file directly from the web, into the Solution?
How to view a Javascript file directly from the web, into the Solution?

Time:06-03

How can I open/load a JS file directly from the web, as part of my project in Visual Studio?

This is a sample URL I got from a weather monitoring site:

https://static.eagle.io/85e2aa8e4322e59c8de35847502f1220684b7615/assets/app-public/asset.js

Opening it directly on the browser, just doesn't format the JS nicely (beautify). How can I load and beautify the asset.js file in Visual Studio 2022 as part of the project please (not to use it, to view it)?

Thanks

CodePudding user response:

Looking at the code, asset.js seems to be minified. Although you could technically format (beautify) the code, it'll still be unreadable. Nonetheless, you could save the file to your computer using CTRL S, open it in Visual Studio, and use an extension such as Prettier to format the code.

CodePudding user response:

If u just want to use the script and u know how to use it , just add

   <script src="https://static.eagle.io/85e2aa8e4322e59c8de35847502f1220684b7615/assets/app-public/asset.js"></script>
  • Related