• exec/webfileindex.ssjs

    From Rob Swindell@VERT to Git commit to main/sbbs/master on Thu Mar 31 19:05:38 2022
    https://gitlab.synchro.net/main/sbbs/-/commit/be0a37c8769539c78534414e
    Added Files:
    exec/webfileindex.ssjs
    Log Message:
    My initial/simple/ugly dynamic web file index generator

    Configured in sbbs.ini [web] by setting:

    FileVpathPrefix = /files/
    FileIndexScript = webfileindex.ssjs

    And optionally (if you want your vhosts to get filebase access):

    FileVPathForVHosts = true

    You can use an .xjs file if you prefer.

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Sun Apr 3 19:19:54 2022
    https://gitlab.synchro.net/main/sbbs/-/commit/61e6f5d3c6c6a560ef52eac1
    Modified Files:
    exec/webfileindex.ssjs
    Log Message:
    Change sorting_description from const to var

    Since this script can be reloaded in the same scope.

    Fixes issue #387.

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Fri Jun 24 12:49:03 2022
    https://gitlab.synchro.net/main/sbbs/-/commit/187f8f8aaed7a52fdcf2f3ec
    Modified Files:
    exec/webfileindex.ssjs
    Log Message:
    Respond with redir when directory requests are received without trailing slash

    HTTP Directory requests without a trailing slash would "work" (the directory listing would be sent), but the links to files, since they're relative to the current request location, would be incorrect (missing the directory's virtual subdir). So send a 301 response if a client requets a directory without a trailing slash.

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Sat Jun 25 17:19:55 2022
    https://gitlab.synchro.net/main/sbbs/-/commit/2bb0ca81c53691275810605f
    Modified Files:
    exec/webfileindex.ssjs
    Log Message:
    Do the redir thing for all requests not ending in /, not just dirs

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From echicken@VERT to Git commit to main/sbbs/master on Tue Dec 19 21:16:33 2023
    https://gitlab.synchro.net/main/sbbs/-/commit/22e2668c910966d08041a227
    Modified Files:
    exec/webfileindex.ssjs
    Log Message:
    Style updates and HyperText Mark-Up Language doodads.

    Put th row inside a thead as is proper.
    Put td rows inside a tbody as is proper.
    Close td elements even if not strictly necessary. Good form.
    Use a subjectively nicer font.
    Use a subjectively more readable date format.
    Put some space and border between table elements.
    Stripe rows for better visual indicator of separate data.
    Make the header row sticky so we always know which column's what.
    Add dark mode colors if browser prefers-color-scheme dark.

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From echicken@VERT to Git commit to main/sbbs/master on Tue Dec 19 21:29:05 2023
    https://gitlab.synchro.net/main/sbbs/-/commit/5445c5db9a7ed0637d9b7ec3
    Modified Files:
    exec/webfileindex.ssjs
    Log Message:
    Don't bold date, abbreviate month

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From echicken@VERT to Git commit to main/sbbs/master on Tue Dec 19 21:35:36 2023
    https://gitlab.synchro.net/main/sbbs/-/commit/0036760824a80574ebfb937b
    Modified Files:
    exec/webfileindex.ssjs
    Log Message:
    Dark mode links should pop out a bit more.

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From echicken@VERT to Git commit to main/sbbs/master on Tue Dec 19 22:38:43 2023
    https://gitlab.synchro.net/main/sbbs/-/commit/a47ce702daae16e8e22786e0
    Modified Files:
    exec/webfileindex.ssjs
    Log Message:
    Top-align cell contents; cursor: pointer on description hover; show extended description if any on description click.

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From echicken@VERT to Git commit to main/sbbs/master on Tue Dec 19 23:01:12 2023
    https://gitlab.synchro.net/main/sbbs/-/commit/e0ec9ae216b6c6b0ebba67b4
    Modified Files:
    exec/webfileindex.ssjs
    Log Message:
    Fix whoopsiedoodle in last committeroo

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From echicken@VERT to Git commit to main/sbbs/master on Tue Dec 19 23:05:32 2023
    https://gitlab.synchro.net/main/sbbs/-/commit/4c93d71c5896a47b4b8ecd98
    Modified Files:
    exec/webfileindex.ssjs
    Log Message:
    Only change cursor if desc td has div child; exit desc click handler if no extdesc div; only add div child to desc td if extdesc present;

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From echicken@VERT to Git commit to main/sbbs/master on Tue Dec 19 23:16:49 2023
    https://gitlab.synchro.net/main/sbbs/-/commit/3af564a2a2120477033a3574
    Modified Files:
    exec/webfileindex.ssjs
    Log Message:
    get extended detail when reading file meta list

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From echicken@VERT to Git commit to main/sbbs/master on Wed Dec 20 06:20:12 2023
    https://gitlab.synchro.net/main/sbbs/-/commit/1cc8d294625958505d866880
    Modified Files:
    exec/webfileindex.ssjs
    Log Message:
    02:23:11 <DigitalMan> maybe a button/link to expand/collapse all the extended comments? Would make text searching easier

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Wed Dec 20 17:09:58 2023
    https://gitlab.synchro.net/main/sbbs/-/commit/22f1c81eeea8d6d126f46ae3
    Modified Files:
    exec/webfileindex.ssjs
    Log Message:
    Strip Ctrl-A codes from extended file descriptions

    I'm doing this manually with String.replace() because the "built-in" strip_ctrl_a() function doesn't expand ^A/ (conditional line-break) as it
    would need to.

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Wed Apr 3 22:53:00 2024
    https://gitlab.synchro.net/main/sbbs/-/commit/8a062f598a8e7ed9545ccde4
    Modified Files:
    exec/webfileindex.ssjs
    Log Message:
    When file size is less than 1 byte in length, don't list

    0-byte or non-existent files can't be http-downloaded anyway

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Thu Dec 5 17:00:15 2024
    https://gitlab.synchro.net/main/sbbs/-/commit/37126d82ef319ffc51fb393b
    Modified Files:
    exec/webfileindex.ssjs
    Log Message:
    Display directory aliases from web_alias.ini as shortcuts on index page

    Other kinds of aliases are supported in web_alias.ini (e.g. libraries, files) but not displaying those here (yet).

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Wed Jan 22 23:19:39 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/50d04b24aae59ae24d57d1bf
    Modified Files:
    exec/webfileindex.ssjs
    Log Message:
    Add support for viewing file (images and archive) contents

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Wed Jan 22 23:58:33 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/6d41d290d62dc14fbf6dad09
    Modified Files:
    exec/webfileindex.ssjs
    Log Message:
    Filter out the non-viewable files for the next/prev file buttons

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Thu Jan 23 01:59:25 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/9e039b2006a57b0d8b8ca4cd
    Modified Files:
    exec/webfileindex.ssjs
    Log Message:
    Display file SHA1 (if has one) and date/time in div title (hover text)

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Thu Jan 23 02:54:19 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/f0ca1a1846408f01345d0f0d
    Modified Files:
    exec/webfileindex.ssjs
    Log Message:
    Minor beautification

    Indenting lib and dir lists use the ul tag, I'm sure this isn't technically the most correct way to do this, but its providing the cosmetic result I want.

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Thu Jan 23 23:32:17 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/65f79e9c747589dc1a4ab53e
    Modified Files:
    exec/webfileindex.ssjs
    Log Message:
    Cosmetic improvements using Unicode characters as icons

    (file cabinets, folders)

    Bold the directory/library names and other markup improvements.

    Expand viewable types to more readable archive types supported by libarchive (many more than the list in Archive.supported_formats).

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Wed Feb 5 18:44:18 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/c830577e0aab9ef087aedce7
    Modified Files:
    exec/webfileindex.ssjs
    Log Message:
    Handle files where the 'added' property is 0 or undefined

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Thu Feb 20 20:29:35 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/936351241814cec19ee5e95a
    Modified Files:
    exec/webfileindex.ssjs
    Log Message:
    Fix links to filenames with spaces

    View images in a smaller viewport (I'm no CSS expert here, obviously)

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net