Greasemonkey Wiki
Brought to you by:
mmartz
This API method allows user script authors to copy text or html to the local clipboard.
GM_setClipboard( data, type )
Value: Function
Returns: undefined
Compatibility: Greasemonkey 1.10.0 - 3.12.0
Access: @grant
Parameters
Properties | |
---|---|
data | type |
Value: String
Usage: data = "Some data";
Value: String
Usage: type = "text";
Default: "text";
GM_setClipboard("foo bar");
GM_setClipboard("Greasemonkey", "html");