mirror of
https://github.com/GoogleChrome/chrome-extensions-samples.git
synced 2026-03-29 13:49:41 +07:00
* Remove docs folder. This was a redirect from a GitHub pages site that does not appear to be in use. * Rename api folder to api-samples. * Move examples to functional-samples folder. * Move cookbook sample to functional-samples. * Move tutorials to functional-samples folder. * Move mv2 and apps folders to _archive. * Rename tools folder to .repo. * Move reference folder to functional-samples. * Update README. Update README with new relative links for reorg. * Update README.md Co-authored-by: amysteamdev <37001393+AmySteam@users.noreply.github.com> --------- Co-authored-by: amysteamdev <37001393+AmySteam@users.noreply.github.com>
77 lines
2.4 KiB
HTML
77 lines
2.4 KiB
HTML
<!doctype html>
|
|
<html>
|
|
<head>
|
|
<title>CodeMirror: Theme Demo</title>
|
|
<link rel="stylesheet" href="../lib/codemirror.css">
|
|
<script src="../lib/codemirror.js"></script>
|
|
<link rel="stylesheet" href="../theme/neat.css">
|
|
<link rel="stylesheet" href="../theme/elegant.css">
|
|
<link rel="stylesheet" href="../theme/erlang-dark.css">
|
|
<link rel="stylesheet" href="../theme/night.css">
|
|
<link rel="stylesheet" href="../theme/monokai.css">
|
|
<link rel="stylesheet" href="../theme/cobalt.css">
|
|
<link rel="stylesheet" href="../theme/eclipse.css">
|
|
<link rel="stylesheet" href="../theme/rubyblue.css">
|
|
<link rel="stylesheet" href="../theme/lesser-dark.css">
|
|
<link rel="stylesheet" href="../theme/xq-dark.css">
|
|
<link rel="stylesheet" href="../theme/ambiance.css">
|
|
<link rel="stylesheet" href="../theme/blackboard.css">
|
|
<script src="../mode/javascript/javascript.js"></script>
|
|
<link rel="stylesheet" href="../doc/docs.css">
|
|
|
|
<style type="text/css">
|
|
.CodeMirror {border: 1px solid black;}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<h1>CodeMirror: Theme demo</h1>
|
|
|
|
<form><textarea id="code" name="code">
|
|
function findSequence(goal) {
|
|
function find(start, history) {
|
|
if (start == goal)
|
|
return history;
|
|
else if (start > goal)
|
|
return null;
|
|
else
|
|
return find(start + 5, "(" + history + " + 5)") ||
|
|
find(start * 3, "(" + history + " * 3)");
|
|
}
|
|
return find(1, "1");
|
|
}</textarea></form>
|
|
|
|
<p>Select a theme: <select onchange="selectTheme()" id=select>
|
|
<option selected>default</option>
|
|
<option>ambiance</option>
|
|
<option>blackboard</option>
|
|
<option>cobalt</option>
|
|
<option>eclipse</option>
|
|
<option>elegant</option>
|
|
<option>erlang-dark</option>
|
|
<option>lesser-dark</option>
|
|
<option>monokai</option>
|
|
<option>neat</option>
|
|
<option>night</option>
|
|
<option>rubyblue</option>
|
|
<option>xq-dark</option>
|
|
</select>
|
|
</p>
|
|
|
|
<script>
|
|
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
|
|
lineNumbers: true
|
|
});
|
|
var input = document.getElementById("select");
|
|
function selectTheme() {
|
|
var theme = input.options[input.selectedIndex].innerHTML;
|
|
editor.setOption("theme", theme);
|
|
}
|
|
var choice = document.location.search && document.location.search.slice(1);
|
|
if (choice) {
|
|
input.value = choice;
|
|
editor.setOption("theme", choice);
|
|
}
|
|
</script>
|
|
</body>
|
|
</html>
|