lobste.rs ~~has~~had a js-error: here is a mitigation

Open in a window
Article lobste.rs

lobste.rs ~~has~~had a js-error: here is a mitigation

Introduction

https://lobste.rs โ€“ at the time of writing โ€“ has a javascript error on load for logged in users:

Uncaught ReferenceError: qS is not defined
    at new _LobstersFunction (user-c27ac03d.js:144:34)
    at user-c27ac03d.js:665:17

This error is causing much of the site functionality to not work, an easy way to check is to try and [preview] a comment, if that does not work โ€“ most likely you have an error in the js-console.

If you provide the missing definition for qS and qSA site functionality is restored in full-effect.

Known to fix:

  • story / comment upvotes
  • comment preview
  • $things_you_have_spammed_click_wondering_why_it_doesnt_work

Override using Dev Tools => Sources => Override

For those with webdev experience it is easy to fix the error yourself by simply patching the faulty script with the below:

 const qS = (a, b) => b === undefined ? document.querySelector(a) : a.querySelector(b);
 const qSA = (a,b) => b === undefined ? [...document.querySelectorAll(a)] : [...a.querySelectorAll(b)];

If the above is ran before the faulty line (665 in this case), all is well and things start working again.


Use an extension such as TamperMonkey

An easier alternative is to use TamperMonkey to automatically run custom javascript for the site, below is what I use:

// ==UserScript==
// @name         lobste.rs undefined qS/qSA fix
// @namespace    http://tampermonkey.net/
// @version      2026-07-27
// @description  try to take over the world!
// @author       You
// @match        https://lobste.rs/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=lobste.rs
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
     window.qS = (a, b) => b === undefined ? document.querySelector(a) : a.querySelector(b);
     window.qSA = (a,b) => b === undefined ? [...document.querySelectorAll(a)] : [...a.querySelectorAll(b)];
})();

end-of-transmission

Personally I used the override approach after discovering this, but I assume there are more than me who want to use our beloved features while waiting for a redeploy of lobste.rs

(\_/)_00_(\_/)
      ^- me previewing my own comments like crazy with the mitigation

Happy browsing!

Discussion 19 comments · 21 points · refp · 2026-07-27
Open on Lobsters
Loading the discussion…

Domain filters

Stories from these domains are hidden from every list. Subdomains match too: blocking substack.com also hides danluu.substack.com. The list is kept in this browser only.

Help

Keyboard

j / k
Move down and up the story list. The arrow keys scroll whatever has focus.
Enter
Open the marked story in a window.
]
Open the next story in the list in place of the one in front. Back returns to it.
p
Pin or unpin the marked story, which keeps it in Pinned.
n / N
Move to the next or previous top-level comment in the window in front.
c
Collapse or expand that comment.
f
Hide or show the story list.
Esc
Close a menu or this help.
Access key m
Go to the menu bar. Most browsers take it with Alt on Windows and Linux, and Safari with Control and Option.
?
Show this help.

Windows

Each story opens in a window holding its article above its discussion; drag the bar between them to share the room differently. A window can be moved by its title bar, resized from any edge, snapped to a half or a corner by dragging it there, maximised, or minimised to the bar at the foot of the page. Open several stories to compare them, and switch between them from that bar. A window's Next story link reads on down the list in the same window.

A link in a comment or an article to another Hacker News or Lobsters thread opens that thread in a window too. A link to a single HN comment opens the comment above its replies.

While a story's window is in front, the Story and Discussion menus in the menu bar hold its commands: pinning, Next story, sorting, collapsing every thread, jumping to the first new comment. Each window also remembers where you were in its article and discussion, so a reload, or Back to a story that Next took you past, finds your place again. Closing a window forgets it.

The whole arrangement lives in the address, so a bookmark or a shared link brings it back, and Back undoes the last change. Moving between Hacker News, Lobsters, their lists, Pinned and Find changes only the list, and leaves the windows open.

The list

The pin at the start of a row keeps the story in Pinned, and the cross at its end hides it. Scroll past the end of the list to load more. Domain filters, in the View menu, hide every story from a site.

Find

Find takes any link and lists every time it was submitted to Hacker News and Lobsters, so you can read each discussion of it.

About

YAVCHN never sees your Hacker News or Lobsters login. The discussion is fetched from each site's public API; to vote or reply, follow the link above the discussion, or the arrow beside a comment, to the source's own site. Pins, hidden stories, filters and layout are kept in this browser only.

Open source: github.com/paulmooreparks/yavchn. Built with PUDL.