Welcome to the Power Users community on Codidact!
Power Users is a Q&A site for questions about the usage of computer software and hardware. We are still a small site and would like to grow, so please consider joining our community. We are looking forward to your questions and answers; they are the building blocks of a repository of knowledge we are building together.
How to resolve an abstracted internal URI in Firefox?
Premise
about:preferences resolves to chrome://browser/content/preferences/preferences.xhtml, which itself resolves to jar:file:///usr/lib64/firefox/browser/omni.ja!/chrome/browser/content/browser/preferences/preferences.xhtml.
Similarly, resource://pdf.js/web/viewer.html exists, and I am utterly unfamiliar with that the distinction is, nor how one might resolve that to the aforementioned URI structure.
Desire
How can I ascertain this in a deterministic manner (that is, without needing to search for it in chrome://browser/content/preferences//jar:file:///usr/lib64/firefox/browser/omni.ja!/)?
Rationale
I ask because, as of yet, I've been unable to ascertain what about:crashes resolves to, despite being quite confident, per github.com/mozilla-firefox/firefox/blob/4b63e8e14125558cd75be1a53b6fc40b48cc2560/toolkit/crashreporter/content/crashes.html, that it's crashes.html.
Diagnosis
I've confirmed that ECMAScript's window.location.href and document.URL merely return the about: URI.
1 answer
153.0a1-20260606213347 occasionally provides a method to accomplish this, although it may not be deliberate:
-
#!/usr/bin/env pwsh Start-Process firefox-nightly -ArgumentList '-jsdebugger', '--new-window', 'view-source:about:neterror?e=nssFailure2&u=https%3A//download.fedoraproject.org/pub/fedora/linux/releases/44/KDE/x86_64/iso/Fedora-KDE-Desktop-Live-44-1.7.x86_64.iso&c=UTF-8&d=%20&a=' $Header = '/usr/include/linux/input-event-codes.h' $Control = awk '$1=="#define" && $2=="KEY_LEFTCTRL" {print $3}' $Header $Alt = awk '$1=="#define" && $2=="KEY_LEFTALT" {print $3}' $Header $Shift = awk '$1=="#define" && $2=="KEY_LEFTSHIFT" {print $3}' $Header $I = awk '$1=="#define" && $2=="KEY_I" {print $3}' $Header ydotool key ` "$($Control):1" ` "$($Alt):1" ` "$($Shift):1" ` "$($I):1" ` "$($I):0" ` "$($Shift):0" ` "$($Alt):0" ` "$($Control):0" -
#!/usr/lib/firefox-nightly/browser/omni.ja!/chrome/devtools/content/framework/toolbox.xhtml document.querySelector('#command-button-pick').click(); -
#!/usr/lib/firefox-nightly/browser/omni.ja!/chrome/browser/content/browser/browser.xhtml document.querySelector('tab.tabbrowser-tab:nth-child(1) > stack:nth-child(1) > hbox:nth-child(2) > vbox:nth-child(3) > label:nth-child(1)').click();
To summarise, inspect the chrome of the relevant error tab's label.

0 comment threads