0

I would like to see whether what I'm proposing sounds feasible. I'm not very up to date with javascript, but I think what I want to do is reasonable.

I've created a Chrome Extension, which is a Page Action that appears on sites with certain characteristics. What I would like to do is have an option in my popup.html that, when selected, will write the fully loaded DOM into a text file on the disk.

I've scoured and searched around, but I can't seem to find any clear examples of this functionality. This helped me confirm that javascript will be able to help me capture the .html, but I'm not sure if I can trigger it from my extension's popup.html.

So, my question: Is it possible to download a page's html and write the file to the disk from a Chrome Extension?

As a follow up: Is it possible to execute a .exe file from a Chrome Extension? In other words, I would like to write the .html to the disk and then trigger a .exe file to do something to that file.

I'm going to attempt to do this in some fashion or another, but I would sincerely appreciate any pointers or help in the correct direction.

Community
  • 1
  • 1
New
  • 111
  • 1
  • 2
  • 8
  • 1
    https://github.com/rndme/download you can open an exe by opening a specific mime type, choose "open" when prompted, browsing to the exe, and remembering the preference. – dandavis Dec 12 '14 at 05:52
  • @dandavis Woo! Awesome. `download(document.documentElement.innerHTML, "download.html", "text/html")` and my problems are solved. Thanks! – New Dec 12 '14 at 06:12
  • glad my lib helped you out. – dandavis Dec 12 '14 at 06:13
  • @dandavis It *really* did! Thanks again man! – New Dec 12 '14 at 06:18

0 Answers0