Compile greasemonkey script into xpi to save file?

↘锁芯ラ 提交于 2019-12-09 23:57:15

问题


if i compile a greasemonkey script into an xpi, then can that xpi access to local file to read and write files from hard disk???

question 2, if i save data using SetValue API of GM then do i need to del the value or does it gets deleted automatically when i restart the FireFox browser??


回答1:


if i compile a greasemonkey script into an xpi, then can that xpi access to local file to read and write files from hard disk???

yes it could, because it is then a firefox extension, but it would mean that you need to decompress the xpi file, and modify the code to access the file system.

question 2, if i save data using SetValue API of GM then do i need to del the value or does it gets deleted automatically when i restart the FireFox browser??

If you create a value then it will remain until you delete the value, regardless of browser restarts.



来源:https://stackoverflow.com/questions/2510830/compile-greasemonkey-script-into-xpi-to-save-file

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!