Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

58 lines (51 sloc) 2.84 kB
<!doctype html>
<title>CodeMirror 2: Compression Helper</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<body style="max-width: 70em; margin-left: 2em; font-family: tahoma, arial, sans-serif;">
<h1>CodeMirror 2: Compression Helper</h1>
<form id="form" action="" method="post">
<input type="hidden" id="download" name="download" value="codemirror-compressed.js"/>
<p>Version: <select id="version" onchange="setVersion(this);" style="padding: 1px">
<option value="">HEAD</option>
<option value=";hb=beta1;f=">beta1</option>
<select multiple="multiple" name="code_url" style="width: 40em;" class="field" id="files">
<optgroup label="CodeMirror Library">
<option value="" selected>codemirror.js</option>
<option value="">overlay.js</option>
<optgroup label="Modes">
<option value="">javascript.js</option>
<option value="">xml.js</option>
<option value="">css.js</option>
<option value="">htmlmixed.js</option>
<option value="">clike.js</option>
<option value="">diff.js</option>
<option value="">null.js</option>
<button type="submit">Compress</button> with <a href="">UglifyJS</a>
<p>Custom code to add to the compressed file:<textarea name="js_code" style="width: 100%; height: 15em;" class="field"></textarea></p>
<script type="text/javascript">
function setVersion(ver) {
var urlprefix = ver.options[ver.selectedIndex].value;
var select = document.getElementById("files"), m;
for (var optgr = select.firstChild; optgr; optgr = optgr.nextSibling)
for (var opt = optgr.firstChild; opt; opt = opt.nextSibling) {
if (opt.nodeName != "OPTION")
else if (m = opt.value.match(/^http:\/\/\/2\/(.*)$/))
opt.value = urlprefix + m[1];
else if (m = opt.value.match(/http:\/\/\/git\/codemirror\?a=blob_plain;hb=[^;]+;f=(.*)$/))
opt.value = urlprefix + m[1];
Jump to Line
Something went wrong with that request. Please try again.