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

clean-mla-gdoc

v1.2.4

Published

A lightweight JavaScript library to reformat Google Docs HTML exports into MLA Style layout with auto-pagination and Works Cited sorting.

Readme

clean-mla-gdoc v1.2.4

A lightweight JavaScript library specifically designed to reformat Google Docs HTML exports into the MLA (Modern Language Association) Style layout. It handles physical pagination, alphabetical sorting of Works Cited, and provides a "DRAFT" watermark feature.

[!IMPORTANT] Compatibility Note: This library is specifically tailored for the Report preset generated by Google Docs when before exporting as HTML.

Features

  • Dynamic Tab Title: Automatically renames the browser tab to [LastName] [FirstName] [AssignmentName].
  • Auto-Pagination: Breaks content into 8.5" x 11" pages with 1-inch margins.
  • MLA Header: Processes the 4-line header and title from Google Docs classes.
  • Smart Date Mapping: Converts numerical dates (e.g., 25/12/2026) to MLA format (25 Dec. 2026).
  • Works Cited Sorting: Automatically alphabetizes the "Works Cited" section.
  • Draft Mode: Trigger a "DRAFT" watermark by adding |d to your document header.
  • Highlighted Citations: hovering cursor over citations highlights them, and clicking them brings user to work cited.

How the Tab Title Works

The script automatically updates the browser tab title following a professional file-naming convention. It extracts the student's name from the first paragraph and the assignment title from the header. To maintain a professional look, the script strips the | draft flag from the tab title while retaining it for the watermark logic.

Final Format: [LastName] [FirstName] [AssignmentName]

Usage & Formatting Rules

Enabling Draft Mode

To enable the "DRAFT" watermark across all pages, include the string | draft (case-insensitive) in the document header.

  • Requirement: The |d flag must be placed after the assignment name.
  • Example: English Essay |d

Works Cited

Any content following an element containing the text "Works Cited" will be moved to its own page and sorted alphabetically based on the first word of each entry.

Installation

Include the minified script in your project. The library will automatically detect if jQuery is present; if not, it will load it along with other necessary assets from a CDN.

<!-- Include the library after the meta tag of your head tag -->
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/clean-mla-gdoc.min.js"></script>

Contributing

Contributions are welcome! If Google Docs updates its HTML export structure, please feel free to:

  1. Fork the repository.
  2. Update the selectors in the unminified clean-mla-gdoc.js.
  3. Submit a Pull Request with a description of the changes.

Dependencies

The library dynamically loads the following assets via jsDelivr if they are not already present in the environment:

License

This project is licensed under the GNU General Public License v3.0.
Full license text available at: https://www.gnu.org


Copyright (c) 2026 Musicalisk [email protected]