(id, value)
| 337 | } |
| 338 | //sets ffclipboard contents, if id does not exist, creates it |
| 339 | static set(id, value) { |
| 340 | try { |
| 341 | var ffClipboardObj = JSON.parse(ffClipboard_stored) |
| 342 | } catch (e) { |
| 343 | return null |
| 344 | } |
| 345 | if (ffClipboardObj) { |
| 346 | ffClipboardObj[id] = value |
| 347 | let message = { type: "ffclipboardSet", text: JSON.stringify(ffClipboardObj) } |
| 348 | window.postMessage(message, "*") //send message to content script |
| 349 | ffClipboard_stored = JSON.stringify(ffClipboardObj) |
| 350 | } else { |
| 351 | return null |
| 352 | } |
| 353 | } |
| 354 | //deletes ffclipboard contents and frees up storage, if id does not exist, does nothing |
| 355 | static free(id) { |
| 356 | try { |
no outgoing calls
no test coverage detected