af730d9e24c0642fe39657f890bc117ed015ccbf galt Wed Feb 15 01:12:26 2017 -0800 CSP code cleanup. Using new var-args versions of functions jsInlineF and jsOnEventByIdF to avoid using lots of fixed-size local javascript strings. diff --git src/hg/hgGtexTrackSettings/hgGtexTrackSettings.c src/hg/hgGtexTrackSettings/hgGtexTrackSettings.c index 3ee5bdb..9d84c0e 100644 --- src/hg/hgGtexTrackSettings/hgGtexTrackSettings.c +++ src/hg/hgGtexTrackSettings/hgGtexTrackSettings.c @@ -241,33 +241,31 @@ printConfigPanel(tdb); printTissueTable(tdb); puts( " </div>\n" " <div class='col-md-6'>\n"); printBodyMap(); puts( " </div>\n" " </div>\n" ); } static void onclickJumpToTop(char *id) /* CSP-safe click handler arrows that cause scroll to top */ { -char javascript[1024]; -safef(javascript, sizeof javascript, "$('html,body').scrollTop(0);"); -jsOnEventById("click", id, javascript); +jsOnEventById("click", id, "$('html,body').scrollTop(0);"); } static void printDataInfo(char *db, struct trackDb *tdb) { puts( "<a name='INFO_SECTION'></a>\n" " <div class='row gbSectionBanner'>\n" " <div class='col-md-11'>Data Information</div>\n" " <div class='col-md-1'>\n" ); #define DATA_INFO_JUMP_ARROW_ID "hgGtexDataInfo_jumpArrow" printf( " <i id='%s' title='Jump to top of page' \n" " class='gbIconArrow fa fa-lg fa-arrow-circle-up'></i>\n", DATA_INFO_JUMP_ARROW_ID