mirror of
https://github.com/osnr/TabFS.git
synced 2024-05-17 21:16:35 +02:00
Fix async bug on handler init. Can read url and title now! (kinda)
(they don't terminate properly, will fix that next)
This commit is contained in:
parent
c85bb26264
commit
5ed6379687
|
@ -51,7 +51,7 @@ function sanitize(s) {
|
||||||
view of what the whole filesystem looks like at a glance. */
|
view of what the whole filesystem looks like at a glance. */
|
||||||
const router = {};
|
const router = {};
|
||||||
|
|
||||||
async function withTab(handler) {
|
function withTab(handler) {
|
||||||
return {
|
return {
|
||||||
async read(path, fh, size, offset) {
|
async read(path, fh, size, offset) {
|
||||||
const tab = await browser.tabs.get(parseInt(pathComponent(path, -2)));
|
const tab = await browser.tabs.get(parseInt(pathComponent(path, -2)));
|
||||||
|
@ -59,7 +59,7 @@ async function withTab(handler) {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
async function fromScript(code) {
|
function fromScript(code) {
|
||||||
return {
|
return {
|
||||||
async read(path, fh, size, offset) {
|
async read(path, fh, size, offset) {
|
||||||
const tabId = parseInt(pathComponent(path, -2));
|
const tabId = parseInt(pathComponent(path, -2));
|
||||||
|
|
Loading…
Reference in a new issue