function pasteText(aEvent) { var text = aEvent.target.culMenu.text; if (text!="undefined") { //クリップボードの内容をバックアップ var clip = Cc["@mozilla.org/widget/clipboard;1"].createInstance(Ci.nsIClipboard); var trans = Cc["@mozilla.org/widget/transferable;1"].createInstance(Ci.nsITransferable); trans.addDataFlavor("text/unicode"); clip.getData(trans, clipboard.kGlobalClipboard); var str = {}, strLen = {}; trans.getTransferData("text/unicode", str, strLen); if (str) {var cbData = str.value.QueryInterface(Ci.nsISupportsString).toString();} const cHelper = Cc["@mozilla.org/widget/clipboardhelper;1"].getService(Ci.nsIClipboardHelper);