Ticket #899 (closed defect: fixed)
Some improvements in the Javascript
| Reported by: | jcm | Owned by: | akaEdge |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Documentation | Version: | trunk |
| Severity: | normal | Keywords: | |
| Cc: |
Description
I passed Xinha's code in JsLint? (http://www.jslint.com)
Here are the most important changes:
return range.htmlText
(missing ; at the end)
var m = txtNode.data.match(HTMLArea.RE_url);
(m is redefined, please remove var before m)
else if(data != null)
(use '!==' to compare with 'null')
if (typeof string == 'string') var m = string.match(/\$(.*?)=(.*?)\$/g);
(remove the declaration outside the if:
var m;
if (typeof string == 'string') m = string.match(/\$(.*?)=(.*?)\$/g);
)
for ( var i in replace )
(identifier 'i' already declared as var*)
JC
Change History
Note: See
TracTickets for help on using
tickets.
