如何强制firefox打开一个没有.txt扩展名的文件,就好像它有一个? [英] How to force firefox to open a file which does not have a .txt extension as if it did have one?

查看:209
本文介绍了如何强制firefox打开一个没有.txt扩展名的文件,就好像它有一个?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有文件只是纯文本,但有扩展名不是.txt。可以说扩展名是.abc当我点击指向这样一个文件的链接时,比如file.abc,我想用firefox打开这个文件就好像它是file.txt(即在firefox中打开它,在Firefox内部列出,就像我点击file.txt时发生的一样),而不是问如何保存或打开它,然后我有去选择应用程序打开它,这样的记事本或任何。



我去了tools-> options->应用程序,但不知道该怎么办。 / p>

谢谢!



新增:根据以下评论和答案很远,看起来我没有自我解释。



我希望firefox打开文件,就好像文件有.txt扩展名。当你点击一个Firefox中有.txt的链接时,Firefox是做什么的?它不会打开记事本中的文件或其他任何内容,它会在浏览器内部打开,显示文件的列表。我想在.abc扩展名时发生同样的情况。



我不想为了这个而乱搞windows。


<您可以编辑Firefox配置文件中的mymeTypes.rdf(而Firefox未运行时)以添加将相关扩展映射到文本的扩展到类型的映射/平原。不幸的是,Firefox没有暴露这个操作的用户界面。



我会在编辑之前对文件进行备份;语法有点挑剔。


I have files which are just plain text, but have extension which is not .txt. Lets say the extension is .abc

When I click on a link that points to such a file, such as file.abc, I'd like firefox to open the file as if it was file.txt (i.e. open it inside firefox, listed inside firefox itself, just like what happens when I click on file.txt) instead of it asking how if I want to save it or open it, and then I have to go select the application to open it with, such notepad or whatever.

I went to tools->options->applications, but did not know what to do.

thank you!

Added: Based on the comment below and the answer so far, it looks I did not explain myself well.

I want firefox to open the file as if the file had .txt extension. When you click on a link in firefox which has .txt, what does firefox do? it does not open the file in notepad or whatever, it opens right there, inside the browser, showing the listing of the file. I want to the same to happen when .abc extension.

I do not want to go around mess up with windows for this.

解决方案

You can edit the mymeTypes.rdf in your Firefox profile (while Firefox is not running) to add extension-to-type mappings mapping the extensions in question to "text/plain". Unfortunately, Firefox has no user interface exposed for this operation....

I'd make a backup of the file before editing; the syntax is a bit finicky.

这篇关于如何强制firefox打开一个没有.txt扩展名的文件,就好像它有一个?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