3fda83d1699342b57c5512ca0b29f89be145cb4b lrnassar Tue Mar 26 15:58:52 2024 -0700 Changing the copy button to to always say the same statement, refs #33248 diff --git src/hg/js/utils.js src/hg/js/utils.js index c97ddcb..7783dc7 100644 --- src/hg/js/utils.js +++ src/hg/js/utils.js @@ -36,34 +36,31 @@ var text = textEl.getAttribute("data-copy"); if (text===null) text = textEl.innerText; var textArea = document.createElement("textarea"); textArea.value = text; // Avoid scrolling to bottom textArea.style.top = "0"; textArea.style.left = "0"; textArea.style.position = "fixed"; document.body.appendChild(textArea); textArea.focus(); textArea.select(); document.execCommand('copy'); document.body.removeChild(textArea); - if (buttonEl.innerHTML.includes("Clipboard")) buttonEl.innerHTML = 'Copied'; - else - buttonEl.innerHTML = 'OK'; ev.preventDefault(); } function cfgPageOnVisChange(ev) { /* configuration page event listener when user changes visibility in dropdown */ if (ev.target.value === 'hide') ev.target.classList.replace("normalText", "hiddenText"); else ev.target.classList.replace("hiddenText", "normalText"); } function cfgPageAddListeners() { /* add event listener to dropdowns */ var els = document.querySelectorAll(".trackVis"); for (var i=0; i < els.length; i++) {