a11y-outline

web extension to navigate document outlines easily
git clone https://git.ce9e.org/a11y-outline.git

commit
e4f3054160b0c964c3fe2581d3ba6ea769a16b6c
parent
d925c193a795c4bc30907198966d378b419b8fcb
Author
Tobias Bengfort <tobias.bengfort@posteo.de>
Date
2023-07-25 05:09
align treeview interface with bookmarklet/module

Diffstat

M outline.js 6 +++---
M treeview.js 8 +++++---

2 files changed, 8 insertions, 6 deletions


diff --git a/outline.js b/outline.js

@@ -1,4 +1,4 @@
    1    -1 /* global aria, treeview, updateTree */
   -1     1 /* global aria, treeview */
    2     2 
    3     3 var DIALOG_ID = 'a11y-outline';
    4     4 
@@ -80,7 +80,7 @@ var buildTree = function(matches) {
   80    80 };
   81    81 
   82    82 var renderTree = function(role, dialog) {
   83    -1 	var ul = treeview([], dialog.id + '-' + role);
   -1    83 	var ul = treeview.build([], dialog.id + '-' + role);
   84    84 	ul.setAttribute('aria-busy', 'true');
   85    85 
   86    86 	dialog.appendChild(ul);
@@ -90,7 +90,7 @@ var renderTree = function(role, dialog) {
   90    90 		var tree = buildTree(matches);
   91    91 
   92    92 		if (matches.length) {
   93    -1 			updateTree(ul, tree, ul.id);
   -1    93 			treeview.update(ul, tree, ul.id);
   94    94 		} else {
   95    95 			ul.innerHTML = '<li><em>Nothing found</em></li>';
   96    96 		}

diff --git a/treeview.js b/treeview.js

@@ -219,5 +219,7 @@ var buildTree = function(data, id) {
  219   219 	return tree;
  220   220 };
  221   221 
  222    -1 window.treeview = buildTree;
  223    -1 window.updateTree = updateTree
  223    -1 
\ No newline at end of file
   -1   222 window.treeview = {
   -1   223 	build: buildTree,
   -1   224 	update: updateTree,
   -1   225 }
   -1   225 
\ No newline at end of file