GM.getValue / GM.setValue don't work as expected Tested against the following example from https://wiki.greasespot.net/GM.getValue#Examples // ==UserScript== // @name Greasemonkey set-and-get Example // @description Stores and logs a counter of executions. // @grant GM.setValue // @grant GM.getValue // ==/UserScript== (async () => { let count_before = await GM.getValue('count', 0); // Note awaiting the set -- required so the next get sees this set. await GM.setValue('count', count_before + 1); // Get the value again, just to demonstrate order-of-operations. let count_after = await GM.getValue('count'); console.log('Greasemonkey set-and-get Example has run', count_after, 'times'); })(); I need this feature to fix enable (true / false) value for this program https://openuserjs.org/scripts/sjehuda/Dimmer
I have made a update to a userscript[1] which adds dark view mode to it. It uses GM.getValue / GM.setValue to save last used mode. GM_getValue / GM_setValue[2] don't appear to save info or or retrieve values as expected; and GM.getValue / GM.setValue[3] doesn't appear to work Both ways were tested with Tampermonkey and are working as expected. This script adds a Falkon banner to bottom of every Web Feed page. See function setBanner(). The banner was featured only in the openuserjs.org version[4] because they don't require antifeature metablock. However, I will remove this banner from the openuserjs.org until GM.getValue / GM.setValue are supported. [1]: https://greasyfork.org/en/scripts/465932-newspaper-native-rss-reader [2]: https://greasyfork.org/en/scripts/465932-newspaper-native-rss-reader/diff?v1=1202515&v2=1202391 [3]: https://greasyfork.org/en/scripts/465932-newspaper-native-rss-reader/diff?v1=1202515&v2=1198552 [4]: https://openuserjs.org/scripts/sjehuda/Newspaper
I think that the banner, currently, will cause harm, because once a new person will use Falkon, he would see that the userscript that has the banner, doesn't fully work with Falkon. On the other hand, this person might be a C++ programmer that would contribute to this extension. The banner will be disabled unless you would tell me otherwise.
I was wrong. It appears that only GM.getValue or reading value doesn't (always) work.