Giter Site home page Giter Site logo

Auto save on tab removal about singlefile HOT 3 OPEN

sanjeevApple avatar sanjeevApple commented on September 21, 2024
Auto save on tab removal

from singlefile.

Comments (3)

gildas-lormeau avatar gildas-lormeau commented on September 21, 2024

What changes did you apply in SingleFile (related to this issue)?

from singlefile.

sanjeevApple avatar sanjeevApple commented on September 21, 2024

Sorry for the delay. I made changes in src/ui/bg/ui-menus.js to turn on MENU_ID_AUTO_SAVE_TAB to true. I also made changes in src/core/bg/config.js to enable autoSaveUnload: true. I think the issue was may be rebuilding the chromium zip file, because I was making the changes in the exploded directory directly and loading the extension through puppeteer. But these changes were being picked from lib, so rebuilding solved the issue.

Now it has been working really well, which helped solve the problem of saving long and content rich pages through singlefile cli. But from time to time, autosave on page unload does not save the file.

Here are the steps:

  1. Auto save this tab is the default in my set up and auto save on unload is true.
  2. I load the extension through puppeteer, go to the page www.apple.com/apple-vision-pro, simulate scroll to the bottom, and then call goBack to basically unload the page. This normally works for most pages, but from time to time fails for apple vision pro.
  3. You can easily simulate this in normal set up. Open chrome, get the singlefile extension, turn autosave on unload, open a tab, and turn on auto save this tab, and load the Url. Press on back arrow, and no file is saved. Use another Url like www.apple.com or www.apple.com/watch, everything works fine.

I think for some reason the save message is not coming through for some pages, in case they are heavy in content. I tried giving it time before I go back in that tab or before I close the browser, but it just does not produce a file.

from singlefile.

gildas-lormeau avatar gildas-lormeau commented on September 21, 2024

Thank you for the feedback. I'm glad to hear that you were able to find the cause the problem. I tried to reproduce the bug as described in the step 3 but I cannot reproduce it. Every time I do the test with www.apple.com/apple-vision-pro, the page is downloaded as expected after pressing the back button. Do you have other extensions installed?

from singlefile.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.