Skip to content

Commit

Permalink
Ctrl-F to search
Browse files Browse the repository at this point in the history
  • Loading branch information
brendangregg committed Oct 11, 2015
1 parent 4b2c0b7 commit 182b24f
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions flamegraph.pl
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
#
# grep funcA input.txt | ./flamegraph.pl [options] > graph.svg
#
# Then open the resulting .svg in a web browser, for interactivity: mouse-over
# frames for info, click to zoom, and ctrl-F to search.
#
# Options are listed in the usage message (--help).
#
# The input is stack frames and sample counts formatted as single lines. Each
Expand Down Expand Up @@ -611,6 +614,14 @@ sub flow {
details.nodeValue = ' ';
}
// ctrl-F for search
window.addEventListener("keydown",function (e) {
if (e.keyCode === 114 || (e.ctrlKey && e.keyCode === 70)) {
e.preventDefault();
search_prompt();
}
})
// functions
function find_child(parent, name, attr) {
var children = parent.childNodes;
Expand Down

0 comments on commit 182b24f

Please sign in to comment.