Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
copyCiteToSelection() {
// Copies: "Selected quotation" name_abbreviation, official_citation, ()
// TODO: add pin cite to citation
const toCopy = `"${this.selectedText}" ${this.templateVars.fullCite}`;
clipboard.writeText(toCopy).then(
() => this.copyStatus = "copied",
() => this.copyStatus = "copy failed",
);
},
elideOrRedactSelection(kind) {
private handleClick() {
if (this.credentials) {
clipboard
.writeText(this.credentials)
.then(() => {
const detail: SuccessDetail = { resourceLabel: this.resourceLabel };
this.success.emit(detail);
})
.catch(() => {
const message = 'couldn’t access clipboard';
const detail: ErrorDetail = { message, resourceLabel: this.resourceLabel };
this.error.emit(detail);
console.error(message);
});
}
}
.then((data) => {
const { btTracker } = data
const uri = getTaskUri(this.task, btTracker)
clipboard.writeText(uri)
.then(() => {
console.log(this.$t('copy-link-success'))
})
})
},
read () {
clipboard.read().then((res) => {
console.log(res)
this.$message({
message: '读取成功 返回结果请查看控制台',
type: 'success'
})
}, (err) => {
console.log(err)
this.$message({
message: '错误信息已经打印到控制台',
type: 'error'
})
})
}
}
read () {
clipboard.read().then((res) => {
console.log(res)
this.$message({
message: '读取成功 返回结果请查看控制台',
type: 'success'
})
}, (err) => {
console.log(err)
this.$message({
message: '错误信息已经打印到控制台',
type: 'error'
})
})
}
}
readText () {
clipboard.readText().then((res) => {
this.$message({
message: '读取成功 返回结果请查看控制台',
type: 'success'
})
}, err => {
console.log(err)
this.$message({
message: '错误信息已经打印到控制台',
type: 'error'
})
})
},
read () {
readText () {
clipboard.readText().then((res) => {
this.$message({
message: '读取成功 返回结果请查看控制台',
type: 'success'
})
}, err => {
console.log(err)
this.$message({
message: '错误信息已经打印到控制台',
type: 'error'
})
})
},
read () {
(_this.copyColor = function() {
var _this$state = _this.state,
color = _this$state.color,
currentFormat = _this$state.currentFormat
var activeColor = _this.getColor(color)[currentFormat]
clipboard.writeText(activeColor)
_this.setState({ showMsg: true })
}),
_temp)),
copyText () {
clipboard.writeText(this.text)
},
copyHtml () {
export function copyText (text) {
return clipboard.writeText(text)
.then(() => {
const shortText = short(text)
notice({ title: t('copy.copied'), body: text }, function () {
message.success(`${t('copy.copied')}: ${shortText}`, 0.7)
})
}, copyFailure)
}