diff --git a/common/content/dactyl.js b/common/content/dactyl.js
index 8e9baae6..461e5a8d 100644
--- a/common/content/dactyl.js
+++ b/common/content/dactyl.js
@@ -678,7 +678,9 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
fileMap["plugins"] = function () ['text/xml;charset=UTF-8', help];
fileMap["versions"] = function () {
- let NEWS = util.httpGet(config.addon.getResourceURI("NEWS").spec).responseText;
+ let NEWS = util.httpGet(config.addon.getResourceURI("NEWS").spec,
+ { mimeType: "text/plain;charset=UTF-8" })
+ .responseText;
let re = util.regexp( \s*)
diff --git a/common/locale/en-US/autocommands.xml b/common/locale/en-US/autocommands.xml
index a67e9a13..f326c104 100644
--- a/common/locale/en-US/autocommands.xml
+++ b/common/locale/en-US/autocommands.xml
@@ -41,6 +41,12 @@
interpreted as an Ex command.
+
+ If the -group=group flag is given, add this autocmd
+ to the named group. Any filters for group apply in
+ addition to pat.
+
+
This behavior differs from Vim's implementation in that
pat is a regular expression rather than a glob.
diff --git a/common/locale/en-US/map.xml b/common/locale/en-US/map.xml
index e4b6256f..96a325bb 100644
--- a/common/locale/en-US/map.xml
+++ b/common/locale/en-US/map.xml
@@ -119,6 +119,7 @@
-count
Accept a count before the requisite key press. Sets the count parameter to the result. (short name -c)
-description
A description of this mapping (short name -d)
-ex
Execute rhs as an Ex command rather than keys (short name -e)
+ In order to facilitate script writing, especially scripts which only
+ apply to certain web sites, many types of commands and mappings can
+ be assigned to a named group. In addition to helping identify the
+ source of such mappings in listings, and aiding in the cleanup of
+ scripts, these groups can be configured to apply only to certain web
+ sites.
+
+ Select, create, or modify a group. After invocation,
+ group becomes the default group for all further commands
+ issued in the current script. If ! is given the group is
+ cleared of all mappings, commands, and any other entries bound to
+ it.
+
The URLs for which this group should be active. See site-filters (short names: -locs, -loc, -l)
+
-nopersist
Do not save this group to an auto-generated RC file (short name: -n)
+
+
+
+
+
+
Site Filters
+
+
+ Many &dactyl.appName; commands accept filters so that they may be applied
+ only to specific sites. Most of these commands accept filters in any of the
+ following formats:
+
+
+
+
domain
+
+ Any filter which is a valid domain name will match any site on that
+ domain or any sub-domain thereof. These filters may contain any letter
+ of the Roman alphabet, Arabic numerals, hyphens, and full stops.
+ Non-Latin domain names must be punycode encoded.
+
+
+
URL prefix
+
+ Any URL beginning with a valid protocol name and ending with a
+ * is treated as a URL prefix. It will match any URL which
+ begins with the given filter sans the trailing asterisk.
+
+
+
Full URL
+
+ Any URL beginning with a valid protocol name and not ending with an
+ asterisk is treated as a full URL match. It will match any page which
+ has a URL identical to the filter.
+
+
+
Regular expression
+
+ Any filter which does not fall into one of the above categories is
+ treated as a case-sensitive regular expression.
+
+
+
+
+ In most cases, any of the above may be prefixed with a ! character
+ to invert the sense of the match.
+
+
Using scripts
@@ -157,6 +250,32 @@
for more information.
+
Script Contexts
+
+
+ Each script executes in its own JavaScript context. This means that
+ any global variable or function, including those defined by
+ :javascript and the -javascript flag of
+ :map, :command, and :autocmd,
+ is directly available only within the current script. Outside of the
+ current script, they can only be accessed as properties of the
+ script's global object, which is stored in the plugins
+ global under the script's full path.
+
+
+
Script Groups
+
+
+ In addition to its own JavaScript context, each script is executed
+ with its own default group into which
+ its styles, mappings, commands, and autocommands are placed. This
+ means that commands such as :comclear! can be issued
+ without fear of trampling other user-defined mappings. The command
+ :group! default can be issued to clear all such items at
+ once, and should be placed at the head of most scripts to prevent
+ the accumulation of stale items when the script is re-sourced.
+
+
Cascading Stylesheets
diff --git a/common/locale/en-US/starting.xml b/common/locale/en-US/starting.xml
index cd9ca6c9..2a6d33d1 100644
--- a/common/locale/en-US/starting.xml
+++ b/common/locale/en-US/starting.xml
@@ -95,7 +95,7 @@
Windows only. If this file exists, its contents
are executed and $MY_&dactyl.idName;RC set to its path.
-
+
~/.&dactyl.name;rc
If this file exists, its contents are executed.
diff --git a/common/locale/en-US/styling.xml b/common/locale/en-US/styling.xml
index efa47be0..6ac53f5a 100644
--- a/common/locale/en-US/styling.xml
+++ b/common/locale/en-US/styling.xml
@@ -149,10 +149,11 @@
:style!-name=name-appendfiltercss
- Add CSS styles to the browser or to web pages. filter is a comma-separated
- list of URLs to match. URLs ending with * are matched as prefixes, URLs not
- containing any : or / characters are matched as domains. css is a full
- CSS rule set (e.g., body { color: blue; }).
+ Add CSS styles to the browser or to web pages. filter is a
+ comma-separated list of site-filters for which the style will
+ apply. Regular expression filters may not be used and the !
+ character may not be used to invert the sense of the match.
+ css is a full CSS rule set (e.g., body { color: blue; }).
The following options are available:
@@ -166,6 +167,11 @@
applies to contents user interface widgets as well as normal
elements. (short name -A)
+
The group to which to add this style. Please note that
+ this grouping is for semantic and cleanup purposes only. No
+ additional site filtering is applied.
If provided, any existing style with the same name is
overridden, and the style may later be deleted using
diff --git a/common/modules/contexts.jsm b/common/modules/contexts.jsm
index 75f271e5..183bead1 100644
--- a/common/modules/contexts.jsm
+++ b/common/modules/contexts.jsm
@@ -9,7 +9,7 @@ try {
Components.utils.import("resource://dactyl/bootstrap.jsm");
defineModule("contexts", {
exports: ["Contexts", "Group", "contexts"],
- use: ["commands", "options", "services", "storage", "styles", "util"]
+ use: ["commands", "options", "services", "storage", "styles", "template", "util"]
}, this);
var Group = Class("Group", {