Firefox
Table of Contents
1. Bookmarks
1.1. Keyword bookmarks
- https://bugzilla.mozilla.org/show_bug.cgi?id=1653261
- https://support.mozilla.org/en-US/kb/bookmarks-firefox#w_how-to-use-keywords-with-bookmarks
- https://kb.mozillazine.org/Using_keyword_searches
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.sqliteandfavicons.sqlitedatabases in the Firefox profile folder. Use Verify Integrity on the about:support pageIf Verify Integrity cannot repair
places.sqlite, rename/remove allplaces.sqliteandfavicons.sqlitefiles in the Firefox profile folder with Firefox closed. Firefox will rebuildplaces.sqliteand restore the bookmarks from a recent JSON backup in the bookmarkbackups folder.Keep a backup copy of
places.sqlitein case a newplaces.sqlitedatabase has to be created
2. Text fragments
- https://developer.mozilla.org/en-US/docs/Web/URI/Reference/Fragment/Text_fragments
- https://developer.mozilla.org/en-US/docs/Web/URI/Reference/Fragment/Text_fragments#examples
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
- https://github.com/arkenfox/user.js
- https://support.mozilla.org/en-US/kb/bookmarks-firefox
- https://support.mozilla.org/en-US/kb/firefox-esr-release-cycle
- https://support.mozilla.org/en-US/kb/profiles-where-firefox-stores-user-data
- https://support.mozilla.org/en-US/kb/keyboard-shortcuts-perform-firefox-tasks-quickly
- https://support.mozilla.org/en-US/kb/install-firefox-linux#w_install-firefox-from-mozilla-builds
- https://codeberg.org/alan127/firefox/src/branch/main/user.js