'初始化提交'

This commit is contained in:
2025-08-11 22:55:39 +08:00
parent 3deaf322c6
commit 9ec6daa82b
212 changed files with 45916 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
var cordova = require('cordova');
/**
* Clipboard plugin for Cordova
*
* @constructor
*/
function Clipboard () {}
/**
* Sets the clipboard content
*
* @param {String} text The content to copy to the clipboard
* @param {Function} onSuccess The function to call in case of success (takes the copied text as argument)
* @param {Function} onFail The function to call in case of error
*/
Clipboard.prototype.copy = function (text, onSuccess, onFail) {
if (typeof text === "undefined" || text === null) text = "";
cordova.exec(onSuccess, onFail, "Clipboard", "copy", [text]);
};
/**
* Gets the clipboard content
*
* @param {Function} onSuccess The function to call in case of success
* @param {Function} onFail The function to call in case of error
*/
Clipboard.prototype.paste = function (onSuccess, onFail) {
cordova.exec(onSuccess, onFail, "Clipboard", "paste", []);
};
// Register the plugin
var clipboard = new Clipboard();
module.exports = clipboard;