fcb6dc8dfa166136193177c895ca181200850e4d
max
  Mon Jan 19 06:02:31 2026 -0800
changing superTrack TrackUi quite a bit. Removing dropdowns and
replacing them with buttons. Also adding buttons for setting all tracks
or all visible tracks to a visibility. While at it, making a change
to the js-query-library function (inversed the order of arguments) which was requested months ago by
Brian, but I forgot to make the change after code review. Also
shortening the "source data version" label to just "version". refs #36917.

I changed the library function
hTvDropDownClassVisOnlyAndExtra() rather than copying the code. This was
because I was hesitant to copy/paste all this code into a second
function, which would have been the only alternative, as the function
cannot be reused as-is. So I modified the function to return the list of
visibilities. It's never clear whether it's better to modify
functions or copy/paste code.
here, not breaking the function into smaller parts, so copy/pasting it, would risk
requiring more future copy/pasted code. But the risk is to break existing
tracks.

diff --git src/hg/js/utils.js src/hg/js/utils.js
index 57acd7d7cf2..bbdee5d271a 100644
--- src/hg/js/utils.js
+++ src/hg/js/utils.js
@@ -4561,15 +4561,19 @@
     var w = window.open('');
     w.document.write('<a class="button" HREF="'+url+'" TARGET=_blank><button>Download File</button></a>&nbsp;');
     w.document.write('<button id="closeWindowLink" HREF="#">Close Tab</button>');
     w.onload = function(ev) {
       // Attach event listeners after the new window is loaded
       w.document.getElementById('closeWindowLink').addEventListener('click', function() { w.close(); } );
     };
     fetch(url).then(response => response.text()) // Read the response as text
     .then(function(text) {
        w.document.write('<pre>' + text + '</pre>'); // Display the content
        w.document.close(); // Close the document to finish rendering
     })
     .catch(error => console.error('Error fetching BED file:', error));
 }
 
+function capitalizeFirstLetter(string) {
+  return string.charAt(0).toUpperCase() + string.slice(1);
+}
+