From dcce4221a2122c2d62c2f6c45761374dc8e08ecb Mon Sep 17 00:00:00 2001 From: Omar Rizwan Date: Sat, 2 Jan 2021 15:46:44 -0800 Subject: [PATCH] md updates --- tabfs.md | 48 ++++++++++++++++++++++++++++++++++++------------ 1 file changed, 36 insertions(+), 12 deletions(-) diff --git a/tabfs.md b/tabfs.md index 32d521d..785124d 100644 --- a/tabfs.md +++ b/tabfs.md @@ -39,8 +39,8 @@ Firefox, on macOS and Linux.[^otherbrowsers] Each of your open tabs is mapped to a folder.
- - + +

I have 3 tabs open, and they map to 3 folders in TabFS

@@ -166,6 +166,20 @@ $ echo 'document.body.style.background = "green"' > mnt/tabs/last-focused/execut $ echo 'alert("hi!")' > mnt/tabs/last-focused/execute-script ``` +### Get images / scripts / etc on page + +(TODO: [document better](https://github.com/osnr/TabFS/issues/5), put in screenshots) + +The [`debugger/` +subdirectory](https://github.com/osnr/TabFS/blob/fef9289e3a7f82cda6319d5f19d5a5f13f3cc44b/extension/background.js#L355) +in each tab folder has synthetic files that let you access loaded +resources (in `debugger/resources/`) and scripts (in +`debugger/scripts/`). (this is experimental) + +### Retrieve what's playing on YouTube Music: [youtube-music-tabfs](https://github.com/junhoyeo/youtube-music-tabfs) + +[thanks](https://www.reddit.com/r/programming/comments/kok4dw/tabfs_mount_your_browser_tabs_as_a_filesystem/ghtbgw1/) to [Junho Yeo](https://github.com/junhoyeo)! + ### Reload an extension when you edit its source code Suppose you're working on a Chrome extension (apart from this @@ -314,7 +328,9 @@ Choose manifest.json in the extension subfolder of this repo. First, make sure you have FUSE and FUSE headers. On Linux, for example, `sudo apt install libfuse-dev` or equivalent. On macOS, get [FUSE for -macOS](https://osxfuse.github.io/). +macOS](https://osxfuse.github.io/). (on macOS, also check [this +bug](https://github.com/osnr/TabFS/issues/11) -- TODO work out the +best path to explain here.) Then compile the C filesystem: @@ -363,7 +379,7 @@ in the extension's entry in the Chrome extensions page; in Firefox, click "Inspect")
- +
This console is also incredibly helpful for debugging anything that @@ -443,9 +459,12 @@ GPLv3 ## things that could/should be done -- add more synthetic files!! view DOM nodes, snapshot current HTML of - page, spelunk into living objects. see what your code is doing. make - more files writable also +(maybe you can do these?) + +- [add more synthetic files!! (it's just + JavaScript)](https://twitter.com/rsnous/status/1345113873792126976) + view DOM nodes, snapshot current HTML of page, spelunk into living + objects. see what your code is doing. make more files writable also - build more (GUI and CLI) tools on top, on both sides @@ -514,8 +533,8 @@ inside of the browser. 'browser tabs as files' Unix, and Unix is by far the more accessible and programmable and cohesive as a computing environment (it has concepts that compose! shell, processes, files), even though it's arguably the less important -to my daily life. how can the browser take on more of the properties -of Unix? +to my daily life. [how can the browser take on more of the properties +of Unix?](https://twitter.com/jcreed/status/1344982366243213312) - it's [way too hard](https://twitter.com/rsnous/status/1342236988938719232) to make a @@ -524,6 +543,11 @@ suggests making an extension is a whole Thing, a whole Project. like, why can't I just take a minute to ask my browser a question or tell it to automate something? lightness +- ["files are a sort of approachable 'bridge' that everyone knows how + to interact with" / files are like one of the first things you learn + if you know any programming language / "because of this fs thing any + beginner coding thing can make use of it now"](https://twitter.com/rsnous/status/1345490658836926464) + - a lot of existing uses of these browser control APIs are in an automation context: testing your code on a robotic browser as part of some pipeline. I'm much more interested in an interactive, @@ -596,9 +620,9 @@ files - my [fake filesystems talk](https://www.youtube.com/watch?v=pfHpDDXJQVg) - - it has the right idea for - how to set up userscripts. just make files -- don't make [your - own weird UI to add and remove + - [Witchcraft](https://luciopaiva.com/witchcraft/) has the right + idea for how to set up userscripts. just make files -- don't + make [your own weird UI to add and remove them](https://twitter.com/rsnous/status/1196536798312140800). (I guess there is a political or audience [tradeoff](https://twitter.com/rsnous/status/1290031845363466242)