Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!
  • Guest, before posting your code please take these rules into consideration:
    • It is required to use our BBCode feature to display your code. While within the editor click < / > or >_ and place your code within the BB Code prompt. This helps others with finding a solution by making it easier to read and easier to copy.
    • You can also use markdown to share your code. When using markdown your code will be automatically converted to BBCode. For help with markdown check out the markdown guide.
    • Don't share a wall of code. All we want is the problem area, the code related to your issue.


    To learn more about how to use our BBCode feature, please click here.

    Thank you, Code Forum.

JavaScript Objective - Automate File Save as MHTML single web page for every Webpage load/fresh

MrAdventure

New Coder
Hi All, I have a finance web site that has a lot of data, that I would like to automate the save as MHTML each time any of the finance pages are loaded or refreshed. I can manually right click on the web page, save as single web page MHT and get the result I need.

So I thought I might be able to do this as a chrome extension. So with the help of ChapGPT i created an extension to save the current page as MHTML. The extension has a button I created and once clicked will go to a save as dialog box and allow you to save the MHTML file. This works but its not automated at all. It requires the click on the Save button and then the click on the save dialog box. ChatGPT advises that the save as function cant be automated but I don’t know if this is true.

I created another chrome extension to display an alert box when the web page is refreshed, loaded or when certain refresh buttons are clicked on the finance web pages. This works ok too so I felt combining the two projects I nearly had the end goal achieved.

But it seems for security reasons in Chrome I cant directly write to the file system the save as web page MHTML, it must go though a save dialog box.

I am open to any other way to achieve the goal though if the Chrome extension solution is not feasible.

Maybe some kind of browser automation product or code as long as it can be triggered by page load/refresh or refresh buttons and it’s a no click automation that I can turn on and off.

Appreciated you guys having a look at this – seems so simple but I am not there yet.

Thanks a lot
 

New Threads

Buy us a coffee!

Back
Top Bottom