Comments (3)
The current native checks and updates may be more frequent and cause issues such as #557.
But this is probably the best option with the current logic and without a lot of refactoring.
To completely solve these problems requires a more comprehensive process design and refactoring.
Let's keep this issue open so that we don't forget to consider this when doing related works.
from userscripts.
For the first point, it's not a bug, but it is indeed one of the issues that should be addressed when we plan to update the backend process in the future.
Essentially, it was introduced in #525. When you focus the Safari window, it checks the script files for changes in the background and updates the manifest file. So if you don't switch focus to Safari, that won't happen.
For the second point, that might keep the file contents from changing (in the case you describe), but probably won't avoid the fact that the file is written.
A better approach might be to stop writing to the file when it's confirmed that nothing has changed, but that might require some process refactoring.
One problem is that currently the file is not designed to be modified by the user, or used for synchronization purposes. Modifying it may cause unexpected behavior. For example, you may find that modifying some settings may not take effect.
We are indeed considering using a new manifest file in the scripts folder to synchronize settings in the future (maybe).
In the latest beta version, we have added the import and export function of settings data.
So, for this issue, I will see how to solve it when refactoring the relevant parts. However, it is currently not recommended that you synchronize and modify this file. Synchronizing only the scripts folder is a good option for now.
from userscripts.
That's really good context, thank you! #523 helped me understand why nativeChecks is useful.
For my use case, I'll just sync the scripts folder as you recommend β I'm totally happy with this outcome, so you're welcome to close the issue if it isn't useful for tracking.
You make a good point that checking the file for changes before writing it would be a better change than just sorting the file. I'm thinking here of lower-level observers like rsync or the filesystem itself, which may perform extra work if a file's inode changes. I think rsync, for example, uses inode timestamps by default (rather than file contents) to decide which files to skip, so just sorting the file wouldn't help there.
from userscripts.
Related Issues (20)
- this script doesn't work HOT 1
- Safari Extension in Apple Vision Pro HOT 9
- @run-at document-start does not really run at start HOT 1
- GM.addElement support HOT 5
- Unable to use UserStyles or any css HOT 5
- Cannot check for updates on installed userscripts HOT 2
- To work for local HTML files? HOT 1
- After the await operation, other functions is cancelled due to delay. HOT 9
- UserScript not working tab switch HOT 3
- Extension disabled after clicking on a target _blanck link (or window.open()) HOT 7
- Unify macOS and iOS version numbers
- Userscripts folder cannot be OneDrive (greyed out) HOT 3
- Help with a userscript that adds Copy URL buttons in Google search results HOT 1
- script not work on safari in iphone, while working well on chrome in computer. HOT 6
- Script is not loading producing "Load failed" HOT 1
- Difference between @exclude and @exclude-match? HOT 1
- Deprecate `@include` and `@exclude` metadata
- Deprecate `GM.setClipboard` API
- Canβt install userscripts ios HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from userscripts.