Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
el.bind('click', function(e) {
e.preventDefault();
var text = (scope.vm.keychain[attrs.copyPassword]) ? scope.vm.keychain[attrs.copyPassword].password : '';
// atom's clipboard module
clipboard.clear();
clipboard.writeText(text);
});
};
click: function() {
var url = BrowserWindow.getFocusedWindow().webContents.getUrl();
clipboard.writeText(url);
}
},
<a href="#"> clipboard.writeText(value)}>Copy</a>
)
ui.buttons.copy.addEventListener('click', function (e) {
e.preventDefault()
clipboard.writeText(ui.inputs.copy.value)
})
'core:copy': () => {
let str = this.state.selectedItems.map(ele => ele.innerText).join('\n');
Clipboard.writeText(str);
}
})
handleKeyDown: function (e) {
if (e.keyCode === 38) {
this.selectPrevious()
e.preventDefault()
}
if (e.keyCode === 40) {
this.selectNext()
e.preventDefault()
}
if (e.keyCode === 13) {
var article = this.state.currentArticle
clipboard.writeText(article.content)
hideFinder()
e.preventDefault()
}
if (e.keyCode === 27) {
hideFinder()
e.preventDefault()
}
},
focusInput: function () {
<a href="#"> clipboard.writeText(value)}>
</a>
$('#api_key_btn').on('click', function() {
clipboard.writeText(api_key_code);
$('#api_key_text').html('Copied!');
});
<a href="#"> clipboard.writeText(value.value)}>
</a>
el.addEventListener('keydown', function(e) {
if (e.which === 67 && e.ctrlKey) {
Clipboard.writeText(getSelection().toString())
}
})