SingleFile icon indicating copy to clipboard operation
SingleFile copied to clipboard

SingleFile and SingleFileZ both have problem when saving a webpage tool based on Bootstrap.

Open 265785 opened this issue 9 months ago • 4 comments

Describe the bug I want to save this webpage tool for offline use. Its format is based on Bootstrap: https://wxlzmt.github.io/pages/simple/calc.html

Because I want to run the functions in the offline webpage, I unchecked all the blocked resources. However, the calculating function of this page don't work in the saved webpage.

0001

0002

Then I unchecked all the checkboxes that have word "remove" and saved the page, Though the function works, the webpage format becomes abnormal.

0002

0004

To Reproduce Steps to reproduce the behavior:

  1. Reset SingleFile or SingleFileZ's Settings
  2. Go to https://wxlzmt.github.io/pages/simple/calc.html
  3. Change SingleFile or SingleFileZ's Settings like "Describe the bug"
  4. Save this webpage by SingleFile or SingleFileZ.
  5. Open the saved file.
  6. See error

Expected behavior

To reserve the webpage's original format and functions, only uncheck all the blocked resources is enough. This will do help to many pages based on Bootstrap. Thank you!

Environment

  • OS: Win11 Pro
  • Browser: Edge
  • Version: 124.0.2478.67

Additional context

  1. The webpage's function is simple, Its' only function is to divide two numbers into two coprime integers, and find the value of multiplying the two coprime integers by 1-any number. It can be used offline.

  2. The translation of this page in English is shown below:

0005

  1. The webpages are saved in InPrivate mode, No other extension block the saving process.

265785 avatar Apr 30 '24 15:04 265785

Can you please try to enable the option HTML content > save raw page?

gildas-lormeau avatar Apr 30 '24 15:04 gildas-lormeau

I tried. But the situation become worse. image

265785 avatar Apr 30 '24 15:04 265785

It looks to work for me with HTML content > save raw page enabled (and the other options you mentioned) but the page displays two alerts and the form is not filled with the default values. However, it is functional.

gildas-lormeau avatar Apr 30 '24 16:04 gildas-lormeau

Your program is really great. I tried several other pages with offline scripts, most of them can be saved correctly with scripts inside, In the case of only unchecking the Network > block xxx with the default settings. I wonder why this page cannot be saved normally, but I feel it is really a good example for you to improve your program.

Note: I tried your option again (Though it is relatively troublesome). The saved webpage's script can work, but the initial value is lost.

265785 avatar May 01 '24 15:05 265785

Thanks, the problem was that SingleFile was overwriting the values of some fields when “save raw page” was enabled. I've fixed the bug, the fix will be available in the next version.

gildas-lormeau avatar May 29 '24 11:05 gildas-lormeau