057c793acb74d78c0fe969db0c3fb21df00927c6
max
  Wed Sep 2 02:33:06 2015 -0700
Removing the 'send to' menu and replacing it with a javascript-based
dialog that closes itself. Also fixing a small bug with the / key on
firefox for the shortcuts. refs #15113

diff --git src/hg/hgTracks/extTools.c src/hg/hgTracks/extTools.c
index b29c480..24df191 100644
--- src/hg/hgTracks/extTools.c
+++ src/hg/hgTracks/extTools.c
@@ -8,30 +8,62 @@
  * See README in this or parent directory for licensing information. */
 
 #include "common.h"
 #include "dystring.h"
 #include "hCommon.h"
 #include "htmshell.h"
 #include "hash.h"
 #include "web.h"
 #include "ra.h"
 #include "hgTracks.h"
 #include "extTools.h"
 #include "hgFind.h"
 #include "obscure.h"
 #include "net.h"
 
+void printExtMenuData() 
+/* print the external tools aka "send to" menu entries as a javascript list to stdout */
+{
+struct extTool *extTools = readExtToolRa("extTools.ra");
+struct extTool *et;
+hPuts("<script>\n");
+hPuts("extTools = [\n");
+for(et = extTools; et != NULL; et = et->next)
+    {
+    if (et->dbs!=NULL)
+        {
+        if (!slNameInList(et->dbs, database))
+            continue;
+        }
+    if (et->notDbs!=NULL)
+        {
+        if (slNameInList(et->notDbs, database))
+            continue;
+        }
+    char* tool = jsonStringEscape(et->tool);
+    char* shortLabel = jsonStringEscape(et->shortLabel);
+    char* longLabel = jsonStringEscape(et->longLabel);
+    hPrintf("    ['%s', '%s', '%s', %d]", tool, shortLabel, longLabel, et->maxSize);
+    if (et->next)
+        hPuts(",");
+    hPuts("\n");
+    }
+hPuts("];\n");
+hPuts("</script>\n");
+
+}
+
 static char *cloneRaSetting(struct hash *hash, char *name, struct lineFile *lf, bool mustExist)
 /* clone a setting out of the ra hash.  errAbort if mustExit and not found, otherwise NULL. */
 {
 char *str;
 if ((str = hashFindVal(hash, name)) == NULL) 
     {
     if (mustExist)
         errAbort("missing required setting '%s' on line %d in file %s\n",
             name, lf->lineIx, lf->fileName);
     else
         return NULL;
     }
 return cloneString(str);
 }