Menu

GM_deleteValue

mmartz

Description

This API method deletes an existing preference set by GM_setValue.

Currently values are deleted from a SQLite database located in the Scripts directory. Each script currently has one database named off of the subfolder created after installing a script with a file extension of .db.

Prior to version 1.13 Numbers were limited to integers and no decimal values. Values were deleted from the Firefox preferences back end and could be manually changed by typing about:config?filter=extensions.greasemonkey.scriptvals.namespace/name.foo

| Examples | See Also | Notes

Syntax

GM_deleteValue( name )

Value: Function
Returns: undefined
Compatibility: Greasemonkey 0.8.1 - 3.12.0
Access: @grant

Parameters

Properties
name
  • All properties are optional except name.

Properties


name

Value: String
Usage: name = "PropertyName";

  • Property name to delete.

Examples

Core

GM_deleteValue("foo");

See Also

Notes

An issue that some may encounter on some platforms is that the values appear to not be deleted or set. This is usually due to a refreshing issue in the browser. If about:config is refreshed in the window/tab this should resolve any questions about stability of setting and deleting system preferences.


Related

Wiki: GM_getValue
Wiki: GM_listValues
Wiki: GM_setValue
Wiki: Greasemonkey_Manual:API
Wiki: Scripts_directory
Wiki: Version_history