From 0fa60ff58b4d45a6d43eae9f5c02d2d8b5eb87e5 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Fri, 14 Oct 2022 23:42:31 +0200 Subject: jira-fixes.user.js: Add documentation about left column focus function --- jira-fixes.user.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/jira-fixes.user.js b/jira-fixes.user.js index ee0101e..7158bbf 100644 --- a/jira-fixes.user.js +++ b/jira-fixes.user.js @@ -8,7 +8,15 @@ // @grant none // ==/UserScript== -function focus_left_content_column () { +// On the ticket page, the left content column is not necessarily focused on +// page load. This means that the arrow keys and page up/down don't scroll the +// left content column. +// +// Wait until the left content column is added to the document body and focus +// it. +// +// Not sure yet how to get this to work with Vimium. +function ticket_page_focus_left_content_column () { var observer = new MutationObserver(function(mutation_list) { for (var i = 0; i < mutation_list.length; i++) { var mutation = mutation_list[i]; @@ -34,4 +42,4 @@ function focus_left_content_column () { ); } -focus_left_content_column(); +ticket_page_focus_left_content_column(); -- cgit v1.2.3