23 lines
576 B
JavaScript
23 lines
576 B
JavaScript
// vim: et:ts=4:sw=4:sts=4:ft=js
|
|
Ox.Clipboard = function() {
|
|
/***
|
|
Ox.Clipboard
|
|
Basic clipboard handler
|
|
Methods
|
|
copy(data) copy data to clipboard
|
|
paste paste data from clipboard
|
|
***/
|
|
var clipboard = {};
|
|
return {
|
|
_print: function() {
|
|
Ox.print(JSON.stringify(clipboard));
|
|
},
|
|
copy: function(data) {
|
|
clipboard = data;
|
|
Ox.print('copy', JSON.stringify(clipboard));
|
|
},
|
|
paste: function(type) {
|
|
return clipboard;
|
|
}
|
|
};
|
|
}();
|