0dab88f8198e8e8d35bbb65673186ad8df1a7f64
max
  Thu Nov 7 06:49:40 2024 -0800
adding API key section to hgHubConnect, for the "hubtools up" command, refs #34405

diff --git src/hg/js/hgHubConnect.js src/hg/js/hgHubConnect.js
index 074b8b6..5d732b6 100644
--- src/hg/js/hgHubConnect.js
+++ src/hg/js/hgHubConnect.js
@@ -59,30 +59,36 @@
     }, function() {
         $(this).removeClass("hoverRow");
     });
 });
 
 
 // initializes the tabs - with cookie option
 // cookie option requires jquery.cookie.js
 $(function() {
   $("#tabs").tabs({
       active: localStorage.getItem("hubTab") !== null ? localStorage.getItem("hubTab") : 0,
       activate: function(event, ui) {
           localStorage.setItem("hubTab", ui.newTab.index());
       },
   });
+  // activate tabs if the current URL ends with #dev or #conn
+  var tabName = window.location.hash;
+  if (tabName==="#dev")
+      $("#tabs").tabs("option", "active", 2);
+  if (tabName==="#conn")
+      $("#tabs").tabs("option", "active", 1);
 });
 
 // creates keyup event; listening for return key press
 $(document).ready(function() {
     $('#loadSampleHub').bind('click', function(e) {
         $('#validateHubUrl').val("https://genome.ucsc.edu/goldenPath/help/examples/hubDirectory/hub.txt");
 
     });
     $('#hubUrl').bind('keypress', function(e) {  // binds listener to url field
         if (e.which === 13) {  // listens for return key
              e.preventDefault();   // prevents return from also submitting whole form
              if (validateUrl($('#hubUrl').val()))
                  $('input[name="hubAddButton"]').focus().click(); // clicks AddHub button
         }
     });