Greasy Fork is available in English.

Supercharged Local Directory File Browser

Makes directory index pages (either local or remote open directories) actually useful. Adds sidebar and content preview pane; keyboard navigation; sorting; light/dark UI; preview images/fonts in navigable grids; browse subdirectories w/o page reload (“tree view”); media playback, shuffle/loop options; basic playlist (m3u, extm3u) & cuesheet (.cue) support; create, edit, preview, save markdown/plain text files; open font files, view complete glyph repertoire, save glyphs as .svg; more.

作者
gaspar_schott
今日安裝
0
安裝總數
983
評價
14 0 0
版本
8.1.4
建立日期
2018-02-18
更新日期
2024-02-11
授權條款
GPL-3.0-or-later
腳本執行於

SUPERCHARGED LOCAL DIRECTORY FILE BROWSER

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!


VERSION 8.1.4 (2024-02-11)

IMPROVED: Added support for .avif images.

VERSION 8.1.3 (2024-01-14)

FIXED: A minor styling glitch in the directory listings.

VERSION 8.1.2 (2024-01-06)

IMPROVED: Added numbering for grid items. FIXED: The grid item count displayed in the title bar was not always correct (and the code was ridiculously overly complexificated). FIXED: Some long-standing issues with the Reload function and button. Reload also now resets media durations. FIXED: An issue with grids where after closing a previewed item the grid would scroll to the first item instead of the selected item.

VERSION 8.1.1 (2023-12-31)

IMPROVED: Better styling for PDF/HTML files in dark mode: colors are more accurately rendered, and images in htm files are not inverted.
FIXED: The "Playing:" media file name wasn't always removed from the window title when it should have been.

VERSION 8.1.0 (2023-12-29)

NEW: Added UI option to show title of playing media in window title.
NEW: Added UI option to invert colors in HTML and PDF files when the main UI theme is dark.
IMPROVED: Enabled lazy load for image thumbnails; removed UI preference to "always show image thumbnails" since it is no longer needed.
FIXED: Links in HTML files didn’t work properly.
FIXED: Various fixes for media shuffle play:

  • When enabling shuffle play, don't immediately select and play next track if a track is already playing.
  • Loop play didn't work when shuffle play was enabled.
  • Remaining items count wouldn't go to 0 when last item was loaded.

FIXED: Media playback sometimes did not skip unchecked items.
FIXED: An issue with dismissing warning messages via the "Return" key.
FIXED: An obscure issue where remotely-hosted webloc files would not load, even though local webloc files would. OTHER: Various style fixes and tweaks.

VERSION 8.0.9.2 (2023-10-20)

FIXED: Audio player would be hidden when certain content types were being loaded.

VERSION 8.0.9.1 (2023-10-20):

FIXED: If the audio player was positioned at the bottom of the window it would revert to the default top position upon window resize.

VERSION 8.0.8.2 (2023-10-04):

Another small fix for "quicklooked" audio files.

VERSION 8.0.8.1 (2023-09-25):

A couple of fixes for the previous fixes.

VERSION 8.0.8 (2023-09-22): Mainly cuesheet menu improvements.

Note that .cue files cannot be read by the browser; however, if you change the extension to .cuetxt (and ensure that the file name exactly matches that of the associated media file), when you select the media file the script will automatically locate the .cuetxt file and load it for display in a menu item in the title area of the content pane.
FIXED: Long cuesheet menus could not be scrolled.
FIXED (or improved): The cuesheet tracklist menu only displayed the cumulative times for each track; now both the duration of the track and the cumulative time is displayed.
IMPROVED: Click the cuesheet tracklist icon to keep the menu open without hovering; click again to toggle closed.
IMPROVED: Added arrow key navigation to cuesheet tracklist menu.
IMPROVED: Display the name of the currently playing cuesheet track in the audio player.
IMPROVED: Automatically select the currently playing cuesheet track in the cuesheet menu when the player position changes (either by ordinary playback, user scrubbing, or clicking the audio player).
FIXED: Video did not stop playing when other content was selected.
FIXED: Remove cover art from quick-viewed audio items.
FIXED: A few other small UI issues.

