mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-02-05 14:05:45 +01:00
Cleanup some references to "Firefox" in common/*.
This commit is contained in:
@@ -615,8 +615,7 @@ function Bookmarks() //{{{
|
||||
getSearchEngines: function getSearchEngines()
|
||||
{
|
||||
let searchEngines = [];
|
||||
let firefoxEngines = services.get("browserSearch").getVisibleEngines({});
|
||||
for (let [,engine] in Iterator(firefoxEngines))
|
||||
for (let [,engine] in Iterator(services.get("browserSearch").getVisibleEngines({})))
|
||||
{
|
||||
let alias = engine.alias;
|
||||
if (!alias || !/^[a-z0-9_-]+$/.test(alias))
|
||||
|
||||
@@ -600,7 +600,7 @@ CompletionContext.prototype = {
|
||||
|
||||
highlight: function highlight(start, length, type)
|
||||
{
|
||||
try // Firefox <3.1 doesn't have repaintSelection
|
||||
try // Gecko < 1.9.1 doesn't have repaintSelection
|
||||
{
|
||||
this.selectionTypes[type] = null;
|
||||
const selType = Ci.nsISelectionController["SELECTION_" + type];
|
||||
|
||||
@@ -784,7 +784,7 @@ function Editor() //{{{
|
||||
|
||||
// This function will move/select up to given "pos"
|
||||
// Simple setSelectionRange() would be better, but we want to maintain the correct
|
||||
// order of selectionStart/End (a Firefox bug always makes selectionStart <= selectionEnd)
|
||||
// order of selectionStart/End (a Gecko bug always makes selectionStart <= selectionEnd)
|
||||
// Use only for small movements!
|
||||
moveToPosition: function (pos, forward, select)
|
||||
{
|
||||
|
||||
@@ -406,7 +406,7 @@ function Events() //{{{
|
||||
}
|
||||
function exitPopupMode()
|
||||
{
|
||||
// gContextMenu is set to NULL by Firefox, when a context menu is closed
|
||||
// gContextMenu is set to NULL, when a context menu is closed
|
||||
if (typeof gContextMenu != "undefined" && gContextMenu == null && !activeMenubar)
|
||||
modes.remove(modes.MENU);
|
||||
}
|
||||
@@ -463,7 +463,7 @@ function Events() //{{{
|
||||
key_code[name.toLowerCase()] = v
|
||||
}
|
||||
|
||||
// HACK: as firefox does not include an event for <, we must add this in manually.
|
||||
// HACK: as Gecko does not include an event for <, we must add this in manually.
|
||||
if (!("<" in key_code))
|
||||
{
|
||||
key_code["<"] = 60;
|
||||
@@ -522,7 +522,7 @@ function Events() //{{{
|
||||
{
|
||||
// hacky way to get rid of "Transfering data from ..." on sites with frames
|
||||
// when you click on a link inside a frameset, because asyncUpdateUI
|
||||
// is not triggered there (Firefox bug?)
|
||||
// is not triggered there (Gecko bug?)
|
||||
setTimeout(statusline.updateUrl, 10);
|
||||
return;
|
||||
}
|
||||
@@ -1482,7 +1482,7 @@ function Events() //{{{
|
||||
return;
|
||||
}
|
||||
|
||||
stop = true; // set to false if we should NOT consume this event but let Firefox handle it
|
||||
stop = true; // set to false if we should NOT consume this event but let the host app handle it
|
||||
|
||||
// just forward event without checking any mappings when the MOW is open
|
||||
if (liberator.mode == modes.COMMAND_LINE && (modes.extended & modes.OUTPUT_MULTILINE))
|
||||
@@ -1491,8 +1491,9 @@ function Events() //{{{
|
||||
return void killEvent();
|
||||
}
|
||||
|
||||
// XXX: ugly hack for now pass certain keys to Firefox as they are without beeping
|
||||
// also fixes key navigation in combo boxes, submitting forms, etc.
|
||||
// XXX: ugly hack for now pass certain keys to the host app as
|
||||
// they are without beeping also fixes key navigation in combo
|
||||
// boxes, submitting forms, etc.
|
||||
// FIXME: breaks iabbr for now --mst
|
||||
if (key in config.ignoreKeys && (config.ignoreKeys[key] & liberator.mode))
|
||||
{
|
||||
@@ -1523,7 +1524,7 @@ function Events() //{{{
|
||||
return void killEvent();
|
||||
}
|
||||
|
||||
// others are left to generate the 'input' event or handled by Firefox
|
||||
// others are left to generate the 'input' event or handled by the host app
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -1628,7 +1629,7 @@ function Events() //{{{
|
||||
|
||||
if (!isEscapeKey(key))
|
||||
{
|
||||
// allow key to be passed to Firefox if we can't handle it
|
||||
// allow key to be passed to the host app if we can't handle it
|
||||
stop = false;
|
||||
|
||||
if (liberator.mode == modes.COMMAND_LINE)
|
||||
|
||||
@@ -569,13 +569,13 @@ function IO() //{{{
|
||||
expandPath: IO.expandPath,
|
||||
|
||||
// TODO: there seems to be no way, short of a new component, to change
|
||||
// Firefox's CWD - see // https://bugzilla.mozilla.org/show_bug.cgi?id=280953
|
||||
// the process's CWD - see // https://bugzilla.mozilla.org/show_bug.cgi?id=280953
|
||||
/**
|
||||
* Returns the current working directory.
|
||||
*
|
||||
* It's not possible to change the real CWD of Firefox so this state is
|
||||
* maintained internally. External commands run via {@link #system} are
|
||||
* executed in this directory.
|
||||
* It's not possible to change the real CWD of the process so this
|
||||
* state is maintained internally. External commands run via
|
||||
* {@link #system} are executed in this directory.
|
||||
*
|
||||
* @returns {nsIFile}
|
||||
*/
|
||||
@@ -584,7 +584,7 @@ function IO() //{{{
|
||||
let dir = self.getFile(cwd.path);
|
||||
|
||||
// NOTE: the directory could have been deleted underneath us so
|
||||
// fallback to Firefox's CWD
|
||||
// fallback to the process's CWD
|
||||
if (dir.exists() && dir.isDirectory())
|
||||
return dir;
|
||||
else
|
||||
|
||||
@@ -1276,7 +1276,7 @@ const liberator = (function () //{{{
|
||||
},
|
||||
|
||||
/**
|
||||
* Restart the liberator host application.
|
||||
* Restart the Liberator host application.
|
||||
*/
|
||||
restart: function ()
|
||||
{
|
||||
|
||||
@@ -715,10 +715,11 @@ function Options() //{{{
|
||||
}
|
||||
|
||||
//
|
||||
// Firefox preferences which need to be changed to work well with Vimperator
|
||||
// Host application preferences which need to be changed to work well with
|
||||
// Liberator
|
||||
//
|
||||
|
||||
// work around Firefox popup blocker
|
||||
// work around the popup blocker
|
||||
// TODO: Make this work like safeSetPref
|
||||
var popupAllowedEvents = loadPreference("dom.popup_allowed_events", "change click dblclick mouseup reset submit");
|
||||
if (!/keypress/.test(popupAllowedEvents))
|
||||
|
||||
@@ -1370,7 +1370,7 @@ function CommandLine() //{{{
|
||||
{
|
||||
//this.resetCompletions();
|
||||
}
|
||||
return true; // allow this event to be handled by Firefox
|
||||
return true; // allow this event to be handled by the host app
|
||||
}
|
||||
else if (event.type == "keyup")
|
||||
{
|
||||
|
||||
@@ -662,7 +662,7 @@ const util = { //{{{
|
||||
if (searchURL)
|
||||
return searchURL;
|
||||
|
||||
// Hmm. No defsearch? Let Firefox deal with it, then.
|
||||
// Hmm. No defsearch? Let the host app deal with it, then.
|
||||
return url;
|
||||
});
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user