How to force Firefox to open a file which does not have a .txt extension as if it did have one?
For a quick solution, you can add view-source:
before the url. This also works in Chrome.
You should try this addon: Open in Browser.
It offers the possibility to display documents in the browser window.
for nightly 26 alpha, opening .java files as text/plain
find ~/.mozilla -name mimeTypes.rdf
add children to node /RDF:RDF
<RDF:Description RDF:about="urn:mimetype:text/plain"
NC:value="text/plain"
NC:editable="true"
NC:fileExtensions="java"
NC:description="Java source file">
<NC:handlerProp RDF:resource="urn:mimetype:handler:text/plain"/>
</RDF:Description>