GreaseMonkey 是否内置了一些东西,以便您可以按站点或按页面存储数据?例如,假设您想调整 StackOverflow.com,以便您可以为收藏夹列表中的每个问题添加注释并根据该注释进行排序。 GreaseMonkey 是否有内置的东西来存储这些笔记?或者脚本是否可以 self 修改,这样您只需定义一个数组或对象并将数据保存在那里?
最佳答案
是 - GM_setValue .
This method allows user script authors to persist simple values across page-loads. Strings, booleans, and integers are currently the only allowed data types
关于javascript - 在 Greasemonkey 脚本中存储数据,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1268232/