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 🙏

© 2024 – Pkg Stats / Ryan Hefner

firefoxbookmarktagtransform

v1.0.2

Published

Command line application to take all the values from TAGS attributes and place them into the tags content (and so the bookmark title), in a way useful to the user.

Downloads

4

Readme

A command-line application JavaScript Node application to convert a Firefox HTML file (these can be exported), so that the 'TAGS' are removed from the anchor HTML tags, then places within the anchor link text instead (i.e. in the bookmark title). This conversion will output to: TRANSFORMED_<your file> in the same directory as your input file

For example, instances such as:

<A HREF="http://www.example.com" TAGS="one,two,three four five">Example</A>

become:

<A HREF="http://www.example.com">Example | #one #two #three four five</A>

Within the output file.

Running

Designed to be run with npx (Node/npm must be installed).

Give one argument, being the (path and) filename.

npx firefoxbookmarktagtransform bookmarks.html

Use case

NOTE: below is the most frictionless way of using these converted bookmarks in Firefox across all your devices, but it doesn't take into account things like passwords and tabs and only takes into account the bookmarks you sync. It will wipe everything clean locally and on your Mozilla sync, and start over.

  1. Export your bookmarks as HTML
  2. Run this file through the command line application
  3. Uninstall Firefox on your devices
  4. Delete your Mozilla sync account
  5. Create another Mozilla sync account (you can use the same email)
  6. Install Firefox again across your devices
  7. Import the new HTML file into Firefox
  8. You may want to re-organize the bookmarks based on how they were imported. As of the time of this writing, the imported bookmarks are placed in "Bookmarks Menu" folder.

So move ( cut and paste) all the bookmarks:

Bookmarks Menu/Bookmarks Menu -> /Bookmarks Menu Bookmarks Menu/Bookmarks Toolbar -> /Bookmarks Toolbar Bookmarks Menu/Other Bookmarks -> /Other Bookmarks

Then make sure never to use "tags" when you bookmark, and you will be able to find your bookmarks in the same way no matter which device you are using.

Background information

While Firefox tags is an excellent feature, however this functionality has long been retired in the mobile version (i.e. Android and iOS). This can be an issue for instance, if say you rely on tags for finding bookmarks, and then when on your "mobile" version of Firefox, you will not be able to find it since it does not use tags. As such there is no perfect sync between Android versions (using the in-built Mozilla sync) regarding bookmarks, unless you refuse to use tags.

By putting our "tags" within the link descriptions you can essentially achieve the same functionality across mobile and desktop, and find your bookmarks easily whatever platform you are using.

It should be noted also that then these bookmarks can then be imported into Chromium based (e.g. Chrome, Edge, Brave, Vivaldi.etc) and other browsers, without losing information in terms of searchability. However, Chromium based browsers with sync cannot achieve the same 1:1 bookmark matching from desktop to mobile, as Firefox (based browsers) and Mozilla sync can when using the "don't use tags" approach. To my knowledge however, Vivaldi is an exception because it has its own unique syncing system and would be a viable alternative to Firefox for good bookmark syncing if that is your preference.

As an aside, the author prefers not to use "Mobile Bookmarks" in Firefox, by choosing a different folder within mobile Firefox and never saving into the "Mobile Bookmarks". Also deleting the "Mobile Bookmarks" folder within Firefox desktop, making sure everything is synced, will essentially remove the "Mobile Bookmarks" folder thereby creating a better 1:1 bookmark sync with Firefox mobile and desktop.

This approach will also work for the various Firefox forks such as Floorp, LibreWolf, Waterfox, Mercury .etc,