npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@crateredlabs/ytstab

v1.1.0

Published

Your Typical Scramjet Ad Blocker — a single-file ad/tracker blocker mod for Scramjet-based proxies.

Readme

YTSTAB

hellow :3, it me again, your favorite femboy dev with another (def) banger, now introducin YTSTAB or Your Typical Scramjet Ad Blocker, its just an ad blocker mod for Scramjet v1.1.0, we will add v2 version eventually when i have time not working with Lunar OS. its also on npm now btw, as @crateredlabs/ytstab. if you want anything added, tell me in the official Cratered Labs Discord Server.

Information

YTSTAB is a single-file Scramjet Ad Blocker Mod, thats it, it blocks 200+ domains, split into categories now so u can turn specific ones off/on instead of all or nothing.

YTSTAB's, STAB Process (yes im so clever)

  1. STAB fetches every request from the server SW usually gets
  2. Decodes the Scramjet URL into an actual URL it can reads
  3. Checks its hostname and sub-domain and matches it to a category in STAB's list
  4. If it matches AND that category is turned on, it gives the 204 Empty Response and never reaches the server
  5. if it doesn't match, or the category its in is turned off, it lets it though the wall and goes to the server and goes to your user

Setup

option A, copy the file

  1. Copy the file into your project, wherever your Scramjet service worker is served from.

  2. Match the prefix. Open the file and check the PREFIX constant near the top — it must match exactly the prefix you passed into your ScramjetController on the client side:

   const controller = new ScramjetController({ prefix: "/scramjet/service/" });
  1. Use the default codec. Make sure your ScramjetController isn't passing a custom codec option. This file decodes proxied URLs with plain decodeURIComponent, matching Scramjet's default — a custom codec will break the decoding.

  2. Register it the way you'd register any Scramjet service worker, at the same scope as your prefix:

   await navigator.serviceWorker.register("/scramjet.sw.js", { scope: "/scramjet/service/" });

option B, npm

npm install @crateredlabs/ytstab

it wont just work after installing tho, npm just dumps the file in node_modules, u still gotta copy it into ur public folder and do steps 2-4 above. check INSTRUCTIONS.md in the package if u forget how.

Runtime Controls

STAB can also be turned off and on, whole thing or just one category, all through postMessage. state also actually sticks now (saved in IndexedDB) so it wont randomly reset when the browser kills the service worker in the background

turning it all on/off:

const reg = await navigator.serviceWorker.getRegistration("/scramjet/service/");
reg.active.postMessage({ type: "YTSTAB_SET", enabled: true }); // put false to turn it off

turning off just one category:

reg.active.postMessage({ type: "YTSTAB_SET_CATEGORY", category: "ads", enabled: false });

asking for current state (good for loadin ur settings page correctly instead of guessin):

reg.active.postMessage({ type: "YTSTAB_GET_STATE" });

listening for state + blocked hits:

navigator.serviceWorker.addEventListener("message", (e) => {
  if (e.data?.type === "YTSTAB_STATE") {
    console.log("current state:", e.data.on, e.data.categories, e.data.categoryList);
  }
  if (e.data?.type === "YTSTAB_HIT") {
    console.log("blocked:", e.data.url, "category:", e.data.category);
  }
});

all of this is needed or YTSTAB will be ass for your users

Editing the STAB list

go to scramjet.sw.js (aka the single file) and find const CATEGORIES, its an array of category objects like this:

{
  id: "ads", label: "Ads",
  domains: [ "adzerk.com", "adroll.com", ... ],
}

just add/remove domains inside whichever category's domains array, or make a whole new category object if it doesnt fit existing ones. follow the format and it wont break.

Known Limitations

  1. STAB only blocks stuff going through your Scramjet proxy's prefix, it doesn't touch your site's own direct asset loads, thats on purpose, its not meant to be a full site-wide ad blocker, just a proxy one
  2. Right now STAB can't tell the difference between navigatin straight to a blocked domain vs a blocked subresource, so if u go directly to one you'll just get a blank page instead of somethin that actually tells you its blocked, contributions welcome here if anyone wants to fix that

Extra Info

If you want v2 beta version, idk dm me to do it or you merk me. :3 anyways, if you are using YTSTAB, thank you. We will never charge anything related to Lunar OS or YTSTAB

Plentfy, Femboy Dev and Owner of YTSTAB