mirror of
https://github.com/f/awesome-chatgpt-prompts.git
synced 2024-10-01 01:25:43 -04:00
Update default.html
This commit is contained in:
parent
ebcb139e0e
commit
5fa0b77928
@ -36,13 +36,14 @@
|
|||||||
button.style.padding = '0';
|
button.style.padding = '0';
|
||||||
button.style.backgroundColor = 'transparent';
|
button.style.backgroundColor = 'transparent';
|
||||||
button.innerHTML = '✂️';
|
button.innerHTML = '✂️';
|
||||||
button.addEventListener('click', () => {
|
button.addEventListener('click', async () => {
|
||||||
if (navigator.clipboard) {
|
if (navigator.clipboard) {
|
||||||
navigator.clipboard.writeText(x.innerText).then(() => alert('Prompt is copied, now paste this into ChatGPT.'));
|
await navigator.clipboard.writeText(x.innerText);
|
||||||
|
alert('Prompt is copied, now paste this into ChatGPT.');
|
||||||
} else {
|
} else {
|
||||||
alert('Your browser does not support clipboard copy. Please select the prompt and copy.')
|
alert('Your browser does not support clipboard copy. Please select the prompt and copy.')
|
||||||
}
|
}
|
||||||
});
|
}, false);
|
||||||
x.previousElementSibling.previousElementSibling.prepend(button);
|
x.previousElementSibling.previousElementSibling.prepend(button);
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
Loading…
Reference in New Issue
Block a user