userscripts
userscripts copied to clipboard
Userscripts editor auto delete iCloud script files.
"⌘+S"(Save) has a certain probability of automatically deleting the script file stored in iCloud
OS: macOS 12
@SunBK201
Can you share more info? Why do you believe this is the case? Is there a code level issue? What have you experienced? Does it only affect the keyboard shortcut ⌘+S
or on any save
action?
I will need more details to properly debug this.
https://user-images.githubusercontent.com/49178170/190406061-942af313-9768-488f-be8e-cb45bb5066ad.mp4
This bug will only appear when entering the editor for the first time (refresh editor page), and will not be triggered when editing and saving again.
@SunBK201 Thank you very much for the video. I am trying to reproduce this on my machine, but not having luck.
Edit: see next response
@SunBK201
Ok, I can see the problem, I believe. Can you you verify the following?
Did you create this userscript in an external editor and then drag it into your userscripts folder?
The reason I ask is because there is a difference between the @name
value and the filename
value, which could be the source the of the bug. I assume you created this in an external editor or manually changed your filename.
-
@name
Zhihu-AD
-
filename
ZhiHu-AD
I believe this is being treated as a filename change, which is the only time items are moved to trash.
These situations are not being handled properly, marking as bug.
@SunBK201
Ok, I can see the problem, I believe. Can you you verify the following?
Did you create this userscript in an external editor and then drag it into your userscripts folder?
The reason I ask is because there is a difference between the
@name
value and thefilename
value, which could be the source the of the bug. I assume you created this in an external editor or manually changed your filename.
@name
Zhihu-AD
filename
ZhiHu-AD
I believe this is being treated as a filename change, which is the only time items are moved to trash.
These situations are not being handled properly, marking as bug.
Yes, I manually changed userscript folder to the iCloud folder and moved all scripts from the original folder to the new iCloud folder.
@SunBK201 thanks for confirming, will fix this bug.
For now, if you keep filename
and @name
value the same, this bug should not appear.
@SunBK201 thanks for confirming, will fix this bug.
For now, if you keep
filename
and@name
value the same, this bug should not appear.
thanks