fffffff
This commit is contained in:
+23
@@ -0,0 +1,23 @@
|
||||
console.log("ug-copy running")
|
||||
/* const ugCopyBtnId = 'ug-copy-btn'
|
||||
const ugCopyBtnEl = document.createElement('button')
|
||||
ugCopyBtnEl.id = ugCopyBtnId
|
||||
ugCopyBtnEl.className = 'ug-copy-btn'
|
||||
ugCopyBtnEl.type = 'button'
|
||||
ugCopyBtnEl.innerHTML = "Copy Tab" */
|
||||
const copyTab = () => {
|
||||
const clip = document.querySelector('pre').innerText
|
||||
navigator.clipboard.writeText(clip).then(
|
||||
() => {},
|
||||
(e) => {
|
||||
console.log('ug-copy error;', e)
|
||||
},
|
||||
)
|
||||
}
|
||||
/* ugCopyBtnEl.addEventListener('click', copyTab)
|
||||
document.body.appendChild(ugCopyBtnEl)
|
||||
|
||||
const styleEl = document.createElement("link")
|
||||
styleEl.rel = "stylesheet"
|
||||
styleEl.setAttribute("href", "resource://ug-copy/style.css");
|
||||
document.getElementsByTagName("head")[0].appendChild(styleEl); */
|
||||
Reference in New Issue
Block a user