-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathshAutoloader_tests.html
More file actions
111 lines (101 loc) · 4.23 KB
/
shAutoloader_tests.html
File metadata and controls
111 lines (101 loc) · 4.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>SyntaxHighlighter Brushes Tests</title>
<script type="text/javascript" src="js/jquery-1.4.2.js"></script>
<!-- SyntaxHighlighter -->
<script type="text/javascript" src="src/shCore.js"></script>
<script type="text/javascript" src="src/shAutoloader.js"></script>
<link type="text/css" rel="stylesheet" href="styles/shCore.css" />
<link type="text/css" rel="Stylesheet" href="styles/shCoreDefault.css" />
<link type="text/css" rel="Stylesheet" href="styles/shThemeDefault.css" />
</head>
<body>
<div id="output">
</div>
<style type="text/css">
body
{
background: white;
font-family: Helvetica;
}
.test-wrap
{
width: 100%;
height: 800px;
overflow: auto;
border: none;
}
</style>
<script type="text/javascript">
var brushes = ['Css', 'CSharp', 'JScript','PHP'];
$(document).ready(function () {
var html = '';
$.each(brushes, function (index) {
var name = this;
html += ''
+ '<div class="test-wrap">'
+ '<h1>'
+ '<a href="#theme' + (index + 1) + '">next</a> '
+ '<a name="theme' + index + '">'
+ name
+ '</a>'
+ '</h1>'
;
$.ajax({
url: 'brushes/' + name.toLowerCase() + '.html',
type: 'GET',
dataType: 'text',
async: false,
success: function (data) {
html += data;
},
error: function () {
html += '<p>Not found...</p>';
}
});
html += '</div>\n';
if (index % 2 != 0)
html += '<div style="clear:both"></div>\n';
});
$('#output')[0].innerHTML = html;
$('#output a[name]:first').attr('name', 'top');
$('#output a[href]:last').attr('href', '#top').html('top');
function path() {
var args = arguments, result = [];
for (var i = 0; i < args.length; i++)
result.push(args[i].replace('@', 'scripts/'));
return result
};
SyntaxHighlighter.autoloader.apply(null, path(
'applescript @shBrushAppleScript.js',
'actionscript3 as3 @shBrushAS3.js',
'bash shell @shBrushBash.js',
'coldfusion cf @shBrushColdFusion.js',
'cpp c @shBrushCpp.js',
'c# c-sharp csharp @shBrushCSharp.js',
'css @shBrushCss.js',
'delphi pascal @shBrushDelphi.js',
'diff patch pas @shBrushDiff.js',
'erl erlang @shBrushErlang.js',
'groovy @shBrushGroovy.js',
'java @shBrushJava.js',
'jfx javafx @shBrushJavaFX.js',
'js jscript javascript @shBrushJScript.js',
'perl pl @shBrushPerl.js',
'php @shBrushPhp.js',
'text plain @shBrushPlain.js',
'py python @shBrushPython.js',
'ruby rails ror rb @shBrushRuby.js',
'sass scss @shBrushSass.js',
'scala @shBrushScala.js',
'sql @shBrushSql.js',
'vb vbnet @shBrushVb.js',
'xml xhtml xslt html @shBrushXml.js')
);
SyntaxHighlighter.all();
});
</script>
</body>
</html>