Sexy Undo Close Tab chrome扩展 无法 在新标签页中打开链接,以及鼠标按下后复制标题 ,改进
运行下面这段代码
let li = document.querySelectorAll("a[title]")
li.forEach(e => {
e.href = e.title
e.querySelector('div').addEventListener("mousedown", (event) => {
debugger
navigator.clipboard.writeText(e.querySelector('div').innerText)
});
});
setInterval(() => {
let li = document.querySelectorAll("a[title]")
li.forEach(e => {
e.href = e.title
e.querySelector('div').addEventListener("mousedown", (event) => {
navigator.clipboard.writeText(e.querySelector('div').innerText)
});
});
}, 5000);