mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-20 10:57:58 +01:00
Fix some zi/zo issues.
This commit is contained in:
@@ -215,13 +215,7 @@ function Buffer() //{{{
|
|||||||
|
|
||||||
mappings.add(myModes, ["<C-c>"],
|
mappings.add(myModes, ["<C-c>"],
|
||||||
"Stop loading",
|
"Stop loading",
|
||||||
function ()
|
function () { window.BrowserStop(); });
|
||||||
{
|
|
||||||
if(config.stop)
|
|
||||||
config.stop();
|
|
||||||
else
|
|
||||||
window.BrowserStop();
|
|
||||||
});
|
|
||||||
|
|
||||||
// scrolling
|
// scrolling
|
||||||
mappings.add(myModes, ["j", "<Down>", "<C-e>"],
|
mappings.add(myModes, ["j", "<Down>", "<C-e>"],
|
||||||
@@ -603,17 +597,7 @@ function Buffer() //{{{
|
|||||||
|
|
||||||
commands.add(["st[op]"],
|
commands.add(["st[op]"],
|
||||||
"Stop loading",
|
"Stop loading",
|
||||||
<<<<<<< HEAD:common/content/buffer.js
|
|
||||||
function ()
|
|
||||||
{
|
|
||||||
if (config.stop)
|
|
||||||
config.stop();
|
|
||||||
else
|
|
||||||
window.BrowserStop();
|
|
||||||
},
|
|
||||||
=======
|
|
||||||
function () { window.BrowserStop(); },
|
function () { window.BrowserStop(); },
|
||||||
>>>>>>> a9f04ee3d00b282e7a91b37eb23168fb39e9de5b:common/content/buffer.js
|
|
||||||
{ argCount: "0" });
|
{ argCount: "0" });
|
||||||
|
|
||||||
commands.add(["vie[wsource]"],
|
commands.add(["vie[wsource]"],
|
||||||
|
|||||||
@@ -1222,8 +1222,32 @@ function Events() //{{{
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (config.focusChange())
|
if (config.name == "Muttator")
|
||||||
return void config.focusChange(win);
|
{
|
||||||
|
// we switch to -- MESSAGE -- mode for Muttator, when the main HTML widget gets focus
|
||||||
|
if (hasHTMLDocument(win) || elem instanceof HTMLAnchorElement)
|
||||||
|
{
|
||||||
|
if (config.isComposeWindow)
|
||||||
|
{
|
||||||
|
//liberator.dump("Compose editor got focus");
|
||||||
|
modes.set(modes.INSERT, modes.TEXTAREA);
|
||||||
|
}
|
||||||
|
else if (liberator.mode != modes.MESSAGE)
|
||||||
|
liberator.mode = modes.MESSAGE;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (config.name == "Xulmus")
|
||||||
|
{
|
||||||
|
// Switch to -- PLAYER -- mode for Songbird Media Player.
|
||||||
|
if (config.isPlayerWindow)
|
||||||
|
liberator.mode = modes.PLAYER;
|
||||||
|
else
|
||||||
|
liberator.mode = modes.NORMAL;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
urlbar = document.getElementById("urlbar");
|
urlbar = document.getElementById("urlbar");
|
||||||
if (elem == null && urlbar && urlbar.inputField == lastFocus)
|
if (elem == null && urlbar && urlbar.inputField == lastFocus)
|
||||||
|
|||||||
@@ -109,14 +109,17 @@ function Tabs() //{{{
|
|||||||
// hide tabs initially
|
// hide tabs initially
|
||||||
if (config.name == "Vimperator")
|
if (config.name == "Vimperator")
|
||||||
getBrowser().mStrip.getElementsByClassName("tabbrowser-tabs")[0].collapsed = true;
|
getBrowser().mStrip.getElementsByClassName("tabbrowser-tabs")[0].collapsed = true;
|
||||||
|
/*
|
||||||
|
if (config.name == "Xulmus")
|
||||||
|
getBrowser()._strip.getElementsByClassName(
|
||||||
|
*/
|
||||||
/////////////////////////////////////////////////////////////////////////////}}}
|
/////////////////////////////////////////////////////////////////////////////}}}
|
||||||
////////////////////// OPTIONS /////////////////////////////////////////////////
|
////////////////////// OPTIONS /////////////////////////////////////////////////
|
||||||
/////////////////////////////////////////////////////////////////////////////{{{
|
/////////////////////////////////////////////////////////////////////////////{{{
|
||||||
|
|
||||||
options.add(["showtabline", "stal"],
|
options.add(["showtabline", "stal"],
|
||||||
"Control when to show the tab bar of opened web pages",
|
"Control when to show the tab bar of opened web pages",
|
||||||
"number", config.optionDefaults['stal'],
|
"number", config.name == "Vimperator" ? 2 : 0,
|
||||||
{
|
{
|
||||||
setter: function (value)
|
setter: function (value)
|
||||||
{
|
{
|
||||||
@@ -148,7 +151,7 @@ function Tabs() //{{{
|
|||||||
validator: Option.validateCompleter
|
validator: Option.validateCompleter
|
||||||
});
|
});
|
||||||
|
|
||||||
if (config.hasTabbrowser)
|
if (config.name == "Vimperator" || config.name == "Xulmus")
|
||||||
{
|
{
|
||||||
options.add(["activate", "act"],
|
options.add(["activate", "act"],
|
||||||
"Define when tabs are automatically activated",
|
"Define when tabs are automatically activated",
|
||||||
@@ -238,7 +241,7 @@ function Tabs() //{{{
|
|||||||
function (count) { tabs.select("-" + (count < 1 ? 1 : count), true); },
|
function (count) { tabs.select("-" + (count < 1 ? 1 : count), true); },
|
||||||
{ flags: Mappings.flags.COUNT });
|
{ flags: Mappings.flags.COUNT });
|
||||||
|
|
||||||
if (config.hasTabbrowser)
|
if (config.name == "Vimperator" || config.name == "Xulmus")
|
||||||
{
|
{
|
||||||
mappings.add([modes.NORMAL], ["b"],
|
mappings.add([modes.NORMAL], ["b"],
|
||||||
"Open a prompt to switch buffers",
|
"Open a prompt to switch buffers",
|
||||||
@@ -449,7 +452,7 @@ function Tabs() //{{{
|
|||||||
function () { tabs.select(0, false); },
|
function () { tabs.select(0, false); },
|
||||||
{ argCount: "0" });
|
{ argCount: "0" });
|
||||||
|
|
||||||
if (config.hasTabbrowser)
|
if (config.name == "Vimperator" || config.name == "Xulmus")
|
||||||
{
|
{
|
||||||
// TODO: "Zero count" if 0 specified as arg, multiple args and count ranges?
|
// TODO: "Zero count" if 0 specified as arg, multiple args and count ranges?
|
||||||
commands.add(["b[uffer]"],
|
commands.add(["b[uffer]"],
|
||||||
@@ -584,7 +587,6 @@ function Tabs() //{{{
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Why not xulmus? */
|
|
||||||
if (liberator.has("session") && config.name != "Xulmus")
|
if (liberator.has("session") && config.name != "Xulmus")
|
||||||
{
|
{
|
||||||
// TODO: extract common functionality of "undoall"
|
// TODO: extract common functionality of "undoall"
|
||||||
|
|||||||
@@ -2105,23 +2105,21 @@ function StatusLine() //{{{
|
|||||||
}
|
}
|
||||||
|
|
||||||
// when session information is available, add [+] when we can go backwards
|
// when session information is available, add [+] when we can go backwards
|
||||||
let modified = "";
|
if (config.name == "Vimperator")
|
||||||
if (window.getWebNavigation)
|
|
||||||
{
|
{
|
||||||
let sh = window.getWebNavigation().sessionHistory;
|
let sh = window.getWebNavigation().sessionHistory;
|
||||||
|
let modified = "";
|
||||||
if (sh.index > 0)
|
if (sh.index > 0)
|
||||||
modified += "+";
|
modified += "+";
|
||||||
if (sh.index < sh.count -1)
|
if (sh.index < sh.count -1)
|
||||||
modified += "-";
|
modified += "-";
|
||||||
}
|
|
||||||
if (liberator.has("bookmarks")) {
|
|
||||||
if (bookmarks.isBookmarked(buffer.URL))
|
if (bookmarks.isBookmarked(buffer.URL))
|
||||||
modified += "\u2764"; // a heart symbol: ❤
|
modified += "\u2764"; // a heart symbol: ❤
|
||||||
//modified += "\u2665"; // a heart symbol: ♥
|
//modified += "\u2665"; // a heart symbol: ♥
|
||||||
}
|
|
||||||
|
|
||||||
if (modified)
|
if (modified)
|
||||||
url += " [" + modified + "]";
|
url += " [" + modified + "]";
|
||||||
|
}
|
||||||
|
|
||||||
urlWidget.value = url;
|
urlWidget.value = url;
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -102,17 +102,6 @@ const config = { //{{{
|
|||||||
function () { buffer.viewSelectionSource(); }]*/
|
function () { buffer.viewSelectionSource(); }]*/
|
||||||
],
|
],
|
||||||
|
|
||||||
focusChange: function(win) {
|
|
||||||
// we switch to -- MESSAGE -- mode for Muttator, when the main HTML widget gets focus
|
|
||||||
if (hasHTMLDocument(win) || elem instanceof HTMLAnchorElement)
|
|
||||||
{
|
|
||||||
if (config.isComposeWindow)
|
|
||||||
modes.set(modes.INSERT, modes.TEXTAREA);
|
|
||||||
else if (liberator.mode != modes.MESSAGE)
|
|
||||||
liberator.mode = modes.MESSAGE;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
// they are sorted by relevance, not alphabetically
|
// they are sorted by relevance, not alphabetically
|
||||||
helpFiles: ["intro.html", "version.html"],
|
helpFiles: ["intro.html", "version.html"],
|
||||||
/* "tutorial.html", "starting.html",
|
/* "tutorial.html", "starting.html",
|
||||||
@@ -122,10 +111,6 @@ const config = { //{{{
|
|||||||
"various.html"
|
"various.html"
|
||||||
],*/
|
],*/
|
||||||
|
|
||||||
optionDefaults: {
|
|
||||||
stal: 2,
|
|
||||||
},
|
|
||||||
|
|
||||||
scripts: [
|
scripts: [
|
||||||
"addressbook.js",
|
"addressbook.js",
|
||||||
"mail.js",
|
"mail.js",
|
||||||
|
|||||||
@@ -110,8 +110,6 @@ const config = { //{{{
|
|||||||
function () { buffer.viewSelectionSource(); }]
|
function () { buffer.viewSelectionSource(); }]
|
||||||
],
|
],
|
||||||
|
|
||||||
hasTabbrowser: true,
|
|
||||||
|
|
||||||
// they are sorted by relevance, not alphabetically
|
// they are sorted by relevance, not alphabetically
|
||||||
helpFiles: [
|
helpFiles: [
|
||||||
"intro.html", "tutorial.html", "starting.html", "browsing.html",
|
"intro.html", "tutorial.html", "starting.html", "browsing.html",
|
||||||
@@ -122,10 +120,6 @@ const config = { //{{{
|
|||||||
"various.html", "index.html", "version.html"
|
"various.html", "index.html", "version.html"
|
||||||
],
|
],
|
||||||
|
|
||||||
optionDefaults: {
|
|
||||||
stal: 0,
|
|
||||||
},
|
|
||||||
|
|
||||||
scripts: [
|
scripts: [
|
||||||
"bookmarks.js",
|
"bookmarks.js",
|
||||||
"tabs.js",
|
"tabs.js",
|
||||||
|
|||||||
@@ -138,16 +138,6 @@ const config = { //{{{
|
|||||||
function () { SBSubscribe(); }]
|
function () { SBSubscribe(); }]
|
||||||
],
|
],
|
||||||
|
|
||||||
focusChange: function() {
|
|
||||||
// Switch to -- PLAYER -- mode for Songbird Media Player.
|
|
||||||
if (config.isPlayerWindow)
|
|
||||||
liberator.mode = modes.PLAYER;
|
|
||||||
else
|
|
||||||
liberator.mode = modes.NORMAL;
|
|
||||||
},
|
|
||||||
|
|
||||||
hasTabbrowser: true,
|
|
||||||
|
|
||||||
//TODO : Write intro.html and tutorial.html
|
//TODO : Write intro.html and tutorial.html
|
||||||
// they are sorted by relevance, not alphabetically
|
// they are sorted by relevance, not alphabetically
|
||||||
helpFiles: [
|
helpFiles: [
|
||||||
@@ -159,20 +149,12 @@ const config = { //{{{
|
|||||||
"developer.html", "various.html", "index.html", "version.html"
|
"developer.html", "various.html", "index.html", "version.html"
|
||||||
],
|
],
|
||||||
|
|
||||||
optionDefaults: {
|
|
||||||
stal: 0,
|
|
||||||
},
|
|
||||||
|
|
||||||
scripts: [
|
scripts: [
|
||||||
"bookmarks.js",
|
"bookmarks.js",
|
||||||
"tabs.js",
|
"tabs.js",
|
||||||
"player.js",
|
"player.js",
|
||||||
],
|
],
|
||||||
|
|
||||||
stop: function() {
|
|
||||||
getBrowser().mCurrentBrowser.stop();
|
|
||||||
},
|
|
||||||
|
|
||||||
init: function ()
|
init: function ()
|
||||||
{
|
{
|
||||||
//Adding a mode for Player
|
//Adding a mode for Player
|
||||||
|
|||||||
Reference in New Issue
Block a user