Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
promise.then(password =>
{
require("clipboard").set(password);
port.emit("passwordCopied", id);
}).catch(reason => port.emit("passwordError", String(reason)));
}
shareUrl.addEventListener('click', (function (event) {
event.preventDefault();
event.stopPropagation();
shareUrl.style.display = 'none';
shareField.style.display = '';
shareText.style.display = '';
shareField.focus();
shareField.select();
clipboard.set(this.urls.share, 'text');
}).bind(this), false);
shareField.addEventListener('blur', function () {
onComplete: function (response) {
translated = response.json.responseData.translatedText;
if (replaceorcopy === "replace") {
selection.text = translated;
} else {
clipboard.set(translated);
}
}
});