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

blogr-plugins

v0.0.4

Published

Typed, modular Blogr plugin kit — sticky sidebar, menu, lazy-load, TOC, text-replace and cookie utils. Works standalone or as jQuery plugins.

Readme

blogr-plugins

Typed, modular plugin kit for Blogr templates — sticky sidebar, dropdown menu, lazy-loading media, table of contents, text replace, shortcodes, a cookie utility, and Blogger image-URL resizing. Modern TypeScript rewrite of the old jQuery-only plugins, usable as plain ES modules or as classic jQuery plugins.

  • Zero dependencies at runtime
  • Tree-shakeable — each plugin is its own module
  • Ships ESM, CJS, and IIFE (with minified builds of each)
  • Full TypeScript types + JSDoc
  • Works standalone (vanilla JS) or bridges into jQuery automatically

Install

npm install blogr-plugins

Quick start

As a modern SDK (ESM/TS)

import {
  stickify, menuify, lazify, tocify, replacify, shortcodify, stackify, avatarify, relatify, cookify,
} from "blogr-plugins";

stickify("#sidebar", { additionalMarginTop: 20 });
menuify("#menu");
lazify("img[data-src]");
tocify("#toc", { content: "#article", headings: "h2,h3" });
replacify("#intro", /Blogr/g, "Blogr™");
shortcodify("#post-body", {
  tags: { b: (_attrs, content) => `<strong>${content}</strong>` },
  allowHtml: true,
});
stackify("#testimonials", { offset: 20, interval: 4000 });
avatarify({
  container: "#comments",
  usernameSelector: ".cmHr .n bdi",
  commentSelector: ".c",
  avatarSelector: ".cmAv .im",
});
relatify("article", { labels }); // labels from the <b:loop> snippet below
marqify(".cards", { direction: "left", speed: "fast" });
cookify.set("theme", "dark", { expiresDays: 30 });

Via <script> tag (IIFE)

<script src="https://unpkg.com/blogr-plugins/dist/blogr-plugins.min.js"></script>
<script>
	const { stickify, menuify } = BlogrPlugins;
	stickify("#sidebar");
	menuify("#menu");
</script>

Single plugin from a CDN (no full bundle)

Don't need all twelve. Each plugin also ships as its own standalone IIFE file — pull just that one from unpkg/jsdelivr/cdnjs:

<script src="https://unpkg.com/blogr-plugins/dist/stickify.min.js"></script>
<script>
	BlogrPlugins.stickify("#sidebar", { additionalMarginTop: 20 });
</script>

Files: stickify.js, menuify.js, lazify.js, tocify.js, replacify.js, shortcodify.js, stackify.js, avatarify.js, relatify.js, cookify.js, resizeImage.js, createWidget.js (each with a .min.js twin). Every one still writes onto BlogrPlugins, merging in rather than overwriting — so you can load two or three of these side by side and they all land on the same global:

<script src=".../stickify.min.js"></script>
<script src=".../menuify.min.js"></script>
<script>
	BlogrPlugins.stickify("#sidebar");
	BlogrPlugins.menuify("#menu");
</script>

Same jQuery auto-bridge applies per file too — load lazify.min.js alone and you get $.fn.lazify with none of the other plugins attached.

If jQuery is already loaded on the page, the IIFE build automatically registers $.fn.stickify, $.fn.menuify, $.fn.lazify, $.fn.tocify, $.fn.replacify, $.fn.shortcodify, $.fn.stackify and $.fn.relatify — no extra setup:

<script src="https://code.jquery.com/jquery-3.7.1.min.js"></script>
<script src="https://unpkg.com/blogr-plugins/dist/blogr-plugins.min.js"></script>
<script>
	$("#sidebar").stickify({ additionalMarginTop: 20 });
	$("#menu").menuify();
	$("img[data-src]").lazify();
	$("#post-body").shortcodify({
		tags: { b: (_attrs, content) => `<strong>${content}</strong>` },
	});
	$("#testimonials").stackify({ offset: 20, interval: 4000 });
	$("article").relatify({ labels });
	$(".cards").marqify({ speed: "fast" });
</script>

Every function accepts a CSS selector, a single Element, an array/NodeList of elements, or a jQuery collection — pick whichever fits your codebase.

Plugins

Each plugin has its own doc page with the full option reference and examples:

| Plugin | Description | |---|---| | avatarify | Auto-generates DiceBear avatars for commenters without a photo. | | cookify | Small, dependency-free cookie utility (a typed replacement for the classic js-cookie plugin). | | createWidget | Blogger listing widget — related/recent/random posts, comments, pages. | | lazify | Lazy-loads media with IntersectionObserver once it scrolls near the viewport | | marqify | Turns a container's children into an infinite scrolling marquee. | | menuify | Turns a flat <ul><li><a> link list into a nested dropdown. | | readMeter | Estimates reading time and renders it as a badge. | | relatify | Fetches related posts by label and inserts links within the article. | | replacify | Find-and-replace inside text nodes only — never touches tags or attributes. | | resizeImage | Resize Blogger/Google-hosted image URLs. | | shortcodify | A full shortcode/templating engine for [tag attr="value"]content[/tag] syntax. | | stackify | Turns a container's children into a peeking card stack. | | stickify | Sticks a sidebar to the viewport while scrolling, clamped to its container. | | tocify | Builds a nested table-of-contents list from the headings inside a container. |

stickify, menuify, lazify, tocify, replacify, shortcodify, stackify, and cookify are also part of this package (see the Quick start examples above) but don't yet have a dedicated doc page here.

Cleaning up

stickify, menuify, lazify, tocify, replacify, shortcodify, stackify, relatify, and marqify all return a { destroy(): void } instance (stackify's adds next()/prev()/goTo()/play()/pause()/getActiveIndex() too) so you can unbind listeners and revert any DOM changes, e.g. before a client-side route change:

const menu = menuify("#menu");
// later
menu.destroy();

License

MIT