Chrome / Firefox extension 'TabFS' review that can handle browser tabs as a file system
DOM of the page by erasing the directory, so let's check how you can actually operate the tab. I did.
' TabFS ' is a Chrome / Firefox extension that allows you to handle browser tabs on the file system. With TabFS, it is possible to close the tab of the browser and manipulate the
GitHub --osnr / TabFS: Mount your browser tabs as a filesystem.
TabFS is available on macOS and Linux. This time I will try TabFS on Ubuntu 20.04. First, go to 'chrome: // extensions' in Chrome and make sure that 'Developer Mode' is turned on.
Execute the following command in the terminal to install the libraries required to build TabFS.
[code] sudo apt install libfuse-dev [/ code]
Then download the TabFS source code with the following command.
[code] git clone https://github.com/osnr/TabFS.git [/ code]
Open the downloaded source code directory in the filer and drag and drop the 'extensions' directory onto the Chrome screen to install the extension.
After installing the extension, make a note of the character string displayed in the 'ID' part.
Subsequent work will be done on the terminal again. Create a directory to mount the tabs as a file system and build TabFS.
[code] cd fs
make [/ code]
Specify the 'browser name' and 'ID' as arguments, and execute the installation script.
[code] ./install.sh chrome ID [/ code]
When you click 'Update' on the Chrome extension screen ...
The file system will be mounted under the 'mnt' directory.
When I open the tab in Chrome like the image ...
Under 'mnt / by-titles', a symbolic link with the tab title name and ID as the name was created. The link destination of the symbolic link is a directory whose name is the tab ID under 'mnt / by-id'. Also, the tab of the Japanese title is not displayed correctly and has been converted to '_'.
In the directory, 'url.txt' contains the URL, 'title.txt' contains the tab title name, and 'text.txt' contains the page content.
In order to realize 'Handling tabs on the file system', when 'title.txt' under 'mnt / by-id / ID' is displayed for all tabs with the cat command, it looks like this.
'If you want to close all tabs that have' YouTube 'in their title, you can delete the tab directory as shown below.
[code] rm ./by-title/*YouTube * [/ code]
I was able to close the 'YouTube' tab like this. The same result can be obtained by deleting the directories under 'mnt / by-id'.
You can reload the tab by outputting the string 'reload' to the 'control' file in the directory corresponding to the tab. You can also close the tab by outputting the string 'remove'.
[code] echo reload | tee ./by-title/TabFS*/control [/ code]
Execute the following command.
[code] echo'document.querySelector ('h1'). style.backgroundColor = 'red''> ./ tag ID / execute-script [/ code]
The background color of the heading has changed from blue to red.
In addition, it is possible to read data such as JSON and acquire the title of the song being played on YouTube.