VERSION 8.0.7 (2023-09-04)

FIXED: Clicking audio title w/o any other content open closes audio. FIXED: Close quickview content when selected item is an ignored type. FIXED: A nasty bug when changing the sidebar sort with open subdirectories. FIXED: Multiple issues with selecting multiple dirs or files (images and fonts only) via the keyboard (Shift+ArrowKey); images and fonts now correctly open in the grid view and permit further selections. FIXED: An issue where the texteditor would not receive focus on clicking. FIXED: Various minor UI issues. IMPROVED: Added UI Pref option to position audio player at bottom of content pane. IMPROVED: Added the ability to select a range of items (dirs, fonts, or images only) by shift+click. IMPROVED: Reselect sidebar item when content focused if it is not selected. IMPROVED: Shuffle media play will now choose an item selected via the up/down arrow keys as the next item to play. OTHER: Updated and overhauled the help page.

VERSION 8.0.6 (2023-08-22)

IMPROVED: On autoload audio coverart, don't scroll sidebar item into view.
FIXED: Several issues with fetching and refreshing media durations, especially when opening multiple subdirectories.

VERSION 8.0.5 (2023-08-12)

FIXED: Some issues with arrow key navigation in font and image grids.
FIXED: Clicking the checkbox next to the "Name" sorting item didn't toggle all media checkboxes.
FIXED: An audio file loaded into the audio player from an opened subdirectory was not reselected after closing and opening the subdir.
FIXED: Some issues with shuffle media play. FIXED: An issue with hovering and simultaneously using the arrow keys to navigate the main menu.
FIXED: Various issues that caused inaccurate media durations to be reported in the stats.
FIXED: Various issues with the text file editor.
FIXED: Closing a playlist where the media durations had not fully loaded could produce duration errors in media files (if any) in the previously opened directory.
FIXED: Don"t reload currently playing video when arrow navigating from video to audio file and back to video.
FIXED: Other minor UI issues.
IMPROVED: Added an icon in the content title to allow quick toggling between text editing enabled/disabled modes.
IMPROVED: Allow toggling between raw and styled text views when text editing is disabled.
IMPROVED: Hide some text editing menu items when text editing is disabled.
OTHER: Some code cleanup.

VERSION 8.0.4: 2022-07-10

FIXED: Highlighting problem with items in previewed dirs.
CHANGED: Allow pointer events in quicklooked items.

VERSION 8.0.3: 2022-07-08

A few more bugfixes FIXED: Don't style list elements in previewed text and html files. FIXED: Disable quicklook feature in previewed text and html files. FIXED: Quicklooked text files should not display text editor UI.

VERSION 8.0.2

Quick fix: Removed "about:blank" from @match rules.

VERSION 8.0.1: 2022-06-25

Bugfixes FIXED: Closing a previewed font glyph would close the font itself.
FIXED: Quicklooked font files could not be closed.
FIXED: Quicklooked text files should not display text editor UI.
FIXED: Fonts in grid view could not be Quicklooked.
FIXED: An issue with font specimen glyph display.
FIXED: Scroll selected grid item into view after closing quicklooked grid item. FIXED: Text files would not display if text editing was disabled.
FIXED: An issue with grid navigation.
FIXED: Several issues with text editor split view display.
Other small UI fixes.

VERSION 8: 2023-06-18

MAJOR UPDATE with many additions, bugfixes, and potentially BREAKING CHANGES.

IMPORTANT: After updating to this version, select “User Settings > Reset User Settings” from the main script menu, *or** delete the query string from the URL on all open tabs that use this script.* If you have bookmarked any pages, you will have to do the same thing and replace the bookmark. This is necessary because the behavior of user settings has changed and some old query strings no longer work.

IMPROVED: Better handling of some remote server configurations.
IMPROVED: Better handling of very large directories, which may take a long time to process.

  • If the directory contains more than 5000 items, an alert will allow the user to cancel opening it.
  • If there are more than 1000 image files, thumbnail display will be automatically disabled; it can be manually enabled or the user can select a new menu item, “Always show image thumbnails” to override this behavior.
  • If there are more than 1000 media files, only the durations for the first 1000 items will requested.

ADDED: Pressing the “Escape” key or Cmd/Ctr + . will cancel content loading.
IMPROVED: Better handling of php-based directories (e.g., those containing “index.php?folder=xyzxyz” items).
IMPROVED: Some servers don’t correctly report media durations on initial page load; in such cases the script shows the duration as 0:00, and the file is marked disabled, even though the file is available on the server. Now you can refresh the duration individually by selecting such files, or globally (both in the sidebar and the content pane) via the main script menu > “Media Preferences > Refresh Media Durations.” Of course, if there really is a problem with the file or it is missing (e.g., from a playlist), the duration will not be updated and the file will still be disabled.
ADDED: “Quicklook”-like feature (as in MacOS) for previewed directories: with the content pane focused, press spacebar to show a preview of the selected item, press again to close. Works for directories, image grids, and font glyph grids. Use arrow keys to navigate as usual.
CHANGED: Rearranged main menu; removed “My Sample Bookmark Menu” and “Export Settings” items.
ADDED: Menu item to show image thumbnails for dir items (in small or larger sizes) from main menu.
ADDED: Menu item and shortcut to go to a sidebar item by its row number.
ADDED: Set custom UI font from new main menu item.
ADDED: Scale the UI (75%–125%) from new main menu item.
ADDED: Select multiple dir items, either by Cmd-click, Shift-Up/Down Arrow, or Cmd-A (to select all). This allows multiple subdirectories to be opened or closed with one keystroke (Cmd-Left/Right Arrow). Multiple images/fonts will be displayed in a grid view. Other file types will be ignored (at least for now).
ADDED: Font specimen previews: added ability to adjust font size, letter spacing, line height, text color, and text stroke (with browser support).
IMPROVED: Font preview layout.
IMPROVED: Font file glyph display and scaling.
IMPROVED: Audio cover art: if there is an image file with exactly the same name as the selected audio file in the directory, it will be loaded as cover art; otherwise, images files named “cover”, “front”, etc., will be used (previous behavior). This allows each audio file to have its own cover art.
IMPROVED: Audio cover art now loads only from the same directory as the selected audio item; useful when playing audio from subdirectories.
ADDED: Show count of remaining media items when shuffle playback is checked.
ADDED: Initial support for youtube links in m3u playlists
IMPROVED: Playlists now use the name defined in EXTM3U instead of creating one from the link
IMPROVED: Completed “Help” instructions on how to use the script.
IMPROVED: Better notification for “file not found” errors; this happens mainly when clicking links in html files or using playlists.
IMPROVED: Better handling of link files (.webloc/.url); now a clickable link is shown in content pane; (link files can still be opened from sidebar by double-clicking or cmd/ctr-arrowdown.)
IMPROVED: Video player display.
IMPROVED: Set default media volume to 50%.
IMPROVED: Help menu: added more information and trouble-shooting section.
ADDED: Display item description in remote directories (if provided by server).
ADDED: Select main menu items by typed string and arrow navigation
FIXED: Various issues with warnings not being shown when they should have been.
FIXED: Sorting header display for previewed directories containing media files.
FIXED: An issue with playing the next user-selected media item.
FIXED: Media durations in subdirectories were not always displayed correctly.
FIXED: Tab key navigation was not working in all cases.
FIXED: Navigation history was not properly stored in some circumstances (mainly when opening subdirectories).
FIXED: Long-standing problem with checkboxes in Firefox.
IMPROVED: Reopening a subdirectory will reselect the currently displayed content pane item, if it is contained in that subdirectory.
REMOVED: Option to set text editor theme independently from main UI theme as it added complexity without corresponding benefit.
OTHER: Many other small improvements and bugfixes.


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


DESCRIPTION

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 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 (see $settings in code; some settings can be changed via the main menu in the UI and will be remembered in URL query):
    • Light or Dark theme.
    • Bookmarks for local or remote directories.
    • Default image grid size.
    • 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 (MacOS and *nix only)
    • Show or hide invisible files.
    • Show or hide ignored files in the ignored files list (see $row_settings in code below $settings).
    • 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.

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.