# Lobsters Latest Comments

A bookmarklet that adds a "Latest" tab to Lobste.rs comment threads, showing all comments in a flat chronological view with newest first.

Features:

- Default tab: Original threaded/nested comment view
- Latest tab: Flat view sorted by time (newest first, oldest at bottom)
- Reply links: Each reply shows "reply to @username" linking to the parent comment
- Time link navigation: Clicking a comment's timestamp in Latest view switches back to Default and scrolls to that comment in the tree
- Copy Thread: Export the entire comment thread as numbered plain text to the clipboard

## Install the Bookmarklet

Drag this button to your bookmarks bar:

Lobsters Latest

## Installation Instructions

### Chrome / Firefox / Desktop Safari

1. Make sure your bookmarks bar is visible
   - Chrome: Press `Cmd+Shift+B` (Mac) or `Ctrl+Shift+B` (Windows)
   - Firefox: Press `Cmd+B` (Mac) or `Ctrl+B` (Windows)
   - Safari: View → Show Favorites Bar
2. Drag the red "Lobsters Latest" button above to your bookmarks bar
3. Navigate to any Lobste.rs comment thread
4. Click the bookmarklet to activate

### Mobile Safari (iPhone/iPad)

1. Copy the bookmarklet code using the button below:

2. Create a new bookmark:
   - Go to any webpage and tap the Share button
   - Tap "Add Bookmark"
   - Name it "Lobsters Latest" and save
3. Edit the bookmark:
   - Open your Bookmarks (tap the book icon)
   - Tap "Edit" at the bottom
   - Find and tap "Lobsters Latest"
   - Delete the URL and paste the copied code
   - Tap "Done"
4. To use: Navigate to a Lobste.rs thread, tap the bookmarks icon, and select "Lobsters Latest"

Note: This bookmarklet only works on Lobste.rs comment thread pages (URLs like `lobste.rs/s/...`). It won't do anything on the homepage or other pages.

## How It Works

The bookmarklet:

1. Extracts all comments from the page, including their timestamps and parent-child relationships
2. Adds two tabs below the comment count header
3. When "Latest" is selected, displays comments in a flat list sorted by newest first
4. Adds "reply to @username" links for comments that are replies
5. Clicking the timestamp link (e.g., "14 hours ago") switches back to Default view and scrolls to that comment in the tree, with a brief yellow highlight
6. The "Copy Thread" button exports the entire comment tree as numbered plain text (e.g., `[1.2.3] author: text`) and copies it to the clipboard

## Source Code

The readable, unminified source code:

Click to expand source code

    Loading...