我使用的是Ubuntu 12.04,我的firefox版本是47.0。我想覆盖netError.xhtml文件。我已经尝试过谷歌搜索,但无法解决这个问题
这是我到目前为止所做的事情
来自我的主目录
unzip /usr/lib/firefox/omni.ja -d omni
编辑了函数
retryThis(buttonEl)
infile /home/suman/omni/chrome/toolkit/content/global/netError.xhtml
function retryThis(buttonEl)
{
// Note: The application may wish to handle switching off "offline mode"
// before this event handler runs, but using a capturing event handler.
// Session history has the URL of the page that failed
// to load, not the one of the error page. So, just call
// reload(), which will also repost POST data correctly.
try {
location.replace('http://www.google.com');
} catch (e) {
// We probably tried to reload a URI that caused an exception to
// occur; e.g. a nonexistent file.
}
buttonEl.disabled = true;
}
重新打包omni文件夹并将其替换为实际位置
zip -qr9XD omni.ja *
mv home/suman/omni/omni.ja /usr/lib/firefox/
重新启动浏览器并生成页面,如下面的图像说明所示
但点击再试一次后,我无法将其重定向到Google网站
非常感谢任何帮助
下面是截图
答案 0 :(得分:0)
我在Windows 10的firefox 59中有类似的问题。
TLDR :选中文件夹mozilla firefox/browser/omni.ja/chrome
中的netError.xhtml
,您可以删除用aboutNetError.xhtml
覆盖neterror.dpd
的行,也可以简单地进行编辑aboutNetError.xhtml。
我有一个想法[1],即存在一条规则会覆盖chrome.manifest
中的neterror.dpd
,因为来自Mozilla Firefox文件夹的omni.ja
中的chrome.manifest
与错误消息不同我在浏览时发现错误。
因此,我调查了所有可以找到的Mozilla Firefox/browser
,但没有找到任何覆盖规则的内容。因此,我搜索了另一个omni.ja的可能性,并在omni.ja
中找到了它
所以我要做的是:
omni.zip
复制到桌面或任何您喜欢的文件夹并将其重命名为omni
omni/browser/chrome/browser/content
)aboutNetError
xhtml
this.http.post( url, body, headers ).subscribe(
data => {
// don't do nothing
}
);
,这是您要编辑的文件[1] https://mike.kaply.com/2012/06/14/customizing-firefox-hiding-private-browsing-continued/