зеркало из https://github.com/mozilla/gecko-dev.git
Bug 85908 Add reload to View Page Source Window r=doron sr=bz
This commit is contained in:
Родитель
cb366b2780
Коммит
7b72dc4eb3
|
@ -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()
|
||||
|
|
Загрузка…
Ссылка в новой задаче