Removed logging and only run on issue view

This commit is contained in:
2026-02-19 21:59:44 -05:00
parent 4ebcace14c
commit d1345cc2b8

View File

@@ -1,13 +1,11 @@
$(function() {
const regex = /^\/issues\/\d+/;
if (regex.test(window.location.pathname)) {
const firstElement = document.getElementsByClassName('int_cf cf_4 attribute')[0].children[1];
console.log(firstElement);
if (firstElement) { // Check if the element exists
firstElement.addEventListener('click', function() {
console.log('The first element was clicked!');
try {
const text = firstElement.innerText;
console.log(text);
navigator.clipboard.writeText(text);
firstElement.innerHTML = "<b>Copied!</b>";
@@ -23,4 +21,5 @@ $(function() {
}
});
}
}
});