mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-02-28 02:25:48 +01:00
E4X and XML the object are really no more.
This commit is contained in:
3
HACKING
3
HACKING
@@ -111,8 +111,7 @@ In general: Just look at the existing source code!
|
|||||||
Wrong:
|
Wrong:
|
||||||
for each (let elem in ary)
|
for each (let elem in ary)
|
||||||
|
|
||||||
The exceptions to this rule are for objects with __iterator__ set,
|
The exceptions to this rule are for objects with __iterator__ set.
|
||||||
and for XML objects (see README.E4X).
|
|
||||||
|
|
||||||
* Avoid using 'new' with constructors where possible, and use [] and
|
* Avoid using 'new' with constructors where possible, and use [] and
|
||||||
{} rather than new Array/new Object.
|
{} rather than new Array/new Object.
|
||||||
|
|||||||
@@ -44,10 +44,10 @@ syntax sync maxlines=200
|
|||||||
|
|
||||||
"" JavaScript comments
|
"" JavaScript comments
|
||||||
syntax keyword javaScriptCommentTodo TODO FIXME XXX TBD contained
|
syntax keyword javaScriptCommentTodo TODO FIXME XXX TBD contained
|
||||||
syntax region javaScriptLineComment start=+\/\/+ end="\v$|(\</?(css|e4x)\>)@=" keepend contains=javaScriptCommentTodo,@Spell
|
syntax region javaScriptLineComment start=+\/\/+ end="\v$|(\</?css\>)@=" keepend contains=javaScriptCommentTodo,@Spell
|
||||||
syntax region javaScriptLineComment start=+^\s*\/\/+ skip=+\n\s*\/\/+ end="\v$|(\</?(css|e4x)\>)@=" keepend contains=javaScriptCommentTodo,@Spell fold
|
syntax region javaScriptLineComment start=+^\s*\/\/+ skip=+\n\s*\/\/+ end="\v$|(\</?css\>)@=" keepend contains=javaScriptCommentTodo,@Spell fold
|
||||||
syntax region javaScriptCvsTag start="\$\cid:" end="\$" oneline contained
|
syntax region javaScriptCvsTag start="\$\cid:" end="\$" oneline contained
|
||||||
syntax region javaScriptComment start="/\*" end="\v\*/|(\</?(css|e4x)\>)@=" contains=javaScriptCommentTodo,javaScriptCvsTag,@Spell fold
|
syntax region javaScriptComment start="/\*" end="\v\*/|(\</?css\>)@=" contains=javaScriptCommentTodo,javaScriptCvsTag,@Spell fold
|
||||||
|
|
||||||
"" JSDoc support start
|
"" JSDoc support start
|
||||||
if !exists("javascript_ignore_javaScriptdoc")
|
if !exists("javascript_ignore_javaScriptdoc")
|
||||||
@@ -149,15 +149,13 @@ endif "DOM/HTML/CSS
|
|||||||
|
|
||||||
|
|
||||||
"" Code blocks
|
"" Code blocks
|
||||||
syntax cluster javaScriptAll contains=javaScriptComment,javaScriptLineComment,javaScriptDocComment,javaScriptStringD,javaScriptStringS,javaScriptRegexpString,javaScriptNumber,javaScriptFloat,javaScriptLabel,javaScriptSource,javaScriptType,javaScriptOperator,javaScriptBoolean,javaScriptNull,javaScriptFunction,javaScriptConditional,javaScriptRepeat,javaScriptBranch,javaScriptStatement,javaScriptGlobalObjects,javaScriptExceptions,javaScriptFutureKeys,javaScriptDomErrNo,javaScriptDomNodeConsts,javaScriptHtmlEvents,javaScriptDotNotation,javascriptE4X,javascriptCSS,javascriptCDATA
|
syntax cluster javaScriptAll contains=javaScriptComment,javaScriptLineComment,javaScriptDocComment,javaScriptStringD,javaScriptStringS,javaScriptRegexpString,javaScriptNumber,javaScriptFloat,javaScriptLabel,javaScriptSource,javaScriptType,javaScriptOperator,javaScriptBoolean,javaScriptNull,javaScriptFunction,javaScriptConditional,javaScriptRepeat,javaScriptBranch,javaScriptStatement,javaScriptGlobalObjects,javaScriptExceptions,javaScriptFutureKeys,javaScriptDomErrNo,javaScriptDomNodeConsts,javaScriptHtmlEvents,javaScriptDotNotation,javascriptCSS,javascriptCDATA
|
||||||
syntax region javaScriptBracket matchgroup=javaScriptBracket transparent start="\[" end="\]" contains=@javaScriptAll,javaScriptParensErrB,javaScriptParensErrC,javaScriptBracket,javaScriptParen,javaScriptBlock,@htmlPreproc
|
syntax region javaScriptBracket matchgroup=javaScriptBracket transparent start="\[" end="\]" contains=@javaScriptAll,javaScriptParensErrB,javaScriptParensErrC,javaScriptBracket,javaScriptParen,javaScriptBlock,@htmlPreproc
|
||||||
syntax region javaScriptParen matchgroup=javaScriptParen transparent start="(" end=")" contains=@javaScriptAll,javaScriptParensErrA,javaScriptParensErrC,javaScriptParen,javaScriptBracket,javaScriptBlock,@htmlPreproc
|
syntax region javaScriptParen matchgroup=javaScriptParen transparent start="(" end=")" contains=@javaScriptAll,javaScriptParensErrA,javaScriptParensErrC,javaScriptParen,javaScriptBracket,javaScriptBlock,@htmlPreproc
|
||||||
syntax region javaScriptBlock matchgroup=javaScriptBlock transparent start="{" end="}" contains=@javaScriptAll,javaScriptParensErrA,javaScriptParensErrB,javaScriptParen,javaScriptBracket,javaScriptBlock,@htmlPreproc
|
syntax region javaScriptBlock matchgroup=javaScriptBlock transparent start="{" end="}" contains=@javaScriptAll,javaScriptParensErrA,javaScriptParensErrB,javaScriptParen,javaScriptBracket,javaScriptBlock,@htmlPreproc
|
||||||
|
|
||||||
syntax region javascriptCDATA matchgroup=javascriptCDATA start="<\!\[CDATA\[" end="\]\]>" keepend contains=javascriptCSS
|
syntax region javascriptCDATA matchgroup=javascriptCDATA start="<\!\[CDATA\[" end="\]\]>" keepend contains=javascriptCSS
|
||||||
syntax region javascriptCSS matchgroup=javascriptCSSDelimiter start="<css>" end="</css>" contains=@cssTop
|
syntax region javascriptCSS matchgroup=javascriptCSSDelimiter start="<css>" end="</css>" contains=@cssTop
|
||||||
syntax region javascriptE4X matchgroup=javascriptE4XDelimiter start="<e4x>" end="</e4x>" contains=@xmlTop
|
|
||||||
syntax region javascriptE4X matchgroup=javascriptE4XDelimiter start="<>" end="</>" contains=@xmlTop oneline
|
|
||||||
|
|
||||||
"" catch errors caused by wrong parenthesis
|
"" catch errors caused by wrong parenthesis
|
||||||
syntax match javaScriptParensError ")\|}\|\]"
|
syntax match javaScriptParensError ")\|}\|\]"
|
||||||
|
|||||||
@@ -177,55 +177,17 @@
|
|||||||
<h3 tag="plugin-documentation">Plugin documentation</h3>
|
<h3 tag="plugin-documentation">Plugin documentation</h3>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Plugins should provide inline documentation, which will appear on the
|
Plugins should provide documentation, which will appear on the
|
||||||
<ex>:help <str delim="">plugins</str></ex> page. The markup for help entries is the same
|
<ex>:help <str delim="">plugins</str></ex> page. The XML markup for help
|
||||||
as the above, along with a few extra plugin-specific entries. Here is an
|
entries is similar to the above, but has to be written in JSON syntax. You
|
||||||
example from the popular <em>flashblock</em> extension:
|
can find some examples in the
|
||||||
|
<link topic="&dactyl.plugins;">official plugins</link>.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<xml-block><escape><hl key="HelpXMLString">use strict</hl>;
|
|
||||||
XML.ignoreWhitespace = <hl key="Boolean">false</hl>;
|
|
||||||
XML.prettyPrinting = <hl key="Boolean">false</hl>;
|
|
||||||
<hl key="HelpXMLBase">var</hl> INFO = <!-- Cursed manual XML highlighting! -->
|
|
||||||
<hl key="HelpXMLTagStart"><plugin
|
|
||||||
<hl key="HelpXMLAttribute">name</hl><hl key="HelpXMLString">flashblock</hl>
|
|
||||||
<hl key="HelpXMLAttribute">version</hl><hl key="HelpXMLString">1.0</hl>
|
|
||||||
<hl key="HelpXMLAttribute">href</hl><hl key="HelpXMLString">http://5digits.org/pentadactyl/plugins#flashblock-plugin</hl>
|
|
||||||
<hl key="HelpXMLAttribute">summary</hl><hl key="HelpXMLString">Flash Blocker</hl>
|
|
||||||
<hl key="HelpXMLAttribute">xmlns</hl>{NS}></hl></escape>
|
|
||||||
<author email="maglione.k@gmail.com">Kris Maglione</author>
|
|
||||||
<license href="http://opensource.org/licenses/mit-license.php">MIT</license>
|
|
||||||
<project name="Pentadactyl" min-version="1.0"/>
|
|
||||||
<p>
|
|
||||||
This plugin provides the same features as the ever popular FlashBlock
|
|
||||||
Firefox addon. Flash animations are substituted with place holders which
|
|
||||||
play the original animation when clicked. Additionally, this plugin provides
|
|
||||||
options to control which sites can play animations without restrictions, and
|
|
||||||
triggers to toggle the playing of animation on the current page.
|
|
||||||
</p>
|
|
||||||
<item>
|
|
||||||
<tags>'fb' 'flashblock'</tags>
|
|
||||||
<spec>'flashblock' 'fb'</spec>
|
|
||||||
<type>boolean</type>
|
|
||||||
<default>true</default>
|
|
||||||
<description>
|
|
||||||
<p>
|
|
||||||
Controls the blocking of flash animations. When true, place
|
|
||||||
holders are substituted for flash animations on untrusted sites.
|
|
||||||
</p>
|
|
||||||
</description>
|
|
||||||
</item>
|
|
||||||
<escape><oa>…</oa>
|
|
||||||
<hl key="HelpXMLTagEnd"></plugin></hl></escape>;</xml-block>
|
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
The inline XML is made possible by
|
|
||||||
<link topic="https://developer.mozilla.org/en/E4X">E4X</link>.
|
|
||||||
It is important that the documentation be assigned to the
|
It is important that the documentation be assigned to the
|
||||||
<em>INFO</em> variable, or &dactyl.appName; will not be able
|
<em>INFO</em> variable, or &dactyl.appName; will not be able
|
||||||
to find it. The XML property changes are not compulsory, but
|
to find it. Beginning your file with <str>use strict</str>, while
|
||||||
they do prevent certain formatting problems that may occur
|
|
||||||
otherwise. Beginning your file with <str>use strict</str>, while
|
|
||||||
not required, helps to prevent a lot of common errors.
|
not required, helps to prevent a lot of common errors.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user