Bug 85908 Add reload to View Page Source Window r=doron sr=bz

This commit is contained in:
neil%parkwaycc.co.uk 2006-09-14 06:08:14 +00:00
Родитель cb366b2780
Коммит 7b72dc4eb3
2 изменённых файлов: 20 добавлений и 7 удалений

Просмотреть файл

@ -103,7 +103,11 @@
<key keycode="&findPrevCmd.commandkey2;" command="Browser:FindPrev" modifiers="shift"/>
<key id="key_findTypeText"/>
<!-- View Menu -->
<key id="key_reload" key="&reloadCmd.commandkey;" oncommand="BrowserReload();" modifiers="accel"/>
<key key="&reloadCmd.commandkey;" oncommand="BrowserReloadSkipCache();" modifiers="accel,shift"/>
<keyset id="viewZoomKeys"/>
<keyset id="navigationKeys"/>
</keyset>
<!-- context menu -->
@ -171,6 +175,8 @@
<menu id="menu_View">
<menupopup>
<menuitem accesskey="&reloadCmd.accesskey;" key="key_reload" label="&reloadCmd.label;" oncommand="BrowserReload();"/>
<menuseparator />
<menu id="menu_textZoom"/>
<menuseparator/>
<!-- <menuitem key="key_viewInfo" observes="View:PageInfo"

Просмотреть файл

@ -209,21 +209,28 @@ function ViewSourceClose()
window.close();
}
function BrowserReload()
{
// Reload will always reload from cache which is probably not what's wanted
BrowserReloadSkipCache();
}
function BrowserReloadSkipCache()
{
const webNavigation = getBrowser().webNavigation;
webNavigation.reload(webNavigation.LOAD_FLAGS_BYPASS_PROXY | webNavigation.LOAD_FLAGS_BYPASS_CACHE);
}
// Strips the |view-source:| for editPage()
function ViewSourceEditPage()
{
var url = window._content.location.href;
url = url.substring(12,url.length);
editPage(url,window, false);
editPage(window.content.location.href.substring(12), window, false);
}
// Strips the |view-source:| for saveURL()
function ViewSourceSavePage()
{
var url = window._content.document.location.href;
url = url.substring(12,url.length);
saveURL(url, null, "SaveLinkTitle");
saveURL(window.content.location.href.substring(12), null, "SaveLinkTitle");
}
function ViewSourceGoToLine()