websvn |
Subversion Repositories: |
Compare with Previous - Blame - Download
<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
star-light - version 1.0.2 (2005/06/06)
Copyright 2005, Dean Edwards
License: http://creativecommons.org/licenses/LGPL/2.1/
-->
<public:component xmlns:public="urn:HTMLComponent" lightweight="true">
<public:attach event="ondocumentready" handler="init"/>
<script type="text/javascript">
//<![CDATA[
// my own ultraedit settings :-)
var KEYWORDS = "arguments|break|case|continue|default|delete|do|else|false|" +
"for|function|if|in|instanceof|new|null|return|switch|this|true|typeof|var|void|while|with";
var GLOBAL = "toString|valueOf|window|element|prototype|constructor|document|" +
"escape|unescape|parseInt|parseFloat|setTimeout|clearTimeout|setInterval|clearInterval|" +
"NaN|isNaN|Infinity";
var ALERT = "alert|eval|__defineGetter__|__defineSetter__|try|catch|finally|throw";
function init() {
// default text colour
style.color = "black";
// escape character
parser.escapeChar = "\\";
// comments
parser.add(LINE_COMMENT, "color:green");
parser.add(BLOCK_COMMENT, "color:green");
// regular expressions
parser.add(/([^\w\$\/'"*)])(\/[^\/\n\r\*][^\/\n\r]*\/g?i?)/, "color:maroon", "$2<span>$3</span>");
// strings
parser.add(STRING1, "color:maroon");
parser.add(STRING2, "color:maroon");
// numbers
parser.add(NUMBER, "color:maroon");
// urls/email
urls = true;
email = true;
tabStop = 4;
// I use this a lot so I want it to stand out
parser.add(/\$element\b/, "color:teal");
// ignore words that start with "$"
parser.add(/\$\w+/, IGNORE);
// javascript keywords
parser.add(ALERT, "color:red");
parser.add(KEYWORDS, "color:blue");
parser.add(/&&|\|\|/, "color:blue");
parser.add(GLOBAL, "color:teal");
};
//]]>
</script>
</public:component>