a11y-outline

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

commit
b2ec360aad8db8f6a98d009dd9bccf06c725b4e4
parent
74ffac317cf3946dbb571af624e55db16c141bda
Author
Tobias Bengfort <tobias.bengfort@posteo.de>
Date
2022-09-08 12:26
avoid using browserify

Diffstat

M .gitignore 2 +-
M Makefile 12 ++++++------
M manifest.json 7 ++++++-
R src/outline.js -> outline.js 4 ----
R src/treeview.js -> treeview.js 4 ++--

5 files changed, 15 insertions, 14 deletions


diff --git a/.gitignore b/.gitignore

@@ -1,5 +1,5 @@
    1     1 node_modules
    2    -1 /outline.js
   -1     2 vendor
    3     3 /outline.css
    4     4 /icon-128.png
    5     5 *.zip

diff --git a/Makefile b/Makefile

@@ -1,15 +1,15 @@
    1     1 PATH := node_modules/.bin:$(PATH)
    2     2 
    3    -1 bundle.zip: manifest.json icon-128.png bg.js outline.js outline.css
   -1     3 bundle.zip: manifest.json icon-128.png bg.js outline.js treeview.js outline.css
   -1     4 	mkdir -p vendor
   -1     5 	cp node_modules/aria-api/dist/aria.js vendor/
   -1     6 	cp node_modules/dialog-polyfill/dist/dialog-polyfill.js vendor/
    4     7 	rm -f $@
    5    -1 	zip $@ $^
   -1     8 	zip -r $@ $^ vendor
    6     9 
    7    10 icon-128.png: icon.svg
    8    11 	inkscape $< --export-filename=$@
    9    12 
   10    -1 outline.js: src/outline.js src/*.js node_modules
   11    -1 	npx browserify $< -o $@
   12    -1 
   13    13 outline.css: src/outline.scss node_modules
   14    14 	npx sass $< $@
   15    15 
@@ -17,4 +17,4 @@ node_modules:
   17    17 	npm install aria-api@0.4.2 dialog-polyfill@0.5.6
   18    18 
   19    19 clean:
   20    -1 	rm -f outline.js outline.css
   -1    20 	rm -rf vendor outline.css

diff --git a/manifest.json b/manifest.json

@@ -37,7 +37,12 @@
   37    37 
   38    38   "content_scripts": [{
   39    39     "matches": ["<all_urls>"],
   40    -1     "js": ["outline.js"]
   -1    40     "js": [
   -1    41       "vendor/dialog-polyfill.js",
   -1    42       "vendor/aria.js",
   -1    43       "treeview.js",
   -1    44       "outline.js"
   -1    45     ]
   41    46   }],
   42    47 
   43    48   "permissions": [

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

@@ -1,7 +1,3 @@
    1    -1 var aria = require('aria-api');
    2    -1 var dialogPolyfill = require('dialog-polyfill');
    3    -1 var treeview = require('./treeview');
    4    -1 
    5     1 var DIALOG_ID = 'a11y-outline';
    6     2 
    7     3 var focus = function(el) {

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

@@ -205,4 +205,4 @@ var buildTree = function(data, id) {
  205   205 	return tree;
  206   206 };
  207   207 
  208    -1 module.exports = buildTree
  208    -1 
\ No newline at end of file
   -1   208 window.treeview = buildTree
   -1   208 
\ No newline at end of file