Firefox

Table of Contents

1. Bookmarks

1.1. Keyword bookmarks

Add the following bookmark then type fh firefox in the address bar to search for Firefox on Flathub

Field Value
Name Search Flathub
URL https://flathub.org/apps/search?q=%s
Keyword fh

1.2. Bookmarklets

1.2.1. Find feeds on the current page

javascript:(
    function() {
        let feeds = [];
        for (let i = 0; i < document.querySelectorAll('[rel="alternate"][type*="xml"]').length; i++) {
            feeds.push(document.querySelectorAll('[rel="alternate"][type*="xml"]')[i].href)
        }
        if (feeds.length > 0) {
            alert(feeds.join("\n"));
        }
    }
)();

Add the minimized version of the function as the bookmark URL

javascript:(function(){let feeds=[];for(let i=0;i<document.querySelectorAll('[rel="alternate"][type*="xml"]').length;i++){feeds.push(document.querySelectorAll('[rel="alternate"][type*="xml"]')[i].href)}if(feeds.length>0){alert(feeds.join("\n"));}})();

1.2.2. Copy link to the selected text on a page (added in Firefox 145)

See Text fragments

javascript:(
    function() {
        const href = window.location.href;
        const txt = encodeURI(window.getSelection().toString());
        const link = href + "#:~:text=" + txt;
        navigator.clipboard.writeText(link);
    }
)();

Add the minimized version of the function as the bookmark URL

javascript:(function(){const href=window.location.href;const txt=encodeURI(window.getSelection().toString());const link=href+"#:~:text="+txt;navigator.clipboard.writeText(link);})();

1.3. Bookmarks ghosts

This can be caused by a problem with the places.sqlite and favicons.sqlite databases in the Firefox profile folder. Use Verify Integrity on the about:support page

If Verify Integrity cannot repair places.sqlite, rename/remove all places.sqlite and favicons.sqlite files in the Firefox profile folder with Firefox closed. Firefox will rebuild places.sqlite and restore the bookmarks from a recent JSON backup in the bookmarkbackups folder.

Keep a backup copy of places.sqlite in case a new places.sqlite database has to be created

2. Text fragments

Text fragments link directly to specific text in a web page, without requiring the page author to add an ID. They use a special syntax in the URL fragment.

3. References