mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-01-06 14:24:18 +01:00
More cleanup. Fix some Teledactyl bugginess.
This commit is contained in:
@@ -1,7 +1,9 @@
|
|||||||
|
resource dactyl-local ./
|
||||||
resource dactyl-local-content content/
|
resource dactyl-local-content content/
|
||||||
resource dactyl-local-skin skin/
|
resource dactyl-local-skin skin/
|
||||||
resource dactyl-local-locale locale/
|
resource dactyl-local-locale locale/
|
||||||
|
|
||||||
|
resource dactyl-common ../common/
|
||||||
resource dactyl ../common/modules/
|
resource dactyl ../common/modules/
|
||||||
resource dactyl-content ../common/content/
|
resource dactyl-content ../common/content/
|
||||||
resource dactyl-skin ../common/skin/
|
resource dactyl-skin ../common/skin/
|
||||||
|
|||||||
38
common/config.json
Normal file
38
common/config.json
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
{
|
||||||
|
"completers": {
|
||||||
|
"abbreviation": "abbreviation",
|
||||||
|
"altstyle": "alternateStyleSheet",
|
||||||
|
"bookmark": "bookmark",
|
||||||
|
"buffer": "buffer",
|
||||||
|
"charset": "charset",
|
||||||
|
"color": "colorScheme",
|
||||||
|
"command": "command",
|
||||||
|
"dialog": "dialog",
|
||||||
|
"dir": "directory",
|
||||||
|
"environment": "environment",
|
||||||
|
"event": "autocmdEvent",
|
||||||
|
"extension": "extension",
|
||||||
|
"file": "file",
|
||||||
|
"help": "help",
|
||||||
|
"highlight": "highlightGroup",
|
||||||
|
"history": "history",
|
||||||
|
"javascript": "javascript",
|
||||||
|
"macro": "macro",
|
||||||
|
"mapping": "userMapping",
|
||||||
|
"mark": "mark",
|
||||||
|
"menu": "menuItem",
|
||||||
|
"option": "option",
|
||||||
|
"preference": "preference",
|
||||||
|
"qmark": "quickmark",
|
||||||
|
"runtime": "runtime",
|
||||||
|
"search": "search",
|
||||||
|
"shellcmd": "shellCommand",
|
||||||
|
"toolbar": "toolbar",
|
||||||
|
"url": "url",
|
||||||
|
"usercommand": "userCommand"
|
||||||
|
},
|
||||||
|
|
||||||
|
"option-defaults": {
|
||||||
|
"guioptions": "rb"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -20,7 +20,7 @@ var CommandWidgets = Class("CommandWidgets", {
|
|||||||
eventTarget: commandline
|
eventTarget: commandline
|
||||||
},
|
},
|
||||||
append: <e4x xmlns={XUL} xmlns:dactyl={NS}>
|
append: <e4x xmlns={XUL} xmlns:dactyl={NS}>
|
||||||
<vbox id={config.commandContainer}>
|
<vbox id={config.ids.commandContainer}>
|
||||||
<vbox class="dactyl-container" hidden="false" collapsed="true">
|
<vbox class="dactyl-container" hidden="false" collapsed="true">
|
||||||
<iframe class="dactyl-completions" id="dactyl-completions-dactyl-commandline" src="dactyl://content/buffer.xhtml"
|
<iframe class="dactyl-completions" id="dactyl-completions-dactyl-commandline" src="dactyl://content/buffer.xhtml"
|
||||||
contextmenu="dactyl-contextmenu"
|
contextmenu="dactyl-contextmenu"
|
||||||
|
|||||||
@@ -1377,7 +1377,7 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
|
|||||||
|
|
||||||
options.add(["guioptions", "go"],
|
options.add(["guioptions", "go"],
|
||||||
"Show or hide certain GUI elements like the menu or toolbar",
|
"Show or hide certain GUI elements like the menu or toolbar",
|
||||||
"charlist", config.defaults.guioptions || "", {
|
"charlist", "", {
|
||||||
|
|
||||||
// FIXME: cleanup
|
// FIXME: cleanup
|
||||||
cleanupValue: config.cleanups.guioptions ||
|
cleanupValue: config.cleanups.guioptions ||
|
||||||
@@ -1406,7 +1406,7 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
|
|||||||
|
|
||||||
options.add(["titlestring"],
|
options.add(["titlestring"],
|
||||||
"The string shown at the end of the window title",
|
"The string shown at the end of the window title",
|
||||||
"string", config.defaults.titlestring || config.host,
|
"string", config.host,
|
||||||
{
|
{
|
||||||
setter: function (value) {
|
setter: function (value) {
|
||||||
let win = document.documentElement;
|
let win = document.documentElement;
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ var MOW = Module("mow", {
|
|||||||
</menupopup>
|
</menupopup>
|
||||||
</popupset>
|
</popupset>
|
||||||
</window>
|
</window>
|
||||||
<vbox id={config.commandContainer}>
|
<vbox id={config.ids.commandContainer}>
|
||||||
<vbox class="dactyl-container" id="dactyl-multiline-output-container" hidden="false" collapsed="true">
|
<vbox class="dactyl-container" id="dactyl-multiline-output-container" hidden="false" collapsed="true">
|
||||||
<iframe id="dactyl-multiline-output" src="dactyl://content/buffer.xhtml"
|
<iframe id="dactyl-multiline-output" src="dactyl://content/buffer.xhtml"
|
||||||
flex="1" hidden="false" collapsed="false" contextmenu="dactyl-contextmenu"
|
flex="1" hidden="false" collapsed="false" contextmenu="dactyl-contextmenu"
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ var Tabs = Module("tabs", {
|
|||||||
|
|
||||||
// hide tabs initially to prevent flickering when 'stal' would hide them
|
// hide tabs initially to prevent flickering when 'stal' would hide them
|
||||||
// on startup
|
// on startup
|
||||||
if (config.hasTabbrowser)
|
if (config.has("tabbrowser"))
|
||||||
config.tabStrip.collapsed = true;
|
config.tabStrip.collapsed = true;
|
||||||
|
|
||||||
this.tabStyle = styles.system.add("tab-strip-hiding", config.styleableChrome,
|
this.tabStyle = styles.system.add("tab-strip-hiding", config.styleableChrome,
|
||||||
@@ -762,7 +762,7 @@ var Tabs = Module("tabs", {
|
|||||||
function () { tabs.select(0, false); },
|
function () { tabs.select(0, false); },
|
||||||
{ argCount: "0" });
|
{ argCount: "0" });
|
||||||
|
|
||||||
if (config.hasTabbrowser) {
|
if (config.has("tabbrowser")) {
|
||||||
commands.add(["b[uffer]"],
|
commands.add(["b[uffer]"],
|
||||||
"Switch to a buffer",
|
"Switch to a buffer",
|
||||||
function (args) { tabs.switchTo(args[0], args.bang, args.count); }, {
|
function (args) { tabs.switchTo(args[0], args.bang, args.count); }, {
|
||||||
@@ -1014,7 +1014,7 @@ var Tabs = Module("tabs", {
|
|||||||
function ({ count }) { tabs.select("-" + (count || 1), true); },
|
function ({ count }) { tabs.select("-" + (count || 1), true); },
|
||||||
{ count: true });
|
{ count: true });
|
||||||
|
|
||||||
if (config.hasTabbrowser) {
|
if (config.has("tabbrowser")) {
|
||||||
mappings.add([modes.NORMAL], ["b"],
|
mappings.add([modes.NORMAL], ["b"],
|
||||||
"Open a prompt to switch buffers",
|
"Open a prompt to switch buffers",
|
||||||
function ({ count }) {
|
function ({ count }) {
|
||||||
@@ -1071,7 +1071,7 @@ var Tabs = Module("tabs", {
|
|||||||
options: function () {
|
options: function () {
|
||||||
options.add(["showtabline", "stal"],
|
options.add(["showtabline", "stal"],
|
||||||
"Define when the tab bar is visible",
|
"Define when the tab bar is visible",
|
||||||
"string", config.defaults["showtabline"],
|
"string", true,
|
||||||
{
|
{
|
||||||
setter: function (value) {
|
setter: function (value) {
|
||||||
if (value === "never")
|
if (value === "never")
|
||||||
@@ -1099,7 +1099,7 @@ var Tabs = Module("tabs", {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
if (config.hasTabbrowser) {
|
if (config.has("tabbrowser")) {
|
||||||
let activateGroups = [
|
let activateGroups = [
|
||||||
["all", "Activate everything"],
|
["all", "Activate everything"],
|
||||||
["addons", ":addo[ns] command"],
|
["addons", ":addo[ns] command"],
|
||||||
|
|||||||
@@ -915,6 +915,7 @@ Class.Update = function Update(obj)
|
|||||||
Class.Property({
|
Class.Property({
|
||||||
configurable: true,
|
configurable: true,
|
||||||
enumerable: true,
|
enumerable: true,
|
||||||
|
writable: true,
|
||||||
init: function (key, target) {
|
init: function (key, target) {
|
||||||
this.value = update({}, target[key], obj);
|
this.value = update({}, target[key], obj);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1133,7 +1133,7 @@ var Completion = Module("completion", {
|
|||||||
|
|
||||||
options.add(["complete", "cpt"],
|
options.add(["complete", "cpt"],
|
||||||
"Items which are completed at the :open prompts",
|
"Items which are completed at the :open prompts",
|
||||||
"stringlist", config.defaults.complete == null ? "slf" : config.defaults.complete,
|
"stringlist", "slf",
|
||||||
{
|
{
|
||||||
valueMap: {
|
valueMap: {
|
||||||
S: "suggestion",
|
S: "suggestion",
|
||||||
|
|||||||
@@ -36,13 +36,14 @@ AboutHandler.prototype = {
|
|||||||
|
|
||||||
getURIFlags: function (uri) Ci.nsIAboutModule.ALLOW_SCRIPT,
|
getURIFlags: function (uri) Ci.nsIAboutModule.ALLOW_SCRIPT,
|
||||||
};
|
};
|
||||||
|
|
||||||
var ConfigBase = Class("ConfigBase", {
|
var ConfigBase = Class("ConfigBase", {
|
||||||
/**
|
/**
|
||||||
* Called on dactyl startup to allow for any arbitrary application-specific
|
* Called on dactyl startup to allow for any arbitrary application-specific
|
||||||
* initialization code. Must call superclass's init function.
|
* initialization code. Must call superclass's init function.
|
||||||
*/
|
*/
|
||||||
init: function init() {
|
init: function init() {
|
||||||
|
this.loadConfig();
|
||||||
|
|
||||||
this.features.push = deprecated("Set.add", function push(feature) Set.add(this, feature));
|
this.features.push = deprecated("Set.add", function push(feature) Set.add(this, feature));
|
||||||
if (this.haveGecko("2b"))
|
if (this.haveGecko("2b"))
|
||||||
Set.add(this.features, "Gecko2");
|
Set.add(this.features, "Gecko2");
|
||||||
@@ -62,6 +63,40 @@ var ConfigBase = Class("ConfigBase", {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
get has() Set.has(this.features),
|
||||||
|
|
||||||
|
configFiles: [
|
||||||
|
"resource://dactyl-common/config.json",
|
||||||
|
"resource://dactyl-local/config.json"
|
||||||
|
],
|
||||||
|
|
||||||
|
configs: Class.Memoize(function () this.configFiles.map(function (url) JSON.parse(File.readURL(url)))),
|
||||||
|
|
||||||
|
loadConfig: function loadConfig(documentURL) {
|
||||||
|
|
||||||
|
for each (let config in this.configs) {
|
||||||
|
if (documentURL)
|
||||||
|
config = config.overlays && config.overlays[documentURL] || {};
|
||||||
|
|
||||||
|
for (let [name, value] in Iterator(config)) {
|
||||||
|
let prop = util.camelCase(name);
|
||||||
|
|
||||||
|
if (isArray(this[prop]))
|
||||||
|
this[prop] = [].concat(this[prop], value);
|
||||||
|
else if (isObject(this[prop])) {
|
||||||
|
if (isArray(value))
|
||||||
|
value = Set(value);
|
||||||
|
|
||||||
|
this[prop] = update({}, this[prop],
|
||||||
|
iter([util.camelCase(k), value[k]]
|
||||||
|
for (k in value)).toObject());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
this[prop] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
modules: {
|
modules: {
|
||||||
global: ["addons",
|
global: ["addons",
|
||||||
"base",
|
"base",
|
||||||
@@ -149,6 +184,8 @@ var ConfigBase = Class("ConfigBase", {
|
|||||||
AddonManager.getAddonByID(this.addonID);
|
AddonManager.getAddonByID(this.addonID);
|
||||||
}),
|
}),
|
||||||
|
|
||||||
|
get styleableChrome() Object.keys(this.overlays),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The current application locale.
|
* The current application locale.
|
||||||
*/
|
*/
|
||||||
@@ -398,8 +435,9 @@ var ConfigBase = Class("ConfigBase", {
|
|||||||
this.helpCSS = true;
|
this.helpCSS = true;
|
||||||
},
|
},
|
||||||
|
|
||||||
Local: function Local(dactyl, modules, window) ({
|
Local: function Local(dactyl, modules, { document, window }) ({
|
||||||
init: function init() {
|
init: function init() {
|
||||||
|
this.loadConfig(document.documentURI);
|
||||||
|
|
||||||
let append = <e4x xmlns={XUL} xmlns:dactyl={NS}>
|
let append = <e4x xmlns={XUL} xmlns:dactyl={NS}>
|
||||||
<menupopup id="viewSidebarMenu"/>
|
<menupopup id="viewSidebarMenu"/>
|
||||||
@@ -418,6 +456,14 @@ var ConfigBase = Class("ConfigBase", {
|
|||||||
util.overlayWindow(window, { append: append.elements() });
|
util.overlayWindow(window, { append: append.elements() });
|
||||||
},
|
},
|
||||||
|
|
||||||
|
get window() window,
|
||||||
|
|
||||||
|
get document() document,
|
||||||
|
|
||||||
|
ids: Class.Update({
|
||||||
|
get commandContainer() document.documentElement.id
|
||||||
|
}),
|
||||||
|
|
||||||
browser: Class.Memoize(function () window.gBrowser),
|
browser: Class.Memoize(function () window.gBrowser),
|
||||||
tabbrowser: Class.Memoize(function () window.gBrowser),
|
tabbrowser: Class.Memoize(function () window.gBrowser),
|
||||||
|
|
||||||
@@ -426,7 +472,7 @@ var ConfigBase = Class("ConfigBase", {
|
|||||||
/**
|
/**
|
||||||
* @property {string} The ID of the application's main XUL window.
|
* @property {string} The ID of the application's main XUL window.
|
||||||
*/
|
*/
|
||||||
mainWindowId: window.document.documentElement.id,
|
mainWindowId: document.documentElement.id,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @property {number} The height (px) that is available to the output
|
* @property {number} The height (px) that is available to the output
|
||||||
@@ -434,7 +480,7 @@ var ConfigBase = Class("ConfigBase", {
|
|||||||
*/
|
*/
|
||||||
get outputHeight() this.browser.mPanelContainer.boxObject.height,
|
get outputHeight() this.browser.mPanelContainer.boxObject.height,
|
||||||
|
|
||||||
tabStrip: Class.Memoize(function () window.document.getElementById("TabsToolbar") || this.tabbrowser.mTabContainer),
|
tabStrip: Class.Memoize(function () document.getElementById("TabsToolbar") || this.tabbrowser.mTabContainer),
|
||||||
}),
|
}),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -448,45 +494,15 @@ var ConfigBase = Class("ConfigBase", {
|
|||||||
* @property {Object} A map of :command-complete option values to completer
|
* @property {Object} A map of :command-complete option values to completer
|
||||||
* function names.
|
* function names.
|
||||||
*/
|
*/
|
||||||
completers: {
|
completers: {},
|
||||||
abbreviation: "abbreviation",
|
|
||||||
altstyle: "alternateStyleSheet",
|
|
||||||
bookmark: "bookmark",
|
|
||||||
buffer: "buffer",
|
|
||||||
charset: "charset",
|
|
||||||
color: "colorScheme",
|
|
||||||
command: "command",
|
|
||||||
dialog: "dialog",
|
|
||||||
dir: "directory",
|
|
||||||
environment: "environment",
|
|
||||||
event: "autocmdEvent",
|
|
||||||
extension: "extension",
|
|
||||||
file: "file",
|
|
||||||
help: "help",
|
|
||||||
highlight: "highlightGroup",
|
|
||||||
history: "history",
|
|
||||||
javascript: "javascript",
|
|
||||||
macro: "macro",
|
|
||||||
mapping: "userMapping",
|
|
||||||
mark: "mark",
|
|
||||||
menu: "menuItem",
|
|
||||||
option: "option",
|
|
||||||
preference: "preference",
|
|
||||||
qmark: "quickmark",
|
|
||||||
runtime: "runtime",
|
|
||||||
search: "search",
|
|
||||||
shellcmd: "shellCommand",
|
|
||||||
toolbar: "toolbar",
|
|
||||||
url: "url",
|
|
||||||
usercommand: "userCommand"
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @property {Object} Application specific defaults for option values. The
|
* @property {Object} Application specific defaults for option values. The
|
||||||
* property names must be the options' canonical names, and the values
|
* property names must be the options' canonical names, and the values
|
||||||
* must be strings as entered via :set.
|
* must be strings as entered via :set.
|
||||||
*/
|
*/
|
||||||
defaults: { guioptions: "rb" },
|
optionDefaults: {},
|
||||||
|
|
||||||
cleanups: {},
|
cleanups: {},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -517,8 +533,6 @@ var ConfigBase = Class("ConfigBase", {
|
|||||||
|
|
||||||
guioptions: {},
|
guioptions: {},
|
||||||
|
|
||||||
hasTabbrowser: false,
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @property {string} The name of the application that hosts the
|
* @property {string} The name of the application that hosts the
|
||||||
* extension. E.g., "Firefox" or "XULRunner".
|
* extension. E.g., "Firefox" or "XULRunner".
|
||||||
@@ -551,525 +565,11 @@ var ConfigBase = Class("ConfigBase", {
|
|||||||
* @property {string} The default highlighting rules.
|
* @property {string} The default highlighting rules.
|
||||||
* See {@link Highlights#loadCSS} for details.
|
* See {@link Highlights#loadCSS} for details.
|
||||||
*/
|
*/
|
||||||
CSS: UTF8(String.replace(<><![CDATA[
|
CSS: Class.Memoize(function () File.readURL("resource://dactyl-skin/global-styles.css")),
|
||||||
// <css>
|
|
||||||
Boolean /* JavaScript booleans */ color: red;
|
|
||||||
Function /* JavaScript functions */ color: navy;
|
|
||||||
Null /* JavaScript null values */ color: blue;
|
|
||||||
Number /* JavaScript numbers */ color: blue;
|
|
||||||
Object /* JavaScript objects */ color: maroon;
|
|
||||||
String /* String values */ color: green; white-space: pre;
|
|
||||||
Comment /* JavaScriptor CSS comments */ color: gray;
|
|
||||||
|
|
||||||
Key /* Keywords */ font-weight: bold;
|
helpCSS: Class.Memoize(function () File.readURL("resource://dactyl-skin/help-styles.css"))
|
||||||
|
|
||||||
Enabled /* Enabled item indicator text */ color: blue;
|
|
||||||
Disabled /* Disabled item indicator text */ color: red;
|
|
||||||
|
|
||||||
FontFixed /* The font used for fixed-width text */ \
|
|
||||||
font-family: monospace !important;
|
|
||||||
FontCode /* The font used for code listings */ \
|
|
||||||
font-size: 9pt; font-family: monospace !important;
|
|
||||||
FontProportional /* The font used for proportionally spaced text */ \
|
|
||||||
font-size: 10pt; font-family: "Droid Sans", "Helvetica LT Std", Helvetica, "DejaVu Sans", Verdana, sans-serif !important;
|
|
||||||
|
|
||||||
// Hack to give these groups slightly higher precedence
|
|
||||||
// than their unadorned variants.
|
|
||||||
CmdCmdLine;[dactyl|highlight]>* 
 StatusCmdLine;[dactyl|highlight]>*
|
|
||||||
CmdNormal;[dactyl|highlight] 
 StatusNormal;[dactyl|highlight]
|
|
||||||
CmdErrorMsg;[dactyl|highlight] 
 StatusErrorMsg;[dactyl|highlight]
|
|
||||||
CmdInfoMsg;[dactyl|highlight] 
 StatusInfoMsg;[dactyl|highlight]
|
|
||||||
CmdModeMsg;[dactyl|highlight] 
 StatusModeMsg;[dactyl|highlight]
|
|
||||||
CmdMoreMsg;[dactyl|highlight] 
 StatusMoreMsg;[dactyl|highlight]
|
|
||||||
CmdQuestion;[dactyl|highlight] 
 StatusQuestion;[dactyl|highlight]
|
|
||||||
CmdWarningMsg;[dactyl|highlight] 
 StatusWarningMsg;[dactyl|highlight]
|
|
||||||
|
|
||||||
Normal /* Normal text */ \
|
|
||||||
color: black !important; background: white !important; font-weight: normal !important;
|
|
||||||
StatusNormal /* Normal text in the status line */ \
|
|
||||||
color: inherit !important; background: transparent !important;
|
|
||||||
ErrorMsg /* Error messages */ \
|
|
||||||
color: white !important; background: red !important; font-weight: bold !important;
|
|
||||||
InfoMsg /* Information messages */ \
|
|
||||||
color: black !important; background: white !important;
|
|
||||||
StatusInfoMsg /* Information messages in the status line */ \
|
|
||||||
color: inherit !important; background: transparent !important;
|
|
||||||
LineNr /* The line number of an error */ \
|
|
||||||
color: orange !important; background: white !important;
|
|
||||||
ModeMsg /* The mode indicator */ \
|
|
||||||
color: black !important; background: white !important;
|
|
||||||
StatusModeMsg /* The mode indicator in the status line */ \
|
|
||||||
color: inherit !important; background: transparent !important; padding-right: 1em;
|
|
||||||
MoreMsg /* The indicator that there is more text to view */ \
|
|
||||||
color: green !important; background: white !important;
|
|
||||||
StatusMoreMsg background: transparent !important;
|
|
||||||
Message /* A message as displayed in <ex>:messages</ex> */ \
|
|
||||||
white-space: pre-wrap !important; min-width: 100%; width: 100%; padding-left: 4em; text-indent: -4em; display: block;
|
|
||||||
Message String /* A message as displayed in <ex>:messages</ex> */ \
|
|
||||||
white-space: pre-wrap;
|
|
||||||
NonText /* The <em>~</em> indicators which mark blank lines in the completion list */ \
|
|
||||||
color: blue; background: transparent !important;
|
|
||||||
*Preview /* The completion preview displayed in the &tag.command-line; */ \
|
|
||||||
color: gray;
|
|
||||||
Question /* A prompt for a decision */ \
|
|
||||||
color: green !important; background: white !important; font-weight: bold !important;
|
|
||||||
StatusQuestion /* A prompt for a decision in the status line */ \
|
|
||||||
color: green !important; background: transparent !important;
|
|
||||||
WarningMsg /* A warning message */ \
|
|
||||||
color: red !important; background: white !important;
|
|
||||||
StatusWarningMsg /* A warning message in the status line */ \
|
|
||||||
color: red !important; background: transparent !important;
|
|
||||||
Disabled /* Disabled items */ \
|
|
||||||
color: gray !important;
|
|
||||||
|
|
||||||
CmdLine;>*;;FontFixed /* The command line */ \
|
|
||||||
padding: 1px !important;
|
|
||||||
CmdPrompt;.dactyl-commandline-prompt /* The default styling form the command prompt */
|
|
||||||
CmdInput;.dactyl-commandline-command
|
|
||||||
CmdOutput /* The output of commands executed by <ex>:run</ex> */ \
|
|
||||||
white-space: pre;
|
|
||||||
|
|
||||||
CompGroup /* Item group in completion output */
|
|
||||||
CompGroup:not(:first-of-type) margin-top: .5em;
|
|
||||||
CompGroup:last-of-type padding-bottom: 1.5ex;
|
|
||||||
|
|
||||||
CompTitle /* Completion row titles */ \
|
|
||||||
color: magenta; background: white; font-weight: bold;
|
|
||||||
CompTitle>* padding: 0 .5ex;
|
|
||||||
CompTitleSep /* The element which separates the completion title from its results */ \
|
|
||||||
height: 1px; background: magenta; background: -moz-linear-gradient(60deg, magenta, white);
|
|
||||||
|
|
||||||
CompMsg /* The message which may appear at the top of a group of completion results */ \
|
|
||||||
font-style: italic; margin-left: 16px;
|
|
||||||
|
|
||||||
CompItem /* A single row of output in the completion list */
|
|
||||||
CompItem:nth-child(2n+1) background: rgba(0, 0, 0, .04);
|
|
||||||
CompItem[selected] /* A selected row of completion list */ \
|
|
||||||
background: yellow;
|
|
||||||
CompItem>* padding: 0 .5ex;
|
|
||||||
|
|
||||||
CompIcon /* The favicon of a completion row */ \
|
|
||||||
width: 16px; min-width: 16px; display: inline-block; margin-right: .5ex;
|
|
||||||
CompIcon>img max-width: 16px; max-height: 16px; vertical-align: middle;
|
|
||||||
|
|
||||||
CompResult /* The result column of the completion list */ \
|
|
||||||
width: 36%; padding-right: 1%; overflow: hidden;
|
|
||||||
CompDesc /* The description column of the completion list */ \
|
|
||||||
color: gray; width: 62%; padding-left: 1em;
|
|
||||||
|
|
||||||
CompLess /* The indicator shown when completions may be scrolled up */ \
|
|
||||||
text-align: center; height: 0; line-height: .5ex; padding-top: 1ex;
|
|
||||||
CompLess::after /* The character of indicator shown when completions may be scrolled up */ \
|
|
||||||
content: "⌃";
|
|
||||||
|
|
||||||
CompMore /* The indicator shown when completions may be scrolled down */ \
|
|
||||||
text-align: center; height: .5ex; line-height: .5ex; margin-bottom: -.5ex;
|
|
||||||
CompMore::after /* The character of indicator shown when completions may be scrolled down */ \
|
|
||||||
content: "⌄";
|
|
||||||
|
|
||||||
Dense /* Arbitrary elements which should be packed densely together */\
|
|
||||||
margin-top: 0; margin-bottom: 0;
|
|
||||||
|
|
||||||
EditorEditing;;* /* Text fields for which an external editor is open */ \
|
|
||||||
background-color: #bbb !important; -moz-user-input: none !important; -moz-user-modify: read-only !important;
|
|
||||||
EditorError;;* /* Text fields briefly after an error has occurred running the external editor */ \
|
|
||||||
background: red !important;
|
|
||||||
EditorBlink1;;* /* Text fields briefly after successfully running the external editor, alternated with EditorBlink2 */ \
|
|
||||||
background: yellow !important;
|
|
||||||
EditorBlink2;;* /* Text fields briefly after successfully running the external editor, alternated with EditorBlink1 */
|
|
||||||
|
|
||||||
REPL /* Read-Eval-Print-Loop output */ \
|
|
||||||
overflow: auto; max-height: 40em;
|
|
||||||
REPL-R;;;Question /* Prompts in REPL mode */
|
|
||||||
REPL-E /* Evaled input in REPL mode */ \
|
|
||||||
white-space: pre-wrap;
|
|
||||||
REPL-P /* Evaled output in REPL mode */ \
|
|
||||||
white-space: pre-wrap; margin-bottom: 1em;
|
|
||||||
|
|
||||||
Usage /* Output from the :*usage commands */ \
|
|
||||||
width: 100%;
|
|
||||||
UsageHead /* Headings in output from the :*usage commands */
|
|
||||||
UsageBody /* The body of listings in output from the :*usage commands */
|
|
||||||
UsageItem /* Individual items in output from the :*usage commands */
|
|
||||||
UsageItem:nth-of-type(2n) background: rgba(0, 0, 0, .04);
|
|
||||||
|
|
||||||
Indicator /* The <em>#</em> and <em>%</em> in the <ex>:buffers</ex> list */ \
|
|
||||||
color: blue; width: 1.5em; text-align: center;
|
|
||||||
Filter /* The matching text in a completion list */ \
|
|
||||||
font-weight: bold;
|
|
||||||
|
|
||||||
Keyword /* A bookmark keyword for a URL */ \
|
|
||||||
color: red;
|
|
||||||
Tag /* A bookmark tag for a URL */ \
|
|
||||||
color: blue;
|
|
||||||
|
|
||||||
Link /* A link with additional information shown on hover */ \
|
|
||||||
position: relative; padding-right: 2em;
|
|
||||||
Link:not(:hover)>LinkInfo opacity: 0; left: 0; width: 1px; height: 1px; overflow: hidden;
|
|
||||||
LinkInfo {
|
|
||||||
/* Information shown when hovering over a link */
|
|
||||||
color: black;
|
|
||||||
position: absolute;
|
|
||||||
left: 100%;
|
|
||||||
padding: 1ex;
|
|
||||||
margin: -1ex -1em;
|
|
||||||
background: rgba(255, 255, 255, .8);
|
|
||||||
border-radius: 1ex;
|
|
||||||
}
|
|
||||||
|
|
||||||
StatusLine;;;FontFixed {
|
|
||||||
/* The status bar */
|
|
||||||
-moz-appearance: none !important;
|
|
||||||
font-weight: bold;
|
|
||||||
background: transparent !important;
|
|
||||||
border: 0px !important;
|
|
||||||
padding-right: 0px !important;
|
|
||||||
min-height: 18px !important;
|
|
||||||
text-shadow: none !important;
|
|
||||||
}
|
|
||||||
StatusLineNormal;[dactyl|highlight] /* The status bar for an ordinary web page */ \
|
|
||||||
color: white !important; background: black !important;
|
|
||||||
StatusLineBroken;[dactyl|highlight] /* The status bar for a broken web page */ \
|
|
||||||
color: black !important; background: #FFa0a0 !important; /* light-red */
|
|
||||||
StatusLineSecure;[dactyl|highlight] /* The status bar for a secure web page */ \
|
|
||||||
color: black !important; background: #a0a0FF !important; /* light-blue */
|
|
||||||
StatusLineExtended;[dactyl|highlight] /* The status bar for a secure web page with an Extended Validation (EV) certificate */ \
|
|
||||||
color: black !important; background: #a0FFa0 !important; /* light-green */
|
|
||||||
|
|
||||||
!TabClose;.tab-close-button /* The close button of a browser tab */ \
|
|
||||||
/* The close button of a browser tab */
|
|
||||||
!TabIcon;.tab-icon,.tab-icon-image /* The icon of a browser tab */ \
|
|
||||||
/* The icon of a browser tab */
|
|
||||||
!TabText;.tab-text /* The text of a browser tab */
|
|
||||||
TabNumber /* The number of a browser tab, next to its icon */ \
|
|
||||||
font-weight: bold; margin: 0px; padding-right: .8ex; cursor: default;
|
|
||||||
TabIconNumber {
|
|
||||||
/* The number of a browser tab, over its icon */
|
|
||||||
cursor: default;
|
|
||||||
width: 16px;
|
|
||||||
margin: 0 2px 0 -18px !important;
|
|
||||||
font-weight: bold;
|
|
||||||
color: white;
|
|
||||||
text-align: center;
|
|
||||||
text-shadow: black -1px 0 1px, black 0 1px 1px, black 1px 0 1px, black 0 -1px 1px;
|
|
||||||
}
|
|
||||||
|
|
||||||
Title /* The title of a listing, including <ex>:pageinfo</ex>, <ex>:jumps</ex> */ \
|
|
||||||
color: magenta; font-weight: bold;
|
|
||||||
URL /* A URL */ \
|
|
||||||
text-decoration: none; color: green; background: inherit;
|
|
||||||
URL:hover text-decoration: underline; cursor: pointer;
|
|
||||||
URLExtra /* Extra information about a URL */ \
|
|
||||||
color: gray;
|
|
||||||
|
|
||||||
FrameIndicator;;* {
|
|
||||||
/* The styling applied to briefly indicate the active frame */
|
|
||||||
background-color: red;
|
|
||||||
opacity: 0.5;
|
|
||||||
z-index: 999999;
|
|
||||||
position: fixed;
|
|
||||||
top: 0;
|
|
||||||
bottom: 0;
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
Bell /* &dactyl.appName;’s visual bell */ \
|
|
||||||
background-color: black !important;
|
|
||||||
|
|
||||||
Hint;;* {
|
|
||||||
/* A hint indicator. See <ex>:help hints</ex> */
|
|
||||||
font: bold 10px "Droid Sans Mono", monospace !important;
|
|
||||||
margin: -.2ex;
|
|
||||||
padding: 0 0 0 1px;
|
|
||||||
outline: 1px solid rgba(0, 0, 0, .5);
|
|
||||||
background: rgba(255, 248, 231, .8);
|
|
||||||
color: black;
|
|
||||||
}
|
|
||||||
Hint[active];;* background: rgba(255, 253, 208, .8);
|
|
||||||
Hint::after;;* content: attr(text) !important;
|
|
||||||
HintElem;;* /* The hintable element */ \
|
|
||||||
background-color: yellow !important; color: black !important;
|
|
||||||
HintActive;;* /* The hint element of link which will be followed by <k name="CR"/> */ \
|
|
||||||
background-color: #88FF00 !important; color: black !important;
|
|
||||||
HintImage;;* /* The indicator which floats above hinted images */ \
|
|
||||||
opacity: .5 !important;
|
|
||||||
|
|
||||||
Button /* A button widget */ \
|
|
||||||
display: inline-block; font-weight: bold; cursor: pointer; color: black; text-decoration: none;
|
|
||||||
Button:hover text-decoration: underline;
|
|
||||||
Button[collapsed] visibility: collapse; width: 0;
|
|
||||||
Button::before content: "["; color: gray; text-decoration: none !important;
|
|
||||||
Button::after content: "]"; color: gray; text-decoration: none !important;
|
|
||||||
Button:not([collapsed]) ~ Button:not([collapsed])::before content: "/[";
|
|
||||||
|
|
||||||
Buttons /* A group of buttons */
|
|
||||||
|
|
||||||
DownloadCell /* A table cell in the :downloads manager */ \
|
|
||||||
display: table-cell; padding: 0 1ex;
|
|
||||||
|
|
||||||
Downloads /* The :downloads manager */ \
|
|
||||||
display: table; margin: 0; padding: 0;
|
|
||||||
DownloadHead;;;CompTitle /* A heading in the :downloads manager */ \
|
|
||||||
display: table-row;
|
|
||||||
DownloadHead>*;;;DownloadCell
|
|
||||||
|
|
||||||
Download /* A download in the :downloads manager */ \
|
|
||||||
display: table-row;
|
|
||||||
Download:not([active]) color: gray;
|
|
||||||
Download:nth-child(2n+1) background: rgba(0, 0, 0, .04);
|
|
||||||
|
|
||||||
Download>*;;;DownloadCell
|
|
||||||
DownloadButtons /* A button group in the :downloads manager */
|
|
||||||
DownloadPercent /* The percentage column for a download */
|
|
||||||
DownloadProgress /* The progress column for a download */
|
|
||||||
DownloadProgressHave /* The completed portion of the progress column */
|
|
||||||
DownloadProgressTotal /* The remaining portion of the progress column */
|
|
||||||
DownloadSource /* The download source column for a download */
|
|
||||||
DownloadState /* The download state column for a download */
|
|
||||||
DownloadTime /* The time remaining column for a download */
|
|
||||||
DownloadTitle /* The title column for a download */
|
|
||||||
DownloadTitle>Link>a max-width: 48ex; overflow: hidden; display: inline-block;
|
|
||||||
|
|
||||||
AddonCell /* A cell in tell :addons manager */ \
|
|
||||||
display: table-cell; padding: 0 1ex;
|
|
||||||
|
|
||||||
Addons /* The :addons manager */ \
|
|
||||||
display: table; margin: 0; padding: 0;
|
|
||||||
AddonHead;;;CompTitle /* A heading in the :addons manager */ \
|
|
||||||
display: table-row;
|
|
||||||
AddonHead>*;;;AddonCell
|
|
||||||
|
|
||||||
Addon /* An add-on in the :addons manager */ \
|
|
||||||
display: table-row;
|
|
||||||
Addon:nth-child(2n+1) background: rgba(0, 0, 0, .04);
|
|
||||||
|
|
||||||
Addon>*;;;AddonCell
|
|
||||||
AddonButtons
|
|
||||||
AddonDescription
|
|
||||||
AddonName max-width: 48ex; overflow: hidden;
|
|
||||||
AddonStatus
|
|
||||||
AddonVersion
|
|
||||||
|
|
||||||
// </css>
|
|
||||||
]]></>, /
/g, "\n")),
|
|
||||||
|
|
||||||
helpCSS: UTF8(<><![CDATA[
|
|
||||||
// <css>
|
|
||||||
InlineHelpLink /* A help link shown in the command line or multi-line output area */ \
|
|
||||||
font-size: inherit !important; font-family: inherit !important;
|
|
||||||
|
|
||||||
Help;;;FontProportional /* A help page */ \
|
|
||||||
line-height: 1.4em;
|
|
||||||
|
|
||||||
HelpInclude /* A help page included in the consolidated help listing */ \
|
|
||||||
margin: 2em 0;
|
|
||||||
|
|
||||||
HelpArg;;;FontCode /* A required command argument indicator */ \
|
|
||||||
color: #6A97D4;
|
|
||||||
HelpOptionalArg;;;FontCode /* An optional command argument indicator */ \
|
|
||||||
color: #6A97D4;
|
|
||||||
|
|
||||||
HelpBody /* The body of a help page */ \
|
|
||||||
display: block; margin: 1em auto; max-width: 100ex; padding-bottom: 1em; margin-bottom: 4em; border-bottom-width: 1px;
|
|
||||||
HelpBorder;*;dactyl://help/* /* The styling of bordered elements */ \
|
|
||||||
border-color: silver; border-width: 0px; border-style: solid;
|
|
||||||
HelpCode;;;FontCode /* Code listings */ \
|
|
||||||
display: block; white-space: pre; margin-left: 2em;
|
|
||||||
HelpTT;html|tt;dactyl://help/*;FontCode /* Teletype text */
|
|
||||||
|
|
||||||
HelpDefault;;;FontCode /* The default value of a help item */ \
|
|
||||||
display: inline-block; margin: -1px 1ex 0 0; white-space: pre; vertical-align: text-top;
|
|
||||||
|
|
||||||
HelpDescription /* The description of a help item */ \
|
|
||||||
display: block; clear: right;
|
|
||||||
HelpDescription[short] clear: none;
|
|
||||||
HelpEm;html|em;dactyl://help/* /* Emphasized text */ \
|
|
||||||
font-weight: bold; font-style: normal;
|
|
||||||
|
|
||||||
HelpEx;;;FontCode /* An Ex command */ \
|
|
||||||
display: inline-block; color: #527BBD;
|
|
||||||
|
|
||||||
HelpExample /* An example */ \
|
|
||||||
display: block; margin: 1em 0;
|
|
||||||
HelpExample::before content: "__MSG_help.Example__: "; font-weight: bold;
|
|
||||||
|
|
||||||
HelpInfo /* Arbitrary information about a help item */ \
|
|
||||||
display: block; width: 20em; margin-left: auto;
|
|
||||||
HelpInfoLabel /* The label for a HelpInfo item */ \
|
|
||||||
display: inline-block; width: 6em; color: magenta; font-weight: bold; vertical-align: text-top;
|
|
||||||
HelpInfoValue /* The details for a HelpInfo item */ \
|
|
||||||
display: inline-block; width: 14em; text-decoration: none; vertical-align: text-top;
|
|
||||||
|
|
||||||
HelpItem /* A help item */ \
|
|
||||||
display: block; margin: 1em 1em 1em 10em; clear: both;
|
|
||||||
|
|
||||||
HelpKey;;;FontCode /* A keyboard key specification */ \
|
|
||||||
color: #102663;
|
|
||||||
HelpKeyword /* A keyword */ \
|
|
||||||
font-weight: bold; color: navy;
|
|
||||||
|
|
||||||
HelpLink;html|a;dactyl://help/* /* A hyperlink */ \
|
|
||||||
text-decoration: none !important;
|
|
||||||
HelpLink[href]:hover text-decoration: underline !important;
|
|
||||||
HelpLink[href^="mailto:"]::after content: "✉"; padding-left: .2em;
|
|
||||||
HelpLink[rel=external] {
|
|
||||||
/* A hyperlink to an external resource */
|
|
||||||
/* Thanks, Wikipedia */
|
|
||||||
background: transparent url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAMAAAC67D+PAAAAFVBMVEVmmcwzmcyZzP8AZswAZv////////9E6giVAAAAB3RSTlP///////8AGksDRgAAADhJREFUGFcly0ESAEAEA0Ei6/9P3sEcVB8kmrwFyni0bOeyyDpy9JTLEaOhQq7Ongf5FeMhHS/4AVnsAZubxDVmAAAAAElFTkSuQmCC) no-repeat scroll right center;
|
|
||||||
padding-right: 13px;
|
|
||||||
}
|
|
||||||
|
|
||||||
ErrorMsg HelpEx color: inherit; background: inherit; text-decoration: underline;
|
|
||||||
ErrorMsg HelpKey color: inherit; background: inherit; text-decoration: underline;
|
|
||||||
ErrorMsg HelpOption color: inherit; background: inherit; text-decoration: underline;
|
|
||||||
ErrorMsg HelpTopic color: inherit; background: inherit; text-decoration: underline;
|
|
||||||
|
|
||||||
HelpTOC /* The Table of Contents for a help page */
|
|
||||||
HelpTOC>ol ol margin-left: -1em;
|
|
||||||
|
|
||||||
HelpOrderedList;ol;dactyl://help/* /* Any ordered list */ \
|
|
||||||
margin: 1em 0;
|
|
||||||
HelpOrderedList1;ol[level="1"],ol;dactyl://help/* /* A first-level ordered list */ \
|
|
||||||
list-style: outside decimal; display: block;
|
|
||||||
HelpOrderedList2;ol[level="2"],ol ol;dactyl://help/* /* A second-level ordered list */ \
|
|
||||||
list-style: outside upper-alpha;
|
|
||||||
HelpOrderedList3;ol[level="3"],ol ol ol;dactyl://help/* /* A third-level ordered list */ \
|
|
||||||
list-style: outside lower-roman;
|
|
||||||
HelpOrderedList4;ol[level="4"],ol ol ol ol;dactyl://help/* /* A fourth-level ordered list */ \
|
|
||||||
list-style: outside decimal;
|
|
||||||
|
|
||||||
HelpList;html|ul;dactyl://help/* /* An unordered list */ \
|
|
||||||
display: block; list-style-position: outside; margin: 1em 0;
|
|
||||||
HelpListItem;html|li;dactyl://help/* /* A list item, ordered or unordered */ \
|
|
||||||
display: list-item;
|
|
||||||
|
|
||||||
HelpNote /* The indicator for a note */ \
|
|
||||||
color: red; font-weight: bold;
|
|
||||||
|
|
||||||
HelpOpt;;;FontCode /* An option name */ \
|
|
||||||
color: #106326;
|
|
||||||
HelpOptInfo;;;FontCode /* Information about the type and default values for an option entry */ \
|
|
||||||
display: block; margin-bottom: 1ex; padding-left: 4em;
|
|
||||||
|
|
||||||
HelpParagraph;html|p;dactyl://help/* /* An ordinary paragraph */ \
|
|
||||||
display: block; margin: 1em 0em;
|
|
||||||
HelpParagraph:first-child margin-top: 0;
|
|
||||||
HelpParagraph:last-child margin-bottom: 0;
|
|
||||||
HelpSpec;;;FontCode /* The specification for a help entry */ \
|
|
||||||
display: block; margin-left: -10em; float: left; clear: left; color: #527BBD; margin-right: 1em;
|
|
||||||
|
|
||||||
HelpString;;;FontCode /* A quoted string */ \
|
|
||||||
color: green; font-weight: normal;
|
|
||||||
HelpString::before content: '"';
|
|
||||||
HelpString::after content: '"';
|
|
||||||
HelpString[delim]::before content: attr(delim);
|
|
||||||
HelpString[delim]::after content: attr(delim);
|
|
||||||
|
|
||||||
HelpNews /* A news item */ position: relative;
|
|
||||||
HelpNewsOld /* An old news item */ opacity: .7;
|
|
||||||
HelpNewsNew /* A new news item */ font-style: italic;
|
|
||||||
HelpNewsTag /* The version tag for a news item */ \
|
|
||||||
font-style: normal; position: absolute; left: 100%; padding-left: 1em; color: #527BBD; opacity: .6; white-space: pre;
|
|
||||||
|
|
||||||
HelpHead;html|h1,html|h2,html|h3,html|h4;dactyl://help/* {
|
|
||||||
/* Any help heading */
|
|
||||||
font-weight: bold;
|
|
||||||
color: #527BBD;
|
|
||||||
clear: both;
|
|
||||||
}
|
|
||||||
HelpHead1;html|h1;dactyl://help/* {
|
|
||||||
/* A first-level help heading */
|
|
||||||
margin: 2em 0 1em;
|
|
||||||
padding-bottom: .2ex;
|
|
||||||
border-bottom-width: 1px;
|
|
||||||
font-size: 2em;
|
|
||||||
}
|
|
||||||
HelpHead2;html|h2;dactyl://help/* {
|
|
||||||
/* A second-level help heading */
|
|
||||||
margin: 2em 0 1em;
|
|
||||||
padding-bottom: .2ex;
|
|
||||||
border-bottom-width: 1px;
|
|
||||||
font-size: 1.2em;
|
|
||||||
}
|
|
||||||
HelpHead3;html|h3;dactyl://help/* {
|
|
||||||
/* A third-level help heading */
|
|
||||||
margin: 1em 0;
|
|
||||||
padding-bottom: .2ex;
|
|
||||||
font-size: 1.1em;
|
|
||||||
}
|
|
||||||
HelpHead4;html|h4;dactyl://help/* {
|
|
||||||
/* A fourth-level help heading */
|
|
||||||
}
|
|
||||||
|
|
||||||
HelpTab;html|dl;dactyl://help/* {
|
|
||||||
/* A description table */
|
|
||||||
display: table;
|
|
||||||
width: 100%;
|
|
||||||
margin: 1em 0;
|
|
||||||
border-bottom-width: 1px;
|
|
||||||
border-top-width: 1px;
|
|
||||||
padding: .5ex 0;
|
|
||||||
table-layout: fixed;
|
|
||||||
}
|
|
||||||
HelpTabColumn;html|column;dactyl://help/* display: table-column;
|
|
||||||
HelpTabColumn:first-child width: 25%;
|
|
||||||
HelpTabTitle;html|dt;dactyl://help/*;FontCode /* The title column of description tables */ \
|
|
||||||
display: table-cell; padding: .1ex 1ex; font-weight: bold;
|
|
||||||
HelpTabDescription;html|dd;dactyl://help/* /* The description column of description tables */ \
|
|
||||||
display: table-cell; padding: .3ex 1em; text-indent: -1em; border-width: 0px;
|
|
||||||
HelpTabDescription>*;;dactyl://help/* text-indent: 0;
|
|
||||||
HelpTabRow;html|dl>html|tr;dactyl://help/* /* Entire rows in description tables */ \
|
|
||||||
display: table-row;
|
|
||||||
|
|
||||||
HelpTag;;;FontCode /* A help tag */ \
|
|
||||||
display: inline-block; color: #527BBD; margin-left: 1ex; font-weight: normal;
|
|
||||||
HelpTags /* A group of help tags */ \
|
|
||||||
display: block; float: right; clear: right;
|
|
||||||
HelpTopic;;;FontCode /* A link to a help topic */ \
|
|
||||||
color: #102663;
|
|
||||||
HelpType;;;FontCode /* An option type */ \
|
|
||||||
color: #102663 !important; margin-right: 2ex;
|
|
||||||
|
|
||||||
HelpWarning /* The indicator for a warning */ \
|
|
||||||
color: red; font-weight: bold;
|
|
||||||
|
|
||||||
HelpXML;;;FontCode {
|
|
||||||
/* Highlighted XML */
|
|
||||||
white-space: pre;
|
|
||||||
display: inline-block;
|
|
||||||
color: #C5F779;
|
|
||||||
background-color: #444444;
|
|
||||||
border: 1px dashed #aaaaaa;
|
|
||||||
font-family: Terminus, Fixed, monospace;
|
|
||||||
}
|
|
||||||
HelpXMLBlock;;;HelpXML {
|
|
||||||
display: block;
|
|
||||||
margin-left: 2em;
|
|
||||||
}
|
|
||||||
HelpXMLAttribute color: #C5F779;
|
|
||||||
HelpXMLAttribute::after color: #E5E5E5; content: "=";
|
|
||||||
HelpXMLComment color: #444444;
|
|
||||||
HelpXMLComment::before content: "<!--";
|
|
||||||
HelpXMLComment::after content: "-->";
|
|
||||||
HelpXMLProcessing color: #C5F779;
|
|
||||||
HelpXMLProcessing::before color: #444444; content: "<?";
|
|
||||||
HelpXMLProcessing::after color: #444444; content: "?>";
|
|
||||||
HelpXMLString color: #C5F779; white-space: pre;
|
|
||||||
HelpXMLString::before content: '"';
|
|
||||||
HelpXMLString::after content: '"';
|
|
||||||
HelpXMLNamespace color: #FFF796;
|
|
||||||
HelpXMLNamespace::after color: #777777; content: ":";
|
|
||||||
HelpXMLTagStart color: #FFF796; white-space: normal; display: inline-block; text-indent: -1.5em; padding-left: 1.5em;
|
|
||||||
HelpXMLTagEnd color: #71BEBE;
|
|
||||||
HelpXMLText color: #E5E5E5;
|
|
||||||
|
|
||||||
CompItem HelpXMLTagStart white-space: pre;
|
|
||||||
// </css>
|
|
||||||
]]></>)
|
|
||||||
}, {
|
}, {
|
||||||
});
|
});
|
||||||
|
|
||||||
JSMLoader.loadSubScript("resource://dactyl-local-content/config.js", this);
|
JSMLoader.loadSubScript("resource://dactyl-local-content/config.js", this);
|
||||||
|
|
||||||
config.INIT = update(Object.create(config.INIT), config.INIT, {
|
config.INIT = update(Object.create(config.INIT), config.INIT, {
|
||||||
|
|||||||
@@ -168,7 +168,7 @@ var Modules = function Modules(window) {
|
|||||||
|
|
||||||
config.loadStyles();
|
config.loadStyles();
|
||||||
|
|
||||||
overlay.overlayWindow(config.overlayChrome, function _overlay(window) ({
|
overlay.overlayWindow(Object.keys(config.overlays), function _overlay(window) ({
|
||||||
ready: function onInit(document) {
|
ready: function onInit(document) {
|
||||||
const modules = Modules(window);
|
const modules = Modules(window);
|
||||||
window.dactyl = { modules: modules };
|
window.dactyl = { modules: modules };
|
||||||
|
|||||||
@@ -53,8 +53,8 @@ var Option = Class("Option", {
|
|||||||
if (extraInfo)
|
if (extraInfo)
|
||||||
this.update(extraInfo);
|
this.update(extraInfo);
|
||||||
|
|
||||||
if (Set.has(this.modules.config.defaults, this.name))
|
if (Set.has(this.modules.config.optionDefaults, this.name))
|
||||||
defaultValue = this.modules.config.defaults[this.name];
|
defaultValue = this.modules.config.optionDefaults[this.name];
|
||||||
|
|
||||||
if (defaultValue == null && this.getter)
|
if (defaultValue == null && this.getter)
|
||||||
defaultValue = this.getter();
|
defaultValue = this.getter();
|
||||||
|
|||||||
@@ -12,14 +12,14 @@
|
|||||||
// FIXME:
|
// FIXME:
|
||||||
// - finish 1.9.0 support if we're going to support sanitizing in Melodactyl
|
// - finish 1.9.0 support if we're going to support sanitizing in Melodactyl
|
||||||
|
|
||||||
try {
|
|
||||||
|
|
||||||
Components.utils.import("resource://dactyl/bootstrap.jsm");
|
Components.utils.import("resource://dactyl/bootstrap.jsm");
|
||||||
defineModule("sanitizer", {
|
defineModule("sanitizer", {
|
||||||
exports: ["Range", "Sanitizer", "sanitizer"],
|
exports: ["Range", "Sanitizer", "sanitizer"],
|
||||||
require: ["messages", "prefs", "services", "storage", "template", "util"]
|
require: ["config", "prefs", "services", "storage", "template", "util"]
|
||||||
}, this);
|
}, this);
|
||||||
|
|
||||||
|
this.lazyRequire("messages", ["_"]);
|
||||||
|
|
||||||
let tmp = {};
|
let tmp = {};
|
||||||
JSMLoader.loadSubScript("chrome://browser/content/sanitize.js", tmp);
|
JSMLoader.loadSubScript("chrome://browser/content/sanitize.js", tmp);
|
||||||
tmp.Sanitizer.prototype.__proto__ = Class.prototype;
|
tmp.Sanitizer.prototype.__proto__ = Class.prototype;
|
||||||
@@ -705,6 +705,6 @@ var Sanitizer = Module("sanitizer", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakRef
|
|||||||
|
|
||||||
endModule();
|
endModule();
|
||||||
|
|
||||||
} catch(e){dump(e.fileName+":"+e.lineNumber+": "+e+"\n" + e.stack);}
|
// catch(e){dump(e.fileName+":"+e.lineNumber+": "+e+"\n" + e.stack);}
|
||||||
|
|
||||||
// vim: set fdm=marker sw=4 ts=4 et ft=javascript:
|
// vim: set fdm=marker sw=4 ts=4 et ft=javascript:
|
||||||
|
|||||||
@@ -536,7 +536,7 @@ var File = Class("File", {
|
|||||||
|
|
||||||
pathSplit: Class.Memoize(function () util.regexp("(?:/|" + util.regexp.escape(this.PATH_SEP) + ")", "g")),
|
pathSplit: Class.Memoize(function () util.regexp("(?:/|" + util.regexp.escape(this.PATH_SEP) + ")", "g")),
|
||||||
|
|
||||||
DoesNotExist: function (path, error) ({
|
DoesNotExist: function DoesNotExist(path, error) ({
|
||||||
path: path,
|
path: path,
|
||||||
exists: function () false,
|
exists: function () false,
|
||||||
__noSuchMethod__: function () { throw error || Error("Does not exist"); }
|
__noSuchMethod__: function () { throw error || Error("Does not exist"); }
|
||||||
@@ -559,7 +559,7 @@ var File = Class("File", {
|
|||||||
* @param {boolean} relative Whether the path is relative or absolute.
|
* @param {boolean} relative Whether the path is relative or absolute.
|
||||||
* @returns {string}
|
* @returns {string}
|
||||||
*/
|
*/
|
||||||
expandPath: function (path, relative) {
|
expandPath: function expandPath(path, relative) {
|
||||||
function getenv(name) services.environment.get(name);
|
function getenv(name) services.environment.get(name);
|
||||||
|
|
||||||
// expand any $ENV vars - this is naive but so is Vim and we like to be compatible
|
// expand any $ENV vars - this is naive but so is Vim and we like to be compatible
|
||||||
@@ -595,7 +595,13 @@ var File = Class("File", {
|
|||||||
|
|
||||||
expandPathList: function (list) list.map(this.expandPath),
|
expandPathList: function (list) list.map(this.expandPath),
|
||||||
|
|
||||||
readStream: function (ifstream, encoding) {
|
readURL: function readURL(url, encoding) {
|
||||||
|
let channel = services.io.newChannel(url, null, null);
|
||||||
|
channel.contentType = "text/plain";
|
||||||
|
return this.readStream(channel.open(), encoding);
|
||||||
|
},
|
||||||
|
|
||||||
|
readStream: function readStream(ifstream, encoding) {
|
||||||
try {
|
try {
|
||||||
var icstream = services.CharsetStream(
|
var icstream = services.CharsetStream(
|
||||||
ifstream, encoding || File.defaultEncoding, 4096, // buffer size
|
ifstream, encoding || File.defaultEncoding, 4096, // buffer size
|
||||||
@@ -613,7 +619,7 @@ var File = Class("File", {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
readLines: function (ifstream, encoding) {
|
readLines: function readLines(ifstream, encoding) {
|
||||||
try {
|
try {
|
||||||
var icstream = services.CharsetStream(
|
var icstream = services.CharsetStream(
|
||||||
ifstream, encoding || File.defaultEncoding, 4096, // buffer size
|
ifstream, encoding || File.defaultEncoding, 4096, // buffer size
|
||||||
@@ -630,7 +636,7 @@ var File = Class("File", {
|
|||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
isAbsolutePath: function (path) {
|
isAbsolutePath: function isAbsolutePath(path) {
|
||||||
try {
|
try {
|
||||||
services.File().initWithPath(path);
|
services.File().initWithPath(path);
|
||||||
return true;
|
return true;
|
||||||
@@ -640,7 +646,7 @@ var File = Class("File", {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
joinPaths: function (head, tail, cwd) {
|
joinPaths: function joinPaths(head, tail, cwd) {
|
||||||
let path = this(head, cwd);
|
let path = this(head, cwd);
|
||||||
try {
|
try {
|
||||||
// FIXME: should only expand environment vars and normalize path separators
|
// FIXME: should only expand environment vars and normalize path separators
|
||||||
|
|||||||
309
common/skin/global-styles.css
Normal file
309
common/skin/global-styles.css
Normal file
@@ -0,0 +1,309 @@
|
|||||||
|
|
||||||
|
Boolean /* JavaScript booleans */ color: red;
|
||||||
|
Function /* JavaScript functions */ color: navy;
|
||||||
|
Null /* JavaScript null values */ color: blue;
|
||||||
|
Number /* JavaScript numbers */ color: blue;
|
||||||
|
Object /* JavaScript objects */ color: maroon;
|
||||||
|
String /* String values */ color: green; white-space: pre;
|
||||||
|
Comment /* JavaScriptor CSS comments */ color: gray;
|
||||||
|
|
||||||
|
Key /* Keywords */ font-weight: bold;
|
||||||
|
|
||||||
|
Enabled /* Enabled item indicator text */ color: blue;
|
||||||
|
Disabled /* Disabled item indicator text */ color: red;
|
||||||
|
|
||||||
|
FontFixed /* The font used for fixed-width text */ \
|
||||||
|
font-family: monospace !important;
|
||||||
|
FontCode /* The font used for code listings */ \
|
||||||
|
font-size: 9pt; font-family: monospace !important;
|
||||||
|
FontProportional /* The font used for proportionally spaced text */ \
|
||||||
|
font-size: 10pt; font-family: "Droid Sans", "Helvetica LT Std", Helvetica, "DejaVu Sans", Verdana, sans-serif !important;
|
||||||
|
|
||||||
|
// Hack to give these groups slightly higher precedence
|
||||||
|
// than their unadorned variants.
|
||||||
|
CmdCmdLine;[dactyl|highlight]>*
|
||||||
|
CmdErrorMsg;[dactyl|highlight]
|
||||||
|
CmdInfoMsg;[dactyl|highlight]
|
||||||
|
CmdModeMsg;[dactyl|highlight]
|
||||||
|
CmdMoreMsg;[dactyl|highlight]
|
||||||
|
CmdNormal;[dactyl|highlight]
|
||||||
|
CmdQuestion;[dactyl|highlight]
|
||||||
|
CmdWarningMsg;[dactyl|highlight]
|
||||||
|
|
||||||
|
StatusCmdLine;[dactyl|highlight]>*
|
||||||
|
StatusErrorMsg;[dactyl|highlight]
|
||||||
|
StatusInfoMsg;[dactyl|highlight]
|
||||||
|
StatusModeMsg;[dactyl|highlight]
|
||||||
|
StatusMoreMsg;[dactyl|highlight]
|
||||||
|
StatusNormal;[dactyl|highlight]
|
||||||
|
StatusQuestion;[dactyl|highlight]
|
||||||
|
StatusWarningMsg;[dactyl|highlight]
|
||||||
|
|
||||||
|
Normal /* Normal text */ \
|
||||||
|
color: black !important; background: white !important; font-weight: normal !important;
|
||||||
|
StatusNormal /* Normal text in the status line */ \
|
||||||
|
color: inherit !important; background: transparent !important;
|
||||||
|
ErrorMsg /* Error messages */ \
|
||||||
|
color: white !important; background: red !important; font-weight: bold !important;
|
||||||
|
InfoMsg /* Information messages */ \
|
||||||
|
color: black !important; background: white !important;
|
||||||
|
StatusInfoMsg /* Information messages in the status line */ \
|
||||||
|
color: inherit !important; background: transparent !important;
|
||||||
|
LineNr /* The line number of an error */ \
|
||||||
|
color: orange !important; background: white !important;
|
||||||
|
ModeMsg /* The mode indicator */ \
|
||||||
|
color: black !important; background: white !important;
|
||||||
|
StatusModeMsg /* The mode indicator in the status line */ \
|
||||||
|
color: inherit !important; background: transparent !important; padding-right: 1em;
|
||||||
|
MoreMsg /* The indicator that there is more text to view */ \
|
||||||
|
color: green !important; background: white !important;
|
||||||
|
StatusMoreMsg background: transparent !important;
|
||||||
|
Message /* A message as displayed in <ex>:messages</ex> */ \
|
||||||
|
white-space: pre-wrap !important; min-width: 100%; width: 100%; padding-left: 4em; text-indent: -4em; display: block;
|
||||||
|
Message String /* A message as displayed in <ex>:messages</ex> */ \
|
||||||
|
white-space: pre-wrap;
|
||||||
|
NonText /* The <em>~</em> indicators which mark blank lines in the completion list */ \
|
||||||
|
color: blue; background: transparent !important;
|
||||||
|
*Preview /* The completion preview displayed in the &tag.command-line; */ \
|
||||||
|
color: gray;
|
||||||
|
Question /* A prompt for a decision */ \
|
||||||
|
color: green !important; background: white !important; font-weight: bold !important;
|
||||||
|
StatusQuestion /* A prompt for a decision in the status line */ \
|
||||||
|
color: green !important; background: transparent !important;
|
||||||
|
WarningMsg /* A warning message */ \
|
||||||
|
color: red !important; background: white !important;
|
||||||
|
StatusWarningMsg /* A warning message in the status line */ \
|
||||||
|
color: red !important; background: transparent !important;
|
||||||
|
Disabled /* Disabled items */ \
|
||||||
|
color: gray !important;
|
||||||
|
|
||||||
|
CmdLine;>*;;FontFixed /* The command line */ \
|
||||||
|
padding: 1px !important;
|
||||||
|
CmdPrompt;.dactyl-commandline-prompt /* The default styling form the command prompt */
|
||||||
|
CmdInput;.dactyl-commandline-command
|
||||||
|
CmdOutput /* The output of commands executed by <ex>:run</ex> */ \
|
||||||
|
white-space: pre;
|
||||||
|
|
||||||
|
CompGroup /* Item group in completion output */
|
||||||
|
CompGroup:not(:first-of-type) margin-top: .5em;
|
||||||
|
CompGroup:last-of-type padding-bottom: 1.5ex;
|
||||||
|
|
||||||
|
CompTitle /* Completion row titles */ \
|
||||||
|
color: magenta; background: white; font-weight: bold;
|
||||||
|
CompTitle>* padding: 0 .5ex;
|
||||||
|
CompTitleSep /* The element which separates the completion title from its results */ \
|
||||||
|
height: 1px; background: magenta; background: -moz-linear-gradient(60deg, magenta, white);
|
||||||
|
|
||||||
|
CompMsg /* The message which may appear at the top of a group of completion results */ \
|
||||||
|
font-style: italic; margin-left: 16px;
|
||||||
|
|
||||||
|
CompItem /* A single row of output in the completion list */
|
||||||
|
CompItem:nth-child(2n+1) background: rgba(0, 0, 0, .04);
|
||||||
|
CompItem[selected] /* A selected row of completion list */ \
|
||||||
|
background: yellow;
|
||||||
|
CompItem>* padding: 0 .5ex;
|
||||||
|
|
||||||
|
CompIcon /* The favicon of a completion row */ \
|
||||||
|
width: 16px; min-width: 16px; display: inline-block; margin-right: .5ex;
|
||||||
|
CompIcon>img max-width: 16px; max-height: 16px; vertical-align: middle;
|
||||||
|
|
||||||
|
CompResult /* The result column of the completion list */ \
|
||||||
|
width: 36%; padding-right: 1%; overflow: hidden;
|
||||||
|
CompDesc /* The description column of the completion list */ \
|
||||||
|
color: gray; width: 62%; padding-left: 1em;
|
||||||
|
|
||||||
|
CompLess /* The indicator shown when completions may be scrolled up */ \
|
||||||
|
text-align: center; height: 0; line-height: .5ex; padding-top: 1ex;
|
||||||
|
CompLess::after /* The character of indicator shown when completions may be scrolled up */ \
|
||||||
|
content: "⌃";
|
||||||
|
|
||||||
|
CompMore /* The indicator shown when completions may be scrolled down */ \
|
||||||
|
text-align: center; height: .5ex; line-height: .5ex; margin-bottom: -.5ex;
|
||||||
|
CompMore::after /* The character of indicator shown when completions may be scrolled down */ \
|
||||||
|
content: "⌄";
|
||||||
|
|
||||||
|
Dense /* Arbitrary elements which should be packed densely together */\
|
||||||
|
margin-top: 0; margin-bottom: 0;
|
||||||
|
|
||||||
|
EditorEditing;;* /* Text fields for which an external editor is open */ \
|
||||||
|
background-color: #bbb !important; -moz-user-input: none !important; -moz-user-modify: read-only !important;
|
||||||
|
EditorError;;* /* Text fields briefly after an error has occurred running the external editor */ \
|
||||||
|
background: red !important;
|
||||||
|
EditorBlink1;;* /* Text fields briefly after successfully running the external editor, alternated with EditorBlink2 */ \
|
||||||
|
background: yellow !important;
|
||||||
|
EditorBlink2;;* /* Text fields briefly after successfully running the external editor, alternated with EditorBlink1 */
|
||||||
|
|
||||||
|
REPL /* Read-Eval-Print-Loop output */ \
|
||||||
|
overflow: auto; max-height: 40em;
|
||||||
|
REPL-R;;;Question /* Prompts in REPL mode */
|
||||||
|
REPL-E /* Evaled input in REPL mode */ \
|
||||||
|
white-space: pre-wrap;
|
||||||
|
REPL-P /* Evaled output in REPL mode */ \
|
||||||
|
white-space: pre-wrap; margin-bottom: 1em;
|
||||||
|
|
||||||
|
Usage /* Output from the :*usage commands */ \
|
||||||
|
width: 100%;
|
||||||
|
UsageHead /* Headings in output from the :*usage commands */
|
||||||
|
UsageBody /* The body of listings in output from the :*usage commands */
|
||||||
|
UsageItem /* Individual items in output from the :*usage commands */
|
||||||
|
UsageItem:nth-of-type(2n) background: rgba(0, 0, 0, .04);
|
||||||
|
|
||||||
|
Indicator /* The <em>#</em> and <em>%</em> in the <ex>:buffers</ex> list */ \
|
||||||
|
color: blue; width: 1.5em; text-align: center;
|
||||||
|
Filter /* The matching text in a completion list */ \
|
||||||
|
font-weight: bold;
|
||||||
|
|
||||||
|
Keyword /* A bookmark keyword for a URL */ \
|
||||||
|
color: red;
|
||||||
|
Tag /* A bookmark tag for a URL */ \
|
||||||
|
color: blue;
|
||||||
|
|
||||||
|
Link /* A link with additional information shown on hover */ \
|
||||||
|
position: relative; padding-right: 2em;
|
||||||
|
Link:not(:hover)>LinkInfo opacity: 0; left: 0; width: 1px; height: 1px; overflow: hidden;
|
||||||
|
LinkInfo {
|
||||||
|
/* Information shown when hovering over a link */
|
||||||
|
color: black;
|
||||||
|
position: absolute;
|
||||||
|
left: 100%;
|
||||||
|
padding: 1ex;
|
||||||
|
margin: -1ex -1em;
|
||||||
|
background: rgba(255, 255, 255, .8);
|
||||||
|
border-radius: 1ex;
|
||||||
|
}
|
||||||
|
|
||||||
|
StatusLine;;;FontFixed {
|
||||||
|
/* The status bar */
|
||||||
|
-moz-appearance: none !important;
|
||||||
|
font-weight: bold;
|
||||||
|
background: transparent !important;
|
||||||
|
border: 0px !important;
|
||||||
|
padding-right: 0px !important;
|
||||||
|
min-height: 18px !important;
|
||||||
|
text-shadow: none !important;
|
||||||
|
}
|
||||||
|
StatusLineNormal;[dactyl|highlight] /* The status bar for an ordinary web page */ \
|
||||||
|
color: white !important; background: black !important;
|
||||||
|
StatusLineBroken;[dactyl|highlight] /* The status bar for a broken web page */ \
|
||||||
|
color: black !important; background: #FFa0a0 !important; /* light-red */
|
||||||
|
StatusLineSecure;[dactyl|highlight] /* The status bar for a secure web page */ \
|
||||||
|
color: black !important; background: #a0a0FF !important; /* light-blue */
|
||||||
|
StatusLineExtended;[dactyl|highlight] /* The status bar for a secure web page with an Extended Validation (EV) certificate */ \
|
||||||
|
color: black !important; background: #a0FFa0 !important; /* light-green */
|
||||||
|
|
||||||
|
!TabClose;.tab-close-button /* The close button of a browser tab */ \
|
||||||
|
/* The close button of a browser tab */
|
||||||
|
!TabIcon;.tab-icon,.tab-icon-image /* The icon of a browser tab */ \
|
||||||
|
/* The icon of a browser tab */
|
||||||
|
!TabText;.tab-text /* The text of a browser tab */
|
||||||
|
TabNumber /* The number of a browser tab, next to its icon */ \
|
||||||
|
font-weight: bold; margin: 0px; padding-right: .8ex; cursor: default;
|
||||||
|
TabIconNumber {
|
||||||
|
/* The number of a browser tab, over its icon */
|
||||||
|
cursor: default;
|
||||||
|
width: 16px;
|
||||||
|
margin: 0 2px 0 -18px !important;
|
||||||
|
font-weight: bold;
|
||||||
|
color: white;
|
||||||
|
text-align: center;
|
||||||
|
text-shadow: black -1px 0 1px, black 0 1px 1px, black 1px 0 1px, black 0 -1px 1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
Title /* The title of a listing, including <ex>:pageinfo</ex>, <ex>:jumps</ex> */ \
|
||||||
|
color: magenta; font-weight: bold;
|
||||||
|
URL /* A URL */ \
|
||||||
|
text-decoration: none; color: green; background: inherit;
|
||||||
|
URL:hover text-decoration: underline; cursor: pointer;
|
||||||
|
URLExtra /* Extra information about a URL */ \
|
||||||
|
color: gray;
|
||||||
|
|
||||||
|
FrameIndicator;;* {
|
||||||
|
/* The styling applied to briefly indicate the active frame */
|
||||||
|
background-color: red;
|
||||||
|
opacity: 0.5;
|
||||||
|
z-index: 999999;
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
Bell /* &dactyl.appName;’s visual bell */ \
|
||||||
|
background-color: black !important;
|
||||||
|
|
||||||
|
Hint;;* {
|
||||||
|
/* A hint indicator. See <ex>:help hints</ex> */
|
||||||
|
font: bold 10px "Droid Sans Mono", monospace !important;
|
||||||
|
margin: -.2ex;
|
||||||
|
padding: 0 0 0 1px;
|
||||||
|
outline: 1px solid rgba(0, 0, 0, .5);
|
||||||
|
background: rgba(255, 248, 231, .8);
|
||||||
|
color: black;
|
||||||
|
}
|
||||||
|
Hint[active];;* background: rgba(255, 253, 208, .8);
|
||||||
|
Hint::after;;* content: attr(text) !important;
|
||||||
|
HintElem;;* /* The hintable element */ \
|
||||||
|
background-color: yellow !important; color: black !important;
|
||||||
|
HintActive;;* /* The hint element of link which will be followed by <k name="CR"/> */ \
|
||||||
|
background-color: #88FF00 !important; color: black !important;
|
||||||
|
HintImage;;* /* The indicator which floats above hinted images */ \
|
||||||
|
opacity: .5 !important;
|
||||||
|
|
||||||
|
Button /* A button widget */ \
|
||||||
|
display: inline-block; font-weight: bold; cursor: pointer; color: black; text-decoration: none;
|
||||||
|
Button:hover text-decoration: underline;
|
||||||
|
Button[collapsed] visibility: collapse; width: 0;
|
||||||
|
Button::before content: "["; color: gray; text-decoration: none !important;
|
||||||
|
Button::after content: "]"; color: gray; text-decoration: none !important;
|
||||||
|
Button:not([collapsed]) ~ Button:not([collapsed])::before content: "/[";
|
||||||
|
|
||||||
|
Buttons /* A group of buttons */
|
||||||
|
|
||||||
|
DownloadCell /* A table cell in the :downloads manager */ \
|
||||||
|
display: table-cell; padding: 0 1ex;
|
||||||
|
|
||||||
|
Downloads /* The :downloads manager */ \
|
||||||
|
display: table; margin: 0; padding: 0;
|
||||||
|
DownloadHead;;;CompTitle /* A heading in the :downloads manager */ \
|
||||||
|
display: table-row;
|
||||||
|
DownloadHead>*;;;DownloadCell
|
||||||
|
|
||||||
|
Download /* A download in the :downloads manager */ \
|
||||||
|
display: table-row;
|
||||||
|
Download:not([active]) color: gray;
|
||||||
|
Download:nth-child(2n+1) background: rgba(0, 0, 0, .04);
|
||||||
|
|
||||||
|
Download>*;;;DownloadCell
|
||||||
|
DownloadButtons /* A button group in the :downloads manager */
|
||||||
|
DownloadPercent /* The percentage column for a download */
|
||||||
|
DownloadProgress /* The progress column for a download */
|
||||||
|
DownloadProgressHave /* The completed portion of the progress column */
|
||||||
|
DownloadProgressTotal /* The remaining portion of the progress column */
|
||||||
|
DownloadSource /* The download source column for a download */
|
||||||
|
DownloadState /* The download state column for a download */
|
||||||
|
DownloadTime /* The time remaining column for a download */
|
||||||
|
DownloadTitle /* The title column for a download */
|
||||||
|
DownloadTitle>Link>a max-width: 48ex; overflow: hidden; display: inline-block;
|
||||||
|
|
||||||
|
AddonCell /* A cell in tell :addons manager */ \
|
||||||
|
display: table-cell; padding: 0 1ex;
|
||||||
|
|
||||||
|
Addons /* The :addons manager */ \
|
||||||
|
display: table; margin: 0; padding: 0;
|
||||||
|
AddonHead;;;CompTitle /* A heading in the :addons manager */ \
|
||||||
|
display: table-row;
|
||||||
|
AddonHead>*;;;AddonCell
|
||||||
|
|
||||||
|
Addon /* An add-on in the :addons manager */ \
|
||||||
|
display: table-row;
|
||||||
|
Addon:nth-child(2n+1) background: rgba(0, 0, 0, .04);
|
||||||
|
|
||||||
|
Addon>*;;;AddonCell
|
||||||
|
AddonButtons
|
||||||
|
AddonDescription
|
||||||
|
AddonName max-width: 48ex; overflow: hidden;
|
||||||
|
AddonStatus
|
||||||
|
AddonVersion
|
||||||
|
|
||||||
|
// vim:se sts=4 sw=4 et ft=css:
|
||||||
212
common/skin/help-styles.css
Normal file
212
common/skin/help-styles.css
Normal file
@@ -0,0 +1,212 @@
|
|||||||
|
|
||||||
|
InlineHelpLink /* A help link shown in the command line or multi-line output area */ \
|
||||||
|
font-size: inherit !important; font-family: inherit !important;
|
||||||
|
|
||||||
|
Help;;;FontProportional /* A help page */ \
|
||||||
|
line-height: 1.4em;
|
||||||
|
|
||||||
|
HelpInclude /* A help page included in the consolidated help listing */ \
|
||||||
|
margin: 2em 0;
|
||||||
|
|
||||||
|
HelpArg;;;FontCode /* A required command argument indicator */ \
|
||||||
|
color: #6A97D4;
|
||||||
|
HelpOptionalArg;;;FontCode /* An optional command argument indicator */ \
|
||||||
|
color: #6A97D4;
|
||||||
|
|
||||||
|
HelpBody /* The body of a help page */ \
|
||||||
|
display: block; margin: 1em auto; max-width: 100ex; padding-bottom: 1em; margin-bottom: 4em; border-bottom-width: 1px;
|
||||||
|
HelpBorder;*;dactyl://help/* /* The styling of bordered elements */ \
|
||||||
|
border-color: silver; border-width: 0px; border-style: solid;
|
||||||
|
HelpCode;;;FontCode /* Code listings */ \
|
||||||
|
display: block; white-space: pre; margin-left: 2em;
|
||||||
|
HelpTT;html|tt;dactyl://help/*;FontCode /* Teletype text */
|
||||||
|
|
||||||
|
HelpDefault;;;FontCode /* The default value of a help item */ \
|
||||||
|
display: inline-block; margin: -1px 1ex 0 0; white-space: pre; vertical-align: text-top;
|
||||||
|
|
||||||
|
HelpDescription /* The description of a help item */ \
|
||||||
|
display: block; clear: right;
|
||||||
|
HelpDescription[short] clear: none;
|
||||||
|
HelpEm;html|em;dactyl://help/* /* Emphasized text */ \
|
||||||
|
font-weight: bold; font-style: normal;
|
||||||
|
|
||||||
|
HelpEx;;;FontCode /* An Ex command */ \
|
||||||
|
display: inline-block; color: #527BBD;
|
||||||
|
|
||||||
|
HelpExample /* An example */ \
|
||||||
|
display: block; margin: 1em 0;
|
||||||
|
HelpExample::before content: "__MSG_help.Example__: "; font-weight: bold;
|
||||||
|
|
||||||
|
HelpInfo /* Arbitrary information about a help item */ \
|
||||||
|
display: block; width: 20em; margin-left: auto;
|
||||||
|
HelpInfoLabel /* The label for a HelpInfo item */ \
|
||||||
|
display: inline-block; width: 6em; color: magenta; font-weight: bold; vertical-align: text-top;
|
||||||
|
HelpInfoValue /* The details for a HelpInfo item */ \
|
||||||
|
display: inline-block; width: 14em; text-decoration: none; vertical-align: text-top;
|
||||||
|
|
||||||
|
HelpItem /* A help item */ \
|
||||||
|
display: block; margin: 1em 1em 1em 10em; clear: both;
|
||||||
|
|
||||||
|
HelpKey;;;FontCode /* A keyboard key specification */ \
|
||||||
|
color: #102663;
|
||||||
|
HelpKeyword /* A keyword */ \
|
||||||
|
font-weight: bold; color: navy;
|
||||||
|
|
||||||
|
HelpLink;html|a;dactyl://help/* /* A hyperlink */ \
|
||||||
|
text-decoration: none !important;
|
||||||
|
HelpLink[href]:hover text-decoration: underline !important;
|
||||||
|
HelpLink[href^="mailto:"]::after content: "✉"; padding-left: .2em;
|
||||||
|
HelpLink[rel=external] {
|
||||||
|
/* A hyperlink to an external resource */
|
||||||
|
/* Thanks, Wikipedia */
|
||||||
|
background: transparent url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAMAAAC67D+PAAAAFVBMVEVmmcwzmcyZzP8AZswAZv////////9E6giVAAAAB3RSTlP///////8AGksDRgAAADhJREFUGFcly0ESAEAEA0Ei6/9P3sEcVB8kmrwFyni0bOeyyDpy9JTLEaOhQq7Ongf5FeMhHS/4AVnsAZubxDVmAAAAAElFTkSuQmCC) no-repeat scroll right center;
|
||||||
|
padding-right: 13px;
|
||||||
|
}
|
||||||
|
|
||||||
|
ErrorMsg HelpEx color: inherit; background: inherit; text-decoration: underline;
|
||||||
|
ErrorMsg HelpKey color: inherit; background: inherit; text-decoration: underline;
|
||||||
|
ErrorMsg HelpOption color: inherit; background: inherit; text-decoration: underline;
|
||||||
|
ErrorMsg HelpTopic color: inherit; background: inherit; text-decoration: underline;
|
||||||
|
|
||||||
|
HelpTOC /* The Table of Contents for a help page */
|
||||||
|
HelpTOC>ol ol margin-left: -1em;
|
||||||
|
|
||||||
|
HelpOrderedList;ol;dactyl://help/* /* Any ordered list */ \
|
||||||
|
margin: 1em 0;
|
||||||
|
HelpOrderedList1;ol[level="1"],ol;dactyl://help/* /* A first-level ordered list */ \
|
||||||
|
list-style: outside decimal; display: block;
|
||||||
|
HelpOrderedList2;ol[level="2"],ol ol;dactyl://help/* /* A second-level ordered list */ \
|
||||||
|
list-style: outside upper-alpha;
|
||||||
|
HelpOrderedList3;ol[level="3"],ol ol ol;dactyl://help/* /* A third-level ordered list */ \
|
||||||
|
list-style: outside lower-roman;
|
||||||
|
HelpOrderedList4;ol[level="4"],ol ol ol ol;dactyl://help/* /* A fourth-level ordered list */ \
|
||||||
|
list-style: outside decimal;
|
||||||
|
|
||||||
|
HelpList;html|ul;dactyl://help/* /* An unordered list */ \
|
||||||
|
display: block; list-style-position: outside; margin: 1em 0;
|
||||||
|
HelpListItem;html|li;dactyl://help/* /* A list item, ordered or unordered */ \
|
||||||
|
display: list-item;
|
||||||
|
|
||||||
|
HelpNote /* The indicator for a note */ \
|
||||||
|
color: red; font-weight: bold;
|
||||||
|
|
||||||
|
HelpOpt;;;FontCode /* An option name */ \
|
||||||
|
color: #106326;
|
||||||
|
HelpOptInfo;;;FontCode /* Information about the type and default values for an option entry */ \
|
||||||
|
display: block; margin-bottom: 1ex; padding-left: 4em;
|
||||||
|
|
||||||
|
HelpParagraph;html|p;dactyl://help/* /* An ordinary paragraph */ \
|
||||||
|
display: block; margin: 1em 0em;
|
||||||
|
HelpParagraph:first-child margin-top: 0;
|
||||||
|
HelpParagraph:last-child margin-bottom: 0;
|
||||||
|
HelpSpec;;;FontCode /* The specification for a help entry */ \
|
||||||
|
display: block; margin-left: -10em; float: left; clear: left; color: #527BBD; margin-right: 1em;
|
||||||
|
|
||||||
|
HelpString;;;FontCode /* A quoted string */ \
|
||||||
|
color: green; font-weight: normal;
|
||||||
|
HelpString::before content: '"';
|
||||||
|
HelpString::after content: '"';
|
||||||
|
HelpString[delim]::before content: attr(delim);
|
||||||
|
HelpString[delim]::after content: attr(delim);
|
||||||
|
|
||||||
|
HelpNews /* A news item */ position: relative;
|
||||||
|
HelpNewsOld /* An old news item */ opacity: .7;
|
||||||
|
HelpNewsNew /* A new news item */ font-style: italic;
|
||||||
|
HelpNewsTag /* The version tag for a news item */ \
|
||||||
|
font-style: normal; position: absolute; left: 100%; padding-left: 1em; color: #527BBD; opacity: .6; white-space: pre;
|
||||||
|
|
||||||
|
HelpHead;html|h1,html|h2,html|h3,html|h4;dactyl://help/* {
|
||||||
|
/* Any help heading */
|
||||||
|
font-weight: bold;
|
||||||
|
color: #527BBD;
|
||||||
|
clear: both;
|
||||||
|
}
|
||||||
|
HelpHead1;html|h1;dactyl://help/* {
|
||||||
|
/* A first-level help heading */
|
||||||
|
margin: 2em 0 1em;
|
||||||
|
padding-bottom: .2ex;
|
||||||
|
border-bottom-width: 1px;
|
||||||
|
font-size: 2em;
|
||||||
|
}
|
||||||
|
HelpHead2;html|h2;dactyl://help/* {
|
||||||
|
/* A second-level help heading */
|
||||||
|
margin: 2em 0 1em;
|
||||||
|
padding-bottom: .2ex;
|
||||||
|
border-bottom-width: 1px;
|
||||||
|
font-size: 1.2em;
|
||||||
|
}
|
||||||
|
HelpHead3;html|h3;dactyl://help/* {
|
||||||
|
/* A third-level help heading */
|
||||||
|
margin: 1em 0;
|
||||||
|
padding-bottom: .2ex;
|
||||||
|
font-size: 1.1em;
|
||||||
|
}
|
||||||
|
HelpHead4;html|h4;dactyl://help/* {
|
||||||
|
/* A fourth-level help heading */
|
||||||
|
}
|
||||||
|
|
||||||
|
HelpTab;html|dl;dactyl://help/* {
|
||||||
|
/* A description table */
|
||||||
|
display: table;
|
||||||
|
width: 100%;
|
||||||
|
margin: 1em 0;
|
||||||
|
border-bottom-width: 1px;
|
||||||
|
border-top-width: 1px;
|
||||||
|
padding: .5ex 0;
|
||||||
|
table-layout: fixed;
|
||||||
|
}
|
||||||
|
HelpTabColumn;html|column;dactyl://help/* display: table-column;
|
||||||
|
HelpTabColumn:first-child width: 25%;
|
||||||
|
HelpTabTitle;html|dt;dactyl://help/*;FontCode /* The title column of description tables */ \
|
||||||
|
display: table-cell; padding: .1ex 1ex; font-weight: bold;
|
||||||
|
HelpTabDescription;html|dd;dactyl://help/* /* The description column of description tables */ \
|
||||||
|
display: table-cell; padding: .3ex 1em; text-indent: -1em; border-width: 0px;
|
||||||
|
HelpTabDescription>*;;dactyl://help/* text-indent: 0;
|
||||||
|
HelpTabRow;html|dl>html|tr;dactyl://help/* /* Entire rows in description tables */ \
|
||||||
|
display: table-row;
|
||||||
|
|
||||||
|
HelpTag;;;FontCode /* A help tag */ \
|
||||||
|
display: inline-block; color: #527BBD; margin-left: 1ex; font-weight: normal;
|
||||||
|
HelpTags /* A group of help tags */ \
|
||||||
|
display: block; float: right; clear: right;
|
||||||
|
HelpTopic;;;FontCode /* A link to a help topic */ \
|
||||||
|
color: #102663;
|
||||||
|
HelpType;;;FontCode /* An option type */ \
|
||||||
|
color: #102663 !important; margin-right: 2ex;
|
||||||
|
|
||||||
|
HelpWarning /* The indicator for a warning */ \
|
||||||
|
color: red; font-weight: bold;
|
||||||
|
|
||||||
|
HelpXML;;;FontCode {
|
||||||
|
/* Highlighted XML */
|
||||||
|
white-space: pre;
|
||||||
|
display: inline-block;
|
||||||
|
color: #C5F779;
|
||||||
|
background-color: #444444;
|
||||||
|
border: 1px dashed #aaaaaa;
|
||||||
|
font-family: Terminus, Fixed, monospace;
|
||||||
|
}
|
||||||
|
HelpXMLBlock;;;HelpXML {
|
||||||
|
display: block;
|
||||||
|
margin-left: 2em;
|
||||||
|
}
|
||||||
|
HelpXMLAttribute color: #C5F779;
|
||||||
|
HelpXMLAttribute::after color: #E5E5E5; content: "=";
|
||||||
|
HelpXMLComment color: #444444;
|
||||||
|
HelpXMLComment::before content: "<!--";
|
||||||
|
HelpXMLComment::after content: "-->";
|
||||||
|
HelpXMLProcessing color: #C5F779;
|
||||||
|
HelpXMLProcessing::before color: #444444; content: "<?";
|
||||||
|
HelpXMLProcessing::after color: #444444; content: "?>";
|
||||||
|
HelpXMLString color: #C5F779; white-space: pre;
|
||||||
|
HelpXMLString::before content: '"';
|
||||||
|
HelpXMLString::after content: '"';
|
||||||
|
HelpXMLNamespace color: #FFF796;
|
||||||
|
HelpXMLNamespace::after color: #777777; content: ":";
|
||||||
|
HelpXMLTagStart color: #FFF796; white-space: normal; display: inline-block; text-indent: -1.5em; padding-left: 1.5em;
|
||||||
|
HelpXMLTagEnd color: #71BEBE;
|
||||||
|
HelpXMLText color: #E5E5E5;
|
||||||
|
|
||||||
|
CompItem HelpXMLTagStart white-space: pre;
|
||||||
|
|
||||||
|
// vim:se sts=4 sw=4 et ft=css:
|
||||||
@@ -182,8 +182,6 @@ const Config = Module("config", ConfigBase, {
|
|||||||
song: "song"
|
song: "song"
|
||||||
}, this.__proto__.completers)),
|
}, this.__proto__.completers)),
|
||||||
|
|
||||||
hasTabbrowser: true,
|
|
||||||
|
|
||||||
removeTab: function (tab) {
|
removeTab: function (tab) {
|
||||||
if (config.tabbrowser.mTabs.length > 1)
|
if (config.tabbrowser.mTabs.length > 1)
|
||||||
config.tabbrowser.removeTab(tab);
|
config.tabbrowser.removeTab(tab);
|
||||||
|
|||||||
86
pentadactyl/config.json
Normal file
86
pentadactyl/config.json
Normal file
@@ -0,0 +1,86 @@
|
|||||||
|
{
|
||||||
|
"name": "pentadactyl",
|
||||||
|
"appName": "Pentadactyl",
|
||||||
|
"idName": "PENTADACTYL",
|
||||||
|
"host": "Firefox",
|
||||||
|
"hostbin": "firefox",
|
||||||
|
|
||||||
|
"autocommands": {
|
||||||
|
"BookmarkAdd": "Triggered after a page is bookmarked",
|
||||||
|
"BookmarkChange": "Triggered after a page's bookmark is changed",
|
||||||
|
"BookmarkRemove": "Triggered after a page's bookmark is removed",
|
||||||
|
"ColorScheme": "Triggered after a color scheme has been loaded",
|
||||||
|
"DOMLoad": "Triggered when a page's DOM content has fully loaded",
|
||||||
|
"DownloadPost": "Triggered when a download has completed",
|
||||||
|
"Fullscreen": "Triggered when the browser's fullscreen state changes",
|
||||||
|
"LocationChange": "Triggered when changing tabs or when navigation to a new location",
|
||||||
|
"PageLoadPre": "Triggered after a page load is initiated",
|
||||||
|
"PageLoad": "Triggered when a page gets (re)loaded/opened",
|
||||||
|
"PrivateMode": "Triggered when private browsing mode is activated or deactivated",
|
||||||
|
"Sanitize": "Triggered when a sanitizeable item is cleared",
|
||||||
|
"ShellCmdPost": "Triggered after executing a shell command with :!cmd",
|
||||||
|
"Enter": "Triggered after Firefox starts",
|
||||||
|
"LeavePre": "Triggered before exiting Firefox, just before destroying each module",
|
||||||
|
"Leave": "Triggered before exiting Firefox"
|
||||||
|
},
|
||||||
|
|
||||||
|
"option-defaults": {
|
||||||
|
"complete": "search,location,file",
|
||||||
|
"guioptions": "bCrs",
|
||||||
|
"showtabline": "always",
|
||||||
|
"titlestring": "Pentadactyl"
|
||||||
|
},
|
||||||
|
|
||||||
|
"features": [
|
||||||
|
"sanitizer",
|
||||||
|
"windows"
|
||||||
|
],
|
||||||
|
|
||||||
|
"guioptions": {
|
||||||
|
"m": ["Menubar", ["toolbar-menubar"]],
|
||||||
|
"T": ["Toolbar", ["nav-bar"]],
|
||||||
|
"B": ["Bookmark bar", ["PersonalToolbar"]]
|
||||||
|
},
|
||||||
|
|
||||||
|
"overlays": {
|
||||||
|
"chrome://browser/content/browser.xul": {
|
||||||
|
"completers": {
|
||||||
|
"sidebar": "sidebar",
|
||||||
|
"window": "window"
|
||||||
|
},
|
||||||
|
|
||||||
|
"features": [
|
||||||
|
"bookmarks",
|
||||||
|
"hints",
|
||||||
|
"history",
|
||||||
|
"marks",
|
||||||
|
"quickmarks",
|
||||||
|
"session",
|
||||||
|
"tabbrowser",
|
||||||
|
"tabs",
|
||||||
|
"tabs_undo"
|
||||||
|
],
|
||||||
|
|
||||||
|
"ids": {
|
||||||
|
"command-container": "browser-bottombox"
|
||||||
|
},
|
||||||
|
|
||||||
|
"scripts": [
|
||||||
|
"browser",
|
||||||
|
"bookmarkcache",
|
||||||
|
"bookmarks",
|
||||||
|
"history",
|
||||||
|
"quickmarks",
|
||||||
|
"sanitizer",
|
||||||
|
"tabs"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
"sidebars": {
|
||||||
|
"viewAddons": ["Add-ons", "A", "chrome://mozapps/content/extensions/extensions.xul"],
|
||||||
|
"viewConsole": ["Console", "C", "chrome://global/content/console.xul"],
|
||||||
|
"viewDownloads": ["Downloads", "D", "chrome://mozapps/content/downloads/downloads.xul"],
|
||||||
|
"viewPreferences": ["Preferences", "P", "about:config"]
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -7,19 +7,9 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
var Config = Module("config", ConfigBase, {
|
var Config = Module("config", ConfigBase, {
|
||||||
name: "pentadactyl",
|
|
||||||
appName: "Pentadactyl",
|
|
||||||
idName: "PENTADACTYL",
|
|
||||||
host: "Firefox",
|
|
||||||
hostbin: "firefox",
|
|
||||||
|
|
||||||
commandContainer: "browser-bottombox",
|
|
||||||
|
|
||||||
Local: function Local(dactyl, modules, window)
|
Local: function Local(dactyl, modules, window)
|
||||||
let ({ config } = modules) ({
|
let ({ config } = modules) ({
|
||||||
|
|
||||||
completers: Class.Update({ sidebar: "sidebar", window: "window" }),
|
|
||||||
|
|
||||||
dialogs: {
|
dialogs: {
|
||||||
about: ["About Firefox",
|
about: ["About Firefox",
|
||||||
function () { window.openDialog("chrome://browser/content/aboutDialog.xul", "_blank", "chrome,dialog,modal,centerscreen"); }],
|
function () { window.openDialog("chrome://browser/content/aboutDialog.xul", "_blank", "chrome,dialog,modal,centerscreen"); }],
|
||||||
@@ -102,67 +92,8 @@ var Config = Module("config", ConfigBase, {
|
|||||||
|
|
||||||
return prefix + ".tmp";
|
return prefix + ".tmp";
|
||||||
}
|
}
|
||||||
}),
|
})
|
||||||
|
|
||||||
overlayChrome: ["chrome://browser/content/browser.xul"],
|
|
||||||
|
|
||||||
styleableChrome: ["chrome://browser/content/browser.xul"],
|
|
||||||
|
|
||||||
autocommands: {
|
|
||||||
BookmarkAdd: "Triggered after a page is bookmarked",
|
|
||||||
BookmarkChange: "Triggered after a page's bookmark is changed",
|
|
||||||
BookmarkRemove: "Triggered after a page's bookmark is removed",
|
|
||||||
ColorScheme: "Triggered after a color scheme has been loaded",
|
|
||||||
DOMLoad: "Triggered when a page's DOM content has fully loaded",
|
|
||||||
DownloadPost: "Triggered when a download has completed",
|
|
||||||
Fullscreen: "Triggered when the browser's fullscreen state changes",
|
|
||||||
LocationChange: "Triggered when changing tabs or when navigation to a new location",
|
|
||||||
PageLoadPre: "Triggered after a page load is initiated",
|
|
||||||
PageLoad: "Triggered when a page gets (re)loaded/opened",
|
|
||||||
PrivateMode: "Triggered when private browsing mode is activated or deactivated",
|
|
||||||
Sanitize: "Triggered when a sanitizeable item is cleared",
|
|
||||||
ShellCmdPost: "Triggered after executing a shell command with :!cmd",
|
|
||||||
Enter: "Triggered after Firefox starts",
|
|
||||||
LeavePre: "Triggered before exiting Firefox, just before destroying each module",
|
|
||||||
Leave: "Triggered before exiting Firefox"
|
|
||||||
},
|
|
||||||
|
|
||||||
defaults: {
|
|
||||||
complete: "search,location,file",
|
|
||||||
guioptions: "bCrs",
|
|
||||||
showtabline: "always",
|
|
||||||
titlestring: "Pentadactyl"
|
|
||||||
},
|
|
||||||
|
|
||||||
features: Set([
|
|
||||||
"bookmarks", "hints", "history", "marks", "quickmarks", "sanitizer",
|
|
||||||
"session", "tabs", "tabs_undo", "windows"
|
|
||||||
]),
|
|
||||||
|
|
||||||
guioptions: {
|
|
||||||
m: ["Menubar", ["toolbar-menubar"]],
|
|
||||||
T: ["Toolbar", ["nav-bar"]],
|
|
||||||
B: ["Bookmark bar", ["PersonalToolbar"]]
|
|
||||||
},
|
|
||||||
|
|
||||||
hasTabbrowser: true,
|
|
||||||
|
|
||||||
scripts: [
|
|
||||||
"browser",
|
|
||||||
"bookmarkcache",
|
|
||||||
"bookmarks",
|
|
||||||
"history",
|
|
||||||
"quickmarks",
|
|
||||||
"sanitizer",
|
|
||||||
"tabs"
|
|
||||||
],
|
|
||||||
|
|
||||||
sidebars: {
|
|
||||||
viewAddons: ["Add-ons", "A", "chrome://mozapps/content/extensions/extensions.xul"],
|
|
||||||
viewConsole: ["Console", "C", "chrome://global/content/console.xul"],
|
|
||||||
viewDownloads: ["Downloads", "D", "chrome://mozapps/content/downloads/downloads.xul"],
|
|
||||||
viewPreferences: ["Preferences", "P", "about:config"]
|
|
||||||
}
|
|
||||||
}, {
|
}, {
|
||||||
}, {
|
}, {
|
||||||
commands: function (dactyl, modules, window) {
|
commands: function (dactyl, modules, window) {
|
||||||
|
|||||||
71
teledactyl/config.json
Normal file
71
teledactyl/config.json
Normal file
@@ -0,0 +1,71 @@
|
|||||||
|
{
|
||||||
|
"name": "teledactyl",
|
||||||
|
"appName": "Teledactyl",
|
||||||
|
"idName": "TELEDACTYL",
|
||||||
|
"host": "Thunderbird",
|
||||||
|
"hostbin": "thunderbird",
|
||||||
|
|
||||||
|
"autocommands": {
|
||||||
|
"DOMLoad": "Triggered when a page's DOM content has fully loaded",
|
||||||
|
"FolderLoad": "Triggered after switching folders in Thunderbird",
|
||||||
|
"PageLoadPre": "Triggered after a page load is initiated",
|
||||||
|
"PageLoad": "Triggered when a page gets (re)loaded/opened",
|
||||||
|
"Enter": "Triggered after Thunderbird starts",
|
||||||
|
"Leave": "Triggered before exiting Thunderbird",
|
||||||
|
"LeavePre": "Triggered before exiting Thunderbird"
|
||||||
|
},
|
||||||
|
|
||||||
|
"guioptions": {
|
||||||
|
"m": ["MenuBar", ["mail-toolbar-menubar2"]],
|
||||||
|
"T": ["Toolbar", ["mail-bar2"]]
|
||||||
|
},
|
||||||
|
|
||||||
|
"option-defaults": {
|
||||||
|
"complete": "f",
|
||||||
|
"showtabline": 1,
|
||||||
|
"titlestring": "Teledactyl"
|
||||||
|
},
|
||||||
|
|
||||||
|
"overlays": {
|
||||||
|
"chrome://messenger/content/messenger.xul": {
|
||||||
|
"features": [
|
||||||
|
"hints",
|
||||||
|
"mail",
|
||||||
|
"marks",
|
||||||
|
"addressbook",
|
||||||
|
"tabs"
|
||||||
|
],
|
||||||
|
|
||||||
|
"guioptions": {
|
||||||
|
"f": ["Folder list", ["folderPaneBox", "folderpane_splitter"]],
|
||||||
|
"F": ["Folder list header", ["folderPaneHeader"]]
|
||||||
|
},
|
||||||
|
|
||||||
|
"option-defaults": {
|
||||||
|
"guioptions": "bCfrs"
|
||||||
|
},
|
||||||
|
|
||||||
|
"scripts": [
|
||||||
|
"addressbook",
|
||||||
|
"mail",
|
||||||
|
"tabs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
|
||||||
|
"chrome://messenger/content/messengercompose/messengercompose.xul": {
|
||||||
|
"is-compose-window": true,
|
||||||
|
|
||||||
|
"features": [
|
||||||
|
"addressbook"
|
||||||
|
],
|
||||||
|
|
||||||
|
"option-defaults": {
|
||||||
|
"guioptions": "bCrs"
|
||||||
|
},
|
||||||
|
|
||||||
|
"scripts": [
|
||||||
|
"compose/compose"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -5,12 +5,6 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
var Config = Module("config", ConfigBase, {
|
var Config = Module("config", ConfigBase, {
|
||||||
name: "teledactyl",
|
|
||||||
appName: "Teledactyl",
|
|
||||||
idName: "TELEDACTYL",
|
|
||||||
host: "Thunderbird",
|
|
||||||
hostbin: "thunderbird",
|
|
||||||
|
|
||||||
Local: function Local(dactyl, modules, window)
|
Local: function Local(dactyl, modules, window)
|
||||||
let ({ config } = modules, { document } = window) {
|
let ({ config } = modules, { document } = window) {
|
||||||
init: function init() {
|
init: function init() {
|
||||||
@@ -27,8 +21,6 @@ var Config = Module("config", ConfigBase, {
|
|||||||
tabmail && tabmail.tabInfo.length ? tabmail.getBrowserForSelectedTab()
|
tabmail && tabmail.tabInfo.length ? tabmail.getBrowserForSelectedTab()
|
||||||
: document.getElementById("messagepane"),
|
: document.getElementById("messagepane"),
|
||||||
|
|
||||||
get commandContainer() document.documentElement.id,
|
|
||||||
|
|
||||||
tabbrowser: {
|
tabbrowser: {
|
||||||
__proto__: Class.makeClosure.call(window.document.getElementById("tabmail")),
|
__proto__: Class.makeClosure.call(window.document.getElementById("tabmail")),
|
||||||
get mTabContainer() this.tabContainer,
|
get mTabContainer() this.tabContainer,
|
||||||
@@ -47,16 +39,12 @@ var Config = Module("config", ConfigBase, {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
get hasTabbrowser() !this.isComposeWindow,
|
|
||||||
|
|
||||||
get tabStip() this.tabbrowser.tabContainer,
|
get tabStip() this.tabbrowser.tabContainer,
|
||||||
|
|
||||||
get isComposeWindow() window.wintype == "msgcompose",
|
|
||||||
|
|
||||||
get mainWidget() this.isComposeWindow ? document.getElementById("content-frame") : window.GetThreadTree(),
|
get mainWidget() this.isComposeWindow ? document.getElementById("content-frame") : window.GetThreadTree(),
|
||||||
|
|
||||||
get mainWindowId() this.isComposeWindow ? "msgcomposeWindow" : "messengerWindow",
|
|
||||||
get browserModes() [modules.modes.MESSAGE],
|
get browserModes() [modules.modes.MESSAGE],
|
||||||
|
|
||||||
get mailModes() [modules.modes.NORMAL],
|
get mailModes() [modules.modes.NORMAL],
|
||||||
|
|
||||||
// NOTE: as I don't use TB I have no idea how robust this is. --djk
|
// NOTE: as I don't use TB I have no idea how robust this is. --djk
|
||||||
@@ -115,8 +103,13 @@ var Config = Module("config", ConfigBase, {
|
|||||||
focusChange: function focusChange(win) {
|
focusChange: function focusChange(win) {
|
||||||
const { modes } = modules;
|
const { modes } = modules;
|
||||||
|
|
||||||
|
if (win.top == window)
|
||||||
|
return;
|
||||||
|
|
||||||
// we switch to -- MESSAGE -- mode for Teledactyl when the main HTML widget gets focus
|
// we switch to -- MESSAGE -- mode for Teledactyl when the main HTML widget gets focus
|
||||||
if (win && win.document instanceof Ci.nsIHTMLDocument || dactyl.focus instanceof Ci.nsIHTMLAnchorElement) {
|
if (win && win.document instanceof Ci.nsIDOMHTMLDocument
|
||||||
|
|| dactyl.focusedElement instanceof Ci.nsIDOMHTMLAnchorElement) {
|
||||||
|
|
||||||
if (this.isComposeWindow)
|
if (this.isComposeWindow)
|
||||||
modes.set(modes.INSERT, modes.TEXT_EDIT);
|
modes.set(modes.INSERT, modes.TEXT_EDIT);
|
||||||
else if (dactyl.mode != modes.MESSAGE)
|
else if (dactyl.mode != modes.MESSAGE)
|
||||||
@@ -125,54 +118,6 @@ var Config = Module("config", ConfigBase, {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
autocommands: {
|
|
||||||
DOMLoad: "Triggered when a page's DOM content has fully loaded",
|
|
||||||
FolderLoad: "Triggered after switching folders in Thunderbird",
|
|
||||||
PageLoadPre: "Triggered after a page load is initiated",
|
|
||||||
PageLoad: "Triggered when a page gets (re)loaded/opened",
|
|
||||||
Enter: "Triggered after Thunderbird starts",
|
|
||||||
Leave: "Triggered before exiting Thunderbird",
|
|
||||||
LeavePre: "Triggered before exiting Thunderbird"
|
|
||||||
},
|
|
||||||
|
|
||||||
defaults: {
|
|
||||||
guioptions: "bCfrs",
|
|
||||||
complete: "f",
|
|
||||||
showtabline: 1,
|
|
||||||
titlestring: "Teledactyl"
|
|
||||||
},
|
|
||||||
|
|
||||||
/*** optional options, there are checked for existence and a fallback provided ***/
|
|
||||||
features: Class.Memoize(function () Set(
|
|
||||||
this.isComposeWindow ? ["addressbook"]
|
|
||||||
: ["hints", "mail", "marks", "addressbook", "tabs"])),
|
|
||||||
|
|
||||||
guioptions: {
|
|
||||||
m: ["MenuBar", ["mail-toolbar-menubar2"]],
|
|
||||||
T: ["Toolbar" , ["mail-bar2"]],
|
|
||||||
f: ["Folder list", ["folderPaneBox", "folderpane_splitter"]],
|
|
||||||
F: ["Folder list header", ["folderPaneHeader"]]
|
|
||||||
},
|
|
||||||
|
|
||||||
// they are sorted by relevance, not alphabetically
|
|
||||||
helpFiles: ["intro.html", "version.html"],
|
|
||||||
|
|
||||||
modes: [
|
|
||||||
["MESSAGE", { char: "m" }],
|
|
||||||
["COMPOSE"]
|
|
||||||
],
|
|
||||||
|
|
||||||
get scripts() this.isComposeWindow ? ["compose/compose"] : [
|
|
||||||
"addressbook",
|
|
||||||
"mail",
|
|
||||||
"tabs",
|
|
||||||
],
|
|
||||||
|
|
||||||
overlayChrome: ["chrome://messenger/content/messenger.xul",
|
|
||||||
"chrome://messenger/content/messengercompose/messengercompose.xul"],
|
|
||||||
styleableChrome: ["chrome://messenger/content/messenger.xul",
|
|
||||||
"chrome://messenger/content/messengercompose/messengercompose.xul"],
|
|
||||||
|
|
||||||
// to allow Vim to :set ft=mail automatically
|
// to allow Vim to :set ft=mail automatically
|
||||||
tempFile: "teledactyl.eml"
|
tempFile: "teledactyl.eml"
|
||||||
}, {
|
}, {
|
||||||
|
|||||||
@@ -179,9 +179,7 @@ var Mail = Module("mail", {
|
|||||||
|
|
||||||
params.type = Ci.nsIMsgCompType.New;
|
params.type = Ci.nsIMsgCompType.New;
|
||||||
|
|
||||||
const msgComposeService = Cc["@mozilla.org/messengercompose;1"].getService();
|
services.compose.OpenComposeWindowWithParams(null, params);
|
||||||
msgComposeService = msgComposeService.QueryInterface(Ci.nsIMsgComposeService);
|
|
||||||
msgComposeService.OpenComposeWindowWithParams(null, params);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// returns an array of nsIMsgFolder objects
|
// returns an array of nsIMsgFolder objects
|
||||||
@@ -861,8 +859,8 @@ var Mail = Module("mail", {
|
|||||||
},
|
},
|
||||||
services: function initServices(dactyl, modules, window) {
|
services: function initServices(dactyl, modules, window) {
|
||||||
services.add("smtp", "@mozilla.org/messengercompose/smtp;1", Ci.nsISmtpService);
|
services.add("smtp", "@mozilla.org/messengercompose/smtp;1", Ci.nsISmtpService);
|
||||||
|
services.add("compose", "@mozilla.org/messengercompose;1", "nsIMsgComposeService");
|
||||||
},
|
},
|
||||||
|
|
||||||
modes: function initModes(dactyl, modules, window) {
|
modes: function initModes(dactyl, modules, window) {
|
||||||
modes.addMode("MESSAGE", {
|
modes.addMode("MESSAGE", {
|
||||||
char: "m",
|
char: "m",
|
||||||
|
|||||||
Reference in New Issue
Block a user