您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Makes file:/// directory ("Index of...") pages (and many server-generated index pages) actually useful. Adds sidebar and preview pane; keyboard navigation and sorting; media playback with shuffle, loop, and playlist (m3u) support; preview, edit, and save markdown/plain text files; preview images and fonts; grid views for images and fonts; user-defined bookmarks; more.
当前为
If you like this script, please consider making a donation or sending me a comment to let me know what you think. Thanks!
CHANGELOG:
VERSION 5.0.0 Lotsa stuff... Finally! Please report any issues.
MAJOR INTERNAL CHANGES:
- Converted most <table>
HTML elements in the UI to flex box <divs>
, because it's 2020....
- Converted many "if ... else" conditional statements to "switch" statements for clarity and efficiency.
- Converted css to selector-based system and pruned many unneeded styles. More work to be done....
IMPROVED: Significantly improved performance of initial directory processing; this is especially noticable for directories with many items.
PREVIEWED DIRECTORIES: ADDED: Keyboard navigation for previewed directories. - Use Tab to toggle focus between sidebar and content pane (for images, fonts, grids, html and text files, and the text editor). - Use Escape to focus sidebar from content pane. - Use arrow keys to navigate items as in sidebar. - Use Cmd/Ctrl + ArrowUp to go to parent directory in content pane. - Previewed directories honor "show invisibles" and "ignore ignored files" pref.
ADDED: Double-click or (Cmd/Ctr + Return) items in previewed directories to open them.
ADDED: Continuous audio playback from previewed directories.
ADDED: Dark theme for directory preview.
ADDED: "Open in Content Pane" and "View Directory Source" links in sidebar footer. - "Open in Content Pane" will show the current directory in the content pane. - (This is useful in situations were the currently previewed directory contains only files and you want to navigate directories in the content pane.)
IMPROVED: Directory list now uses custom file icons for media files, because otherwise it's difficult to tell audio and video files apart.
HTML CONTENT:
FIXED: Clicking links in previewed html files didn't do anything. Now internal #links or same-origin links will open in the content pane; links to external sites will load in a new tab/window.
PLAYLISTS:
ADDED: Custom support for filelists: m3u files with links to directories and any kind of file supported by the script and browser.
ADDED: "Make Playlist" menu item. Download a basic (no timings) .m3u playlist of the media files in the current directory. - "Make Playlist" menu item has options for all files and directories, all non-media files, files only, and directories only. - You can also click the content pane title to show an m3u playlist entry for the selected file.
ADDED: Click audio player title to show an m3u playlist entry for the current media file.
IMPROVED: Added warning when opening a playlist with local files from a non-local page. - Playlist will open, but local files will be disabled.
TEXT EDITING:
ADDED: New user pref to use light or dark theme for text editor instead of main UI theme. - Text editor theme can be toggled with new button in text editor toolbar.
ADDED: Keyboard shortcut to toggle text editor split view: Cmd/Ctrl + \ .
IMPROVED: Text editor now remembers insertion/caret position or selection range (until page is reloaded or URL changes). - Position and range are remembered even if you close the text editor and view other content in the current directory, or if you navigate to another directory from within the preview pane.
IMPROVED: Better handling of unicode text.
KEYBOARD SHORTCUTS:
CHANGED: - Cmd|Ctrl + E: Toggle main menu. - Cmd|Ctrl + Shift + E: Show text editor.
ADDED: Cmd|Ctrl + \ : toggle sidebar.
IMPROVED: Escape now also closes menus.
IMPROVED: Allow normal Cmd|Ctrl + +/– behavior if no scalable content (images, grids, etc.) is visible; allows scaling of browser window contents.
UI:
FIXED & IMPROVED: Many style improvements and fixes. - Increased UI contrast overall. - Improved UI icon visibility. - File icons weren't visible in the preview titlebar in some circumstances.
ADDED: Keyboard navigation for the main menu. - Use Up/Down Arrows to select items, Left/Right Arrows to open submenus. - Return/Enter: Choose selected item.
ADDED: Toggle "Ignore ignored files" menu item.
ADDED: Basic Help menu item (shows keyboard shortcuts, etc.)
ADDED: More tooltips for various UI elements.
IMPROVED: Completely overhauled warnings html and styles.
IMPROVED: Added more info to stats in sidebar footer: - On hover, show total number of each kind of file or dir, and how many are hidden. - Live updates when show/hide invisibles or show/hide ignored files settings are changed. - Stats update when playlist is loaded.
IMPROVED: Tab key behavior; tab now also toggles focus of previewed images, font specimen text, and text editor, as well as html and .txt/.md files.
ADDED: Allow arrow keys to scroll scaled/zoomed images when focused.
FIXED: Allow sidebar arrow navigation when sidebar is hidden.
FIXED: Toggle media checkbox wasn't working.
FIXED: An issue with ?s in file names.
FIXED: Cmd|Ctrl + W now closes tab/window if no content is being previewed.
FIXED: Arrow navigation for sidebar and previewed directories sometimes used default arrow behavior, preventing proper scroll into view behavior.
IMPROVED: Workaround for Chrome bug with scroll into view multiple elements simultaneously (e.g., scrolling selected sidebar and grid items); scrolling is "instant" instead of "smooth."
CHANGED: "Ignore ignored files" pref behavior. - If "true", ignored files will be hidden. If "false", ignored files will be shown, but will not be downloaded when clicked or navigated to.
FIXED: Unchecked media files would be selected and played in some circumstances.
IMPROVED: Warn before closing previewed font files and playlists.
IMPROVED: Reloading previously-selected directory when navigating to parent folder now uses row id and so is not affected is the sort is changed.
IMPROVED: Directory list now remembers sort direction.
IMPROVED: HTTP error pages now load in the content pane and with original formatting.
OTHER:
FIXED: PDFs now load correctly if a pdf has already been loaded. Various fixes for Firefox. Choosing "Default User Settings" now does not remove history from query string. Removed m3u from "Text" file types. Many, many other fixes and improvements.
KNOWN ISSUES:
Chrome: Smooth scroll (for scrollIntoView() ) seems to be broken in the latest releases.
Firefox: Clicking media checkboxes (to toggle selection) causes page reload.
Firefox: Tabbing into previewed directories in content pane doesn't work; click in content pane instead in order to use arrow navigation.
ABOUT 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 INCLUDE:
${toc}
) ( https://github.com/nagaozen/markdown-it-toc-done-right )\[ ], [x]
), allowed in lists and deflists.^sup^
) ( https://github.com/markdown-it/markdown-it-sup )~sub~
) ( https://github.com/markdown-it/markdown-it-sub )->centered<-
) ( https://github.com/jay-hodgson/markdown-it-center-text )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 High Sierra. 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. No attempt has been made to support older browsers.
KEYBINDINGS (These don't work in all browsers):
PREVIOUS CHANGES
VERSION 4.1.2 FIXED, CHANGED, & IMPROVED: Image, font, and font glyph grids.
FIXED and IMPROVED: Playlists.
IMPROVED: Currently selected sidebar item will now scroll into view after various events, like sorting change, showing/hiding details, resizing sidebar, etc. FIXED: Several menu items weren't working: Default User Settings, Export User settings, Contact, and Donate (that might explain a few things...). FIXED: Document title didn't include entire path. Many other small bug fixes and style tweaks, including some specifically for Firefox and Safari.
VERSION 4.1.1 A few fixes and style tweaks.
VERSION 4.1.0 NEW: Basic support for media playlists (.m3u and .m3u8).
NEW: Open local fonts directly and view font information and complete glyph repertoire. (The previous ability to browse fonts in the directory list is unchanged.)
VERSION 4.0.6.1 FIXED: Really updated markdown-it and plugins.
VERSION 4.0.6
FIXED: An issue with video display.
FIXED: Several styling issues in Firefox, including textarea
in text editor not expanding to full window height.
FIXED: An issue with some servers that add a trailing '/' to the query string.
IMPROVED: Updated markdown-it to v9.0.1; also updated some markdown-it plugins.
NEWS: Version 4.1, with a new feature of interest to designers, is in development.
VERSION 4.0.5b IMPROVED: Clicking "Parent Directory" link in previewed directories now remembers sorting and numbering prefs. FIXED: Hopefully fixed close content behavior. FIXED: Several bugs with sorting items by size. FIXED: Various minor styling issues and tweaks. Known issue: PDFs don't always display when selected; this seems to be an issue with Chrome. I will attempt to address this in future updates.
VERSION 4.0.4b Wrapping things up.... FIXED: Left/Right arrow key navigation failed for video files FIXED: Content preview title wasn't being set for autoloaded images. FIXED: An issue with autoloading media and cover art when the first media file was a video. FIXED: Various issues with parsing local directory indexes in Firefox. FIXED: Various issues with parsing, calculating, and displaying file size and date-modified information. IMPROVED: Attempted to make index-type detection and index prep more generic, so that the script will work with more sites "out of the box." IMPROVED: Made index prep much more efficient, especially for table-type index pages and directories with many items. IMPROVED: Better error handling for directories with percent-encoded characters in file names. IMPROVED: Changed order of sorting headers to better align with sort data in list. OTHER: More minor styling issues and improvements. Please report any bugs or feature requests to mshroud AT gmail.com. And consider buying me a coffee if you find the script useful. Thanks!
VERSION 4.0.3b ADDED: Preview current directory index source: click the double-caret icon in the sidebar stats footer to toggle preview. This is useful for server configurations that include information in addition to the index itself and is quicker than opening a separate "View source" tab. FIXED: An issue with content display caused by the fix for pdf display in the previous version. FIXED: Up directory navigation didn't correctly account for invisible files and directories when selecting previously selected directory. FIXED: More issues with prepping "pre"-type index pages. FIXED: Some issues with Error page display. FIXED: Various minor styling issues. CHANGED: Moved "Disable Text Editing" menu item to top level. Many other small improvements and tweaks.
VERSION 4.0.2b FIXED: Pdf display (I hope).
VERSION 4.0.1b
FIXED: Audio files weren't being loaded.
FIXED: Script would fail if a file name included a special regex character [\^$.|?*+()
.
FIXED: Various issues with parsing "pre"-type index pages.
IMPROVED: Sorting and display of items with names beginning with white spaces.
IMPROVED: More efficient and robust index type detection.
ADDED: Sorting for previewed directory contents. Initial sorting is the same as the parent's current sort pref.
ADDED: Custom icons and numbering for previewed directory contents; numbering reflects the parent's current numbering pref.
NOTE: There is an issue with Chrome browsers and pdf file display, so pdfs don't display reliably.
NOTE: Some further fixes and styles tweaks coming.
VERSION 4.0.0b: Numerous additions, improvements, and massive internal changes. Virtually no line of code has been left untouched. "b" === "bugs" likely; updates will be forthcoming. IMPORTANT: This version uses a new format for user settings in the code; you will have to re-enter your defaults manually after updating. - Do NOT use exported settings from any earlier version of the script. NEW: Added independent text editor pane.
postMessage
to communicate between iframe and parent.
IMPROVED: Content display: use the same code to prep and style directory contents in the preview pane.
IMPROVED: Live sorting of grid items (but images and fonts are still sorted separately).
IMPROVED: Image zoom positioned accurately under click.
IMPROVED: Better handling of 404 Errors (Page not found): server error message will appear in sidebar, warning icon in content pane.
IMPROVED: File URLs: If a file URL (instead of a directory) is entered directly in the browser URL bar, the parent directory will be loaded instead and the file automatically selected.
IMPROVED: Navigation: modifed highlighting styles to show when a non-audio item is selected for navigation vs. when it is loaded in preview pane but not selected (e.g. click a directory and then click an audio file; the directory item will be dimmed).
IMPROVED: Audio: Greatly simplified shuffle play code and fixed several bugs; shuffle list now correctly updates when individual audio tracks are checked or unchecked.
CHANGED: Moved scale buttons and prev/next image buttons to preview title bar.
CHANGED: Sort by "Name" always sorts files and directories together; "Default" sort always keeps files and directories separate.
FIXED: Text editing: Some issues with split-pane resizing.
FIXED: Cmd/Ctr+W (close) should work now: previewed content will be closed first, then audio, then the browser tab itself.
FIXED: Don't autoload audio cover art when next audio track begins; i.e., leave open whatever file is being previewed, including cover art or lyrics.
FIXED: An issue with sorting by size.
FIXED: An issue with the user UI font setting.
FIXED: Navigation by typed string now correctly scrolls directory list.
OTHER: Many small style fixes and tweaks. Among others, make the previewed image and image grid background color light in default theme.
INTERNAL: Complete code overhaul.STILL TO COME:
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址