Skip to content

Commit

Permalink
Fixes for FF105 (close #25)
Browse files Browse the repository at this point in the history
  • Loading branch information
NiklasGollenstede committed Sep 19, 2022
1 parent b33860b commit b22768f
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 26 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ Search for or filter the Tabs in TST's sidebar, and quickly find and activate th
<!-- AMO long description: (AMO keeps line breaks, and supports a few HTML tags. Copy from here till the first MarkDown heading, but do remove the image tags.) -->

This is an extension for the browser extension <a href="https://github.com/piroor/treestyletab#readme">Tree Style Tabs</a> (TST). It adds a search box to TST's sidebar, allowing to search the tabs in the current window. With TST Tab Search you can: <ul>
<li> start searching with a global search hotkey (Ctrl+Shift+F) </li>
<li> customize the filtered tabs and the search panel </li>
<li> cycle through results and then switch to the tabs </li>
<li> search by full text, keywords or regular expression, optionally case sensitive, as whole word </li>
<li> show and search by tab ID </li>
<li> search by any tab property </li>
<li> Start searching with a global search hotkey (Ctrl+Shift+F). </li>
<li> Customize the filtered tabs and the search panel. </li>
<li> Cycle through results and then switch to the tabs. </li>
<li> Search by full text, keywords or regular expression, optionally case sensitive, as whole word. </li>
<li> Show and search by tab IDs. </li>
<li> Search by any tab property. </li>
</ul>

<img alt="Tab searches with different settings" src="./resources/screenshot-merged.png" width="600px"> <!-- remove this for AMO -->
Expand Down
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"pbq": "0.6.1",
"web-ext-build": "0.2.4",
"web-ext-event": "0.3.0",
"web-ext-utils": "0.2.2"
"web-ext-utils": "0.2.3"
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^4.1.1",
Expand Down
10 changes: 2 additions & 8 deletions src/background/index.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,12 @@ import tstApi from './tst-api.esm.js';
import { updateCommand, debounce, } from './util.esm.js';
import Browser from 'web-ext-utils/browser/index.esm.js';
const { manifest, Commands, BrowserAction, Runtime, Tabs, Windows, } = Browser;
import Views from 'web-ext-utils/loader/views.esm.js';
import notify from 'web-ext-utils/utils/notify.esm.js';
import Port, { web_ext_Port, } from 'multiport/index.esm.js';
import Events, { setEvent, } from 'web-ext-event'; void Events;
import options from '../common/options.esm.js';

if (false) { /* `define`ed dependencies, for static tracking as `import` dependencies */ // eslint-disable-line
// @ts-ignore
import('web-ext-utils/loader/views.js');
}
// Can't be proted to ESM yet: https://github.com/mozilla/addons-linter/issues/3741
let Views; globalThis.require.async('node_modules/web-ext-utils/loader/views').then(exp => (Views = exp));

let debug = false; options.debug.whenChange(([ value, ]) => { debug = value; });


Expand Down Expand Up @@ -159,7 +153,7 @@ async function doSearch({
cached = false, seek = undefined,
} = { }) { try {
(windowId != null && windowId !== -1) || (windowId = (await Windows.getCurrent()).id);
debug && console.info('TST Search: doSearch', windowId, this, ...arguments); // eslint-disable-line no-invalid-this
debug && console.info('TST Tab Search: doSearch', windowId, this, ...arguments); // eslint-disable-line no-invalid-this

// save search flags
[ 'matchCase', 'wholeWord', 'regExp', ].forEach(name => {
Expand Down
2 changes: 1 addition & 1 deletion src/background/tst-api.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export default function tstAPI({ getManifest, methods = [ ], events = { __proto_

async function register() {
const tstManifest = { listeningTypes: [ ...Object.keys(events), 'wait-for-shutdown', ], ...getManifest(), };
API.debug && console.info(ownName +': registering with TST ...', tstManifest);
//API.debug && console.info(ownName +': registering with TST ...', tstManifest);
(await TST.registerSelf(tstManifest));
API.isRegistered = true;
}
Expand Down
2 changes: 2 additions & 0 deletions src/views/index.esm.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import Views from 'web-ext-utils/loader/views.esm.js';
export default Views.createRedirect('options');
1 change: 0 additions & 1 deletion src/views/index.js

This file was deleted.

4 changes: 2 additions & 2 deletions src/views/options.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import Browser from 'web-ext-utils/browser/index.esm.js'; const { manifest, } = Browser;
import notify from 'web-ext-utils/utils/notify.esm.js';
import Storage from 'web-ext-utils/browser/storage.esm.js'; const { sync: storage, } = Storage;
import OptionsPage from 'web-ext-utils/options/editor/inline.esm.js';
import options from '../common/options.esm.js';
import Background from '../background/index.esm.js'; const { TST, } = Background;

Expand Down Expand Up @@ -45,7 +46,6 @@ async function onCommand({ name, }, buttonId) { try { switch (name) {
} break;
} } catch (error) { notify.error(error); } }

if (false) { import('web-ext-utils/options/editor/inline.js'); } // eslint-disable-line
(await (await globalThis.require.async('node_modules/web-ext-utils/options/editor/inline'))({ document, onCommand, }, location));
OptionsPage({ document, onCommand, }, location);

}
1 change: 1 addition & 0 deletions web-ext-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@ stages:
commands:
globalFocusKey:
description: 'Focus the TST Tab Search bar'
web_accessible_resources: [ '*' ]

0 comments on commit b22768f

Please sign in to comment.