Code Monkey home page Code Monkey logo

Comments (3)

gera2ld avatar gera2ld commented on June 30, 2024

This is a known issue, but is it really necessary?

from violentmonkey.

ccd0 avatar ccd0 commented on June 30, 2024

Yes, otherwise you get data loss.
To give an example from a script I'm maintaining, 4chan X adds a button to hide posts on 4chan, storing the list of hidden posts with GM_setValue. Say you have https://boards.4chan.org/c/thread/2570357 open in one tab and http://boards.4chan.org/c/thread/2539836 in another. (I'm deliberately using http and https in this example because if they're on the same origin, 4chan X will attempt to sync data using localStorage.) If you hide a few posts in the first thread, then hide some more posts in the second thread, then reload the first thread, the posts you hid in the first thread reappear!

from violentmonkey.

gera2ld avatar gera2ld commented on June 30, 2024

I thought GM_getValue and GM_setValue are mostly used to share data among tabs with different domains in which case data sync might not be so necessary. I prefer using localStorage to share data that needs synced since localStorage is built-in and synchronous.

Anyway, data sync sounds reasonable. This feature will be added soon.

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.