gasparschott / supercharged-local-directory-file-browser

A browser userscript that beautifies directory index pages (local or remote) and adds extensive functionality.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

supercharged-local-directory-file-browser

Install with your browser’s userscript manager at https://openuserjs.org/users/gaspar_schot/scripts/Supercharged_Local_Directory_File_Browser

DESCRIPTION

This is a browser userscript that transforms the default local directory index 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 buying me a coffee or making a donation to encourage development. Thanks!

FEATURES INCLUDE:

  • Resizable sidebar and directory/file preview pane.
  • Arrow navigation in sidebar:
    • Up and Down Arrows select next/prev item.
    • Left and Right Arrows select next/prev item of same type.
  • Navigate sidebar by typed string.
  • Show/Hide file details (size (if avail), date modified (if avail), kind, extension).
  • Sort sidebar items by name or file details.
    • Default sort = sort by name with folders on top.
  • Preview all file types supported by browser (html, text, images, pdf, audio, video) plus fonts.
  • Preview and edit markdown and plain text files.
  • Audio and video playback, with shuffle, loop, skip audio +/- 10 or 30 sec via keyboard.
    • Preview other files (e.g., lyrics or cover art) in same directory while playing audio.
    • User setting to autoload cover art (if any images in directory, load "cover.ext" or first image found)
  • Open m3u playlists.
  • Open fonts and view glyph repertoire.
    • Save glyphs as SVG.
  • Grid views for images and/or fonts with keyboard navigation.
  • User settings (in main menu):
    • Light or Dark theme.
    • Default UI font size and font-family.
    • Default UI font and font-size.
    • Default file sorting.
    • Sort with directories on top.
    • Treat apps as directories (in OSes that support viewing app package contents)
    • Show or hide invisible files.
    • Show or hide ignored files in the ignored files list.
    • Show or hide file details.
    • Use custom file icons or browser defaults.
    • Autoload index.ext files.
    • Autoload cover art in directories with audio files.
    • Text editing default view: split, source, or preview.
    • Text editing sync scroll: on or off.
  • More...

Notes

This script works on local directories as well as many remote server-generated index pages (“open directories”).

  • By default, userscripts do not run on local file:/// urls, so for this script to work on local directories you will need to enable it in your browser's extension settings (e.g.: For Tampermonkey in Chrome, open the Chrome extensions page, click the details button for Tampermonkey and check 'Allow access to file URLs').
  • To make the script work on a remote open directory, you must add its URL to the list of allowed sites in the settings for this userscript, as provided by your userscript manager.
  • Because server configurations vary, the script may not work perfectly (or at all) on some open directories. You may also need to allow—or block—javascript on some ODs, and/or allow cookies. Please let me know if you encounter any problems.
  • This script was developed in the latest version of Vivaldi, running on the latest MacOS. It has been minimally tested in other Chrome-based browsers, Safari, and Firefox, and has been not been tested in any other browsers or OSes. No effort has been made to ensure compatibility with older browsers. Please report any issues.

See screenshots and description below. For more detailed usage information, see the “Help” item in the main menu of the script UI.

→ If you like this script, please consider leaving a RATING or buying me a coffee or making a donation, or sending me a comment to let me know what you think. Thank you!


KEYBINDINGS (These don't work in all browsers):

  • Arrow Up/Down: Select prev/next item.
    • If audio is playing, and prev/next file is also audio, it will be highlighted 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.
    • If current selection is a media file, select and begin playback of the next media item.
  • Opt/Alt + Arrow Left/Right: Skip audio ±10s
  • Opt/Alt + Shift + Arrow Left/Right: Skip audio ±30s
  • Cmd/Ctrl + Arrow Up: Go to parent directory
  • Cmd/Ctrl + Arrow Down: Open selected directory
  • Return: Open selected directory, select file, or pause/play media.
  • Space: Pause/Play media files
  • 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 + < or >: Scale preview items and grids.

Screenshots

BEFORE Before

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

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

MARKDOWN editing and preview, with subdirectory browsing Markdown editing and preview

FONT GRID Light theme with image and font grid


About

A browser userscript that beautifies directory index pages (local or remote) and adds extensive functionality.

License:GNU Affero General Public License v3.0