Building a Firefox Browser Extension - Part One
Background
Transforming my Programming Log into this website has proven to be quite an undertaking, and I’ve thoroughly enjoyed it. The log consists of five giant markdown files, one for each year; it was a journal for all my technology projects and learning over the years. The trouble is it isn’t very searchable, and as such, I eventually stopped updating it. I built this site to solve that problem.
I mostly have everything how I want it. No doubt I will make style changes in the future, but structurally, I think things are mostly set. Unfortunately, rearranging the programming log files into new directories inevitably broke some of my links; I had to sift through many of my pages and fix them. It got me thinking about the related problem of link rot.
Link Rot
Link rot refers to the tendency of internet links to break as the websites to which they point go offline, change URLs, or remove a particular page or post. Anyone producing content on the Internet will feel its effects. My website will suffer link rot, and indeed it already suffers broken links, albeit by my own doing.
I began thinking about a program that would sift the outgoing links of a website and make a report of broken links and where to find them. Such a tool would be great for anyone trying to maintain a website. I decided it would be best implemented as a browser extension, and I’m starting with Firefox.
First Steps
I’ll admit getting started has been tough. I’m poring over the MDN Web Docs trying to get acquainted with the structure of extensions. It seems simple at first, but it isn’t. I have mixed feelings about MDN Web Docs: they are excellent and incredibly thorough, but sometimes difficult to navigate.
I started with the Browser Extensions Getting Started section, specifically the guides Your first extension and Your second extension. The latter made things more confusing in some respects. I plan to consult the How to section next, with guides like Modify a web page. I think I should be able to make more headway.





