gaspar_schot / Supercharged Local Directory File Browser


Version: 3.0.0+3fe3a39 updated

Summary: Makes file:/// directory ("Index of...") pages (and many server-generated index pages) actually useful. Adds navigation links, file preview pane, keyboard navigation, user-defined shortcuts, filtering, more.



License: GPL-3.0-or-later

• NEW: Support for video playback (finally!). Default supported video extensions: .mpeg, .mov, .m4v, .webm, .mp4. (You can add additional extensions in the code in $row_types > video, just below the user settings. Note that if your browser doesn't support a particular video format, this script will not change that.)
• IMPROVED: Cover art auto-selection: files with "back" in the name will be ignored and files with "front" or "cover" in the name will be selected.
• IMPROVED: Directory preview styling.
• IMPROVED: Better support for Firefox.
• ADDED: "Autoload media" menu item.
• CHANGED: "autoload_audio" renamed to "autoload_media"; if you export your user settings, please this update this item accordingly when you paste them back in.
• CHANGED: Completely reworked arrow navigation and autoload_media behavior because previous behavior was confusing.
•• Autoload_media now does only what it says on the tin and nothing more. If autoload_media = false, the first non-media file in a directory will be loaded.
•• Up/Down Arrows will now always select the prev/next row.
••• If the audio player is not visible, it will be displayed and the selected audio file will be loaded for playback.
••• If audio is playing and the prev/next selected file is also audio, it will be selected but not loaded, so that the currently playing audio will not be interrupted. (Press return/enter to load and begin playback of selected audio.)
••• Selecting audio files deselects video files and closes video player.
••• Selecting video files deselects audio files and closes audio player.
•• Left/Right Arrows will now always select the prev/next row of the same sort kind as the currently selected file, except:
••• if the current selection is an audio file, the L/R arrows will select and begin playback of that selection.)
••• Note that if the current selection is not an audio file, any currently playing audio will continue without interruption.
• FIXED: Media files did not scroll into view when next file began playing.
• CHANGED: Autoload cover art now works irrespective of "autoload_media" setting.
• IMPROVED: Left/Right arrow navigation will select prev/next dir or row if there are no media, image, or font files are in the directory.
• IMPROVED: You can now close previewed content and audio files separately from each other.
• CHANGED: Audio file titles shown separately from other file or dir titles.
• IMPROVED: Added string normalization for navigation by typed string: accented characters will be matched by their base ASCII letter (e.g., á = a, Ñ = n, ß = s, etc.).
• IMPROVED: Added "other" sort category for files whose extensions are not listed in $row_types.
• FIXED: Parent links were incorrectly formatted.
• FIXED: Arrow buttons in preview pane were not working properly. Now, if an image or font is displayed, clicking the arrows will select the prev/next image or font file.
• ADDED: Contact link in shortcuts menu
• FIXED: "Donate" link.
• Fixes for various style glitches introduced in the last version.
• Many, many other small fixes.
• CHANGED: moved $row_types to just below user settings, for easier management and updates.
• Internal: Reorganized, abstracted, and DRYed many functions; added more comments.

This script transforms the default local directory page (and many server-generated index pages) into a full-featured file browser, with a resizable sidebar and preview pane. (See screenshots below.)

If you like this script, please consider making a donation to encourage development. Thanks!

FEATURES: Arrow and typed-string navigation of items; browse and preview html, plain text files, images, pdfs, fonts, directories, etc.; autoplay audio and video files; grid views of images/fonts; user-defined bookmarks; user-defined ignored file types; show or hide invisible files (Unx/Mac OS only); navigate apps as folders (Unx/Mac OS only); and more.

IMPORTANT: After installing, you should look at the "User Settings" section in the code at the top of the script. There you can edit the shortcut menus and set defaults for many UI features. There is additional information in the comments.

NOTE: By default, userscripts will not run on file:/// urls, so for this script to work, you will have to enable it in your browser extension settings (e.g.: For Tampermonkey in Chrome, go to Chrome the extension page, click the details button on the Tampermonkey pane and check 'Allow access to file URLs').
Safari does not allow local directories to be browsed, so the script will not work on local directories, but it will work on remote directories (or on local directories through a local server).

NOTE: The script works on many server-generated index pages, too. Just add an @include line for each url at the top of the script.

NOTE: This script was developed in Vivaldi, running on Mac OS Mojave. It has been tested in several other Chrome and Gecko-based browsers. It has been very minimally tested on Windows and not at all on other OSes or browsers. It should work, but please report any issues.

Arrow Up/Down: Select prev/next item. If audio is playing, and prev/next file is also audio, it will be selected but not loaded in the audio player; press return to load it.
Arrow Left/Right: Select prev/next row of the same kind as the current selection, except if current selection is a media file, select and begin playback of that item.
Cmd/Ctrl + Arrow Up: Go to parent directory
Opt/Alt + Arrow Left/Right: Skip audio ±10s
Shift + Opt/Alt + Arrow Left/Right: Skip audio ±30s
Space: Pause/Play media files
Return: Open selected directory, select file, or pause/play media.
Cmd/Ctrl + D: Toggle file details (size, date modified) in some index page types.
Cmd/Ctrl + G: Show or Reset Grid
Cmd/Ctrl + I: Toggle Invisibles
Cmd/Ctrl + Shift + O: Open selected item in new window/tab
Cmd/Ctrl + R: Reload grids and previewed content, reset scaled images/fonts, reset media files to beginning.
Cmd/Ctrl + W: Close previewed content (doesn't work in all browsers; use close button instead), or close window if no content is being previewed.
Cmd/Ctrl + Shift + : Scale preview items and grids.


After with dark theme and image grid
After with dark theme and image grid

Audio player with dark theme and cover art
Audio player with dark theme and cover art

Light theme with image and font grid
Light theme with font and image grid

Dark theme with file preview
Dark theme with file preview

Rating: 1

1 Votes