Question

This is a question that has been plaguing me for awhile.

In Greasemonkey you can use GM_getValue(name) and GM_setValue(name, value) to store persistent variables. My question is, how do I 'unset' a variable?

Was it helpful?

Solution

Try unsetting it by setting it with a blank value:

GM_setValue(name, '')

If that doesn't work:

OTHER TIPS

GM_deleteValue will unset a value set by GM_setValue,
starting with Greasemonkey version 0.8.20090123 (February 18th, 2009).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top