Code Monkey home page Code Monkey logo

Comments (6)

tophf avatar tophf commented on July 18, 2024 2

I'm bad at reading too. I thought you wanted to have a direct link between local files and scripts the way it's imitated in Tampermonkey via @require file://

We can certainly add a new method to our sync, which you will trigger manually or on schedule.

from violentmonkey.

tophf avatar tophf commented on July 18, 2024

Extensions can't access local files in Firefox directly. In Chrome it requires either granting the extension access to the entire file system, which is unsafe, or using the new API. Both methods don't have an API to watch for changes, so we would have to poll the directory regularly, which is ineffective.

The only sane current workaround is nativeMessaging API and an external app that uses the system's built-in API to watch file changes, which is a complication we didn't want to add for such edge cases.

from violentmonkey.

tophf avatar tophf commented on July 18, 2024

AFAIK, you can use a local WebDAV server for this task.

from violentmonkey.

tomodachi94 avatar tomodachi94 commented on July 18, 2024

Yes, that would work, but running a WebDAV server comes with extra overhead. With the File System API, browsers can read and write to the local filesystem without needing an intermediary (like a local WebDAV server).

from violentmonkey.

tophf avatar tophf commented on July 18, 2024

We won't use the native File System API, see what I wrote in my comment:

Both methods don't have an API to watch for changes, so we would have to poll the directory regularly, which is ineffective.

from violentmonkey.

tomodachi94 avatar tomodachi94 commented on July 18, 2024

We won't use the native File System API, see what I wrote in my comment:

My bad, I opened the GitHub notification and it obscured your first comment.

from violentmonkey.

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.