47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
init: function(){
const e = this.e;
const btnCopy = D.span(),
link = D.span();
this.state = {link};
F.copyButton(btnCopy,{
copyFromElement: link,
extractText: ()=>link.dataset.url
});
D.append(this.e, btnCopy, link)
}
});
tbl.addEventListener('click', function f(ev){
lineTip.show(false);
}, false);
|
|
|
>
>
>
>
|
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
init: function(){
const e = this.e;
const btnCopy = D.span(),
link = D.span();
this.state = {link};
F.copyButton(btnCopy,{
copyFromElement: link,
extractText: ()=>link.dataset.url,
oncopy: (ev)=>{
F.toast("Copied: ",D.append(D.code(),ev.detail.text));
D.flashOnce(ev.target, undefined, ()=>lineTip.hide());
}
});//.addEventListener('text-copied', (ev)=>D.flashOnce(ev.target));
D.append(this.e, btnCopy, link)
}
});
tbl.addEventListener('click', function f(ev){
lineTip.show(false);
}, false);
|