26 lines
711 B
JavaScript
26 lines
711 B
JavaScript
// vim: et:ts=4:sw=4:sts=4:ft=js
|
|
/*@
|
|
Ox.Clipboard <o> Basic clipboard handler
|
|
copy <f> copy to clipbloard
|
|
(data) -> <u> set clipboard to data
|
|
paste <f> paste from clipbload
|
|
() -> <o> get clipboard data
|
|
_print <f> debug function
|
|
() -> <u> print clipboard contents to console
|
|
data <o> clipboard object
|
|
@*/
|
|
Ox.Clipboard = function() {
|
|
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;
|
|
}
|
|
};
|
|
}();
|