├── .gitattributes ├── .gitignore ├── .idea ├── jsLinters │ └── jshint.xml ├── libraries │ └── sass_stdlib.xml ├── misc.xml └── workspace.xml ├── Client ├── Browser.js ├── ConsoleJS.js ├── Socket.js ├── Web.css └── Web.js ├── ConsoleJS.iml ├── Example ├── demo.html ├── demoOnSSL.html ├── index.html ├── indexOnSSL.html ├── main.css └── main.js ├── Readme.md ├── Remote ├── Commands.js ├── Config.js ├── Console.js ├── Room.js ├── RoomManager.js ├── SocketServer.js ├── Store.js ├── Utils.js ├── icons │ ├── offline.png │ └── online.png ├── index.html ├── main.css └── main.js ├── Server ├── Config.js ├── ConnectionManager.js ├── ConsoleClient.js ├── ControlClient.js ├── Guid.js ├── Room.js ├── Server.js └── Start.js ├── Shared └── console.css ├── certificates ├── certificate.pem ├── certrequest.csr └── privatekey.pem ├── consoleJS.PNG ├── install.bat ├── lib ├── bootstrap │ ├── css │ │ ├── bootstrap-responsive.css │ │ ├── bootstrap-responsive.min.css │ │ ├── bootstrap.css │ │ └── bootstrap.min.css │ ├── img │ │ ├── glyphicons-halflings-white.png │ │ └── glyphicons-halflings.png │ └── js │ │ ├── bootstrap.js │ │ └── bootstrap.min.js ├── codemirror │ ├── .gitattributes │ ├── .gitignore │ ├── .travis.yml │ ├── CONTRIBUTING.md │ ├── LICENSE │ ├── README.md │ ├── addon │ │ ├── dialog │ │ │ ├── dialog.css │ │ │ └── dialog.js │ │ ├── display │ │ │ └── placeholder.js │ │ ├── edit │ │ │ ├── closebrackets.js │ │ │ ├── closetag.js │ │ │ ├── continuecomment.js │ │ │ ├── continuelist.js │ │ │ └── matchbrackets.js │ │ ├── fold │ │ │ ├── brace-fold.js │ │ │ ├── foldcode.js │ │ │ ├── indent-fold.js │ │ │ └── xml-fold.js │ │ ├── hint │ │ │ ├── html-hint.js │ │ │ ├── javascript-hint.js │ │ │ ├── pig-hint.js │ │ │ ├── python-hint.js │ │ │ ├── show-hint.css │ │ │ ├── show-hint.js │ │ │ └── xml-hint.js │ │ ├── lint │ │ │ ├── javascript-lint.js │ │ │ ├── json-lint.js │ │ │ ├── lint.css │ │ │ └── lint.js │ │ ├── mode │ │ │ ├── loadmode.js │ │ │ ├── multiplex.js │ │ │ └── overlay.js │ │ ├── runmode │ │ │ ├── colorize.js │ │ │ ├── runmode-standalone.js │ │ │ ├── runmode.js │ │ │ └── runmode.node.js │ │ ├── search │ │ │ ├── match-highlighter.js │ │ │ ├── search.js │ │ │ └── searchcursor.js │ │ └── selection │ │ │ ├── active-line.js │ │ │ └── mark-selection.js │ ├── demo │ │ ├── activeline.html │ │ ├── bidi.html │ │ ├── btree.html │ │ ├── buffers.html │ │ ├── changemode.html │ │ ├── closebrackets.html │ │ ├── closetag.html │ │ ├── complete.html │ │ ├── emacs.html │ │ ├── folding.html │ │ ├── fullscreen.html │ │ ├── html5complete.html │ │ ├── indentwrap.html │ │ ├── lint.html │ │ ├── loadmode.html │ │ ├── marker.html │ │ ├── markselection.html │ │ ├── matchhighlighter.html │ │ ├── multiplex.html │ │ ├── mustache.html │ │ ├── placeholder.html │ │ ├── preview.html │ │ ├── resize.html │ │ ├── runmode.html │ │ ├── search.html │ │ ├── spanaffectswrapping_shim.html │ │ ├── theme.html │ │ ├── variableheight.html │ │ ├── vim.html │ │ ├── visibletabs.html │ │ ├── widget.html │ │ └── xmlcomplete.html │ ├── doc │ │ ├── baboon.png │ │ ├── baboon_vector.svg │ │ ├── compress.html │ │ ├── docs.css │ │ ├── internals.html │ │ ├── manual.html │ │ ├── modes.html │ │ ├── oldrelease.html │ │ ├── realworld.html │ │ ├── reporting.html │ │ ├── upgrade_v2.2.html │ │ └── upgrade_v3.html │ ├── index.html │ ├── keymap │ │ ├── emacs.js │ │ └── vim.js │ ├── lib │ │ ├── codemirror.css │ │ └── codemirror.js │ ├── mode │ │ ├── apl │ │ │ ├── apl.js │ │ │ └── index.html │ │ ├── asterisk │ │ │ ├── asterisk.js │ │ │ └── index.html │ │ ├── clike │ │ │ ├── clike.js │ │ │ ├── index.html │ │ │ └── scala.html │ │ ├── clojure │ │ │ ├── clojure.js │ │ │ └── index.html │ │ ├── coffeescript │ │ │ ├── LICENSE │ │ │ ├── coffeescript.js │ │ │ └── index.html │ │ ├── commonlisp │ │ │ ├── commonlisp.js │ │ │ └── index.html │ │ ├── css │ │ │ ├── css.js │ │ │ ├── index.html │ │ │ ├── scss.html │ │ │ ├── scss_test.js │ │ │ └── test.js │ │ ├── d │ │ │ ├── d.js │ │ │ └── index.html │ │ ├── diff │ │ │ ├── diff.js │ │ │ └── index.html │ │ ├── ecl │ │ │ ├── ecl.js │ │ │ └── index.html │ │ ├── erlang │ │ │ ├── erlang.js │ │ │ └── index.html │ │ ├── gas │ │ │ ├── gas.js │ │ │ └── index.html │ │ ├── gfm │ │ │ ├── gfm.js │ │ │ ├── index.html │ │ │ └── test.js │ │ ├── go │ │ │ ├── go.js │ │ │ └── index.html │ │ ├── groovy │ │ │ ├── groovy.js │ │ │ └── index.html │ │ ├── haskell │ │ │ ├── haskell.js │ │ │ └── index.html │ │ ├── haxe │ │ │ ├── haxe.js │ │ │ └── index.html │ │ ├── htmlembedded │ │ │ ├── htmlembedded.js │ │ │ └── index.html │ │ ├── htmlmixed │ │ │ ├── htmlmixed.js │ │ │ └── index.html │ │ ├── http │ │ │ ├── http.js │ │ │ └── index.html │ │ ├── javascript │ │ │ ├── index.html │ │ │ ├── javascript.js │ │ │ └── typescript.html │ │ ├── jinja2 │ │ │ ├── index.html │ │ │ └── jinja2.js │ │ ├── less │ │ │ ├── index.html │ │ │ └── less.js │ │ ├── livescript │ │ │ ├── LICENSE │ │ │ ├── index.html │ │ │ ├── livescript.js │ │ │ └── livescript.ls │ │ ├── lua │ │ │ ├── index.html │ │ │ └── lua.js │ │ ├── markdown │ │ │ ├── index.html │ │ │ ├── markdown.js │ │ │ └── test.js │ │ ├── meta.js │ │ ├── mirc │ │ │ ├── index.html │ │ │ └── mirc.js │ │ ├── ntriples │ │ │ ├── index.html │ │ │ └── ntriples.js │ │ ├── ocaml │ │ │ ├── index.html │ │ │ └── ocaml.js │ │ ├── pascal │ │ │ ├── LICENSE │ │ │ ├── index.html │ │ │ └── pascal.js │ │ ├── perl │ │ │ ├── LICENSE │ │ │ ├── index.html │ │ │ └── perl.js │ │ ├── php │ │ │ ├── index.html │ │ │ └── php.js │ │ ├── pig │ │ │ ├── index.html │ │ │ └── pig.js │ │ ├── properties │ │ │ ├── index.html │ │ │ └── properties.js │ │ ├── python │ │ │ ├── LICENSE.txt │ │ │ ├── index.html │ │ │ └── python.js │ │ ├── q │ │ │ ├── index.html │ │ │ └── q.js │ │ ├── r │ │ │ ├── LICENSE │ │ │ ├── index.html │ │ │ └── r.js │ │ ├── rpm │ │ │ ├── changes │ │ │ │ ├── changes.js │ │ │ │ └── index.html │ │ │ └── spec │ │ │ │ ├── index.html │ │ │ │ ├── spec.css │ │ │ │ └── spec.js │ │ ├── rst │ │ │ ├── LICENSE.txt │ │ │ ├── index.html │ │ │ └── rst.js │ │ ├── ruby │ │ │ ├── LICENSE │ │ │ ├── index.html │ │ │ └── ruby.js │ │ ├── rust │ │ │ ├── index.html │ │ │ └── rust.js │ │ ├── sass │ │ │ ├── index.html │ │ │ └── sass.js │ │ ├── scheme │ │ │ ├── index.html │ │ │ └── scheme.js │ │ ├── shell │ │ │ ├── index.html │ │ │ └── shell.js │ │ ├── sieve │ │ │ ├── LICENSE │ │ │ ├── index.html │ │ │ └── sieve.js │ │ ├── smalltalk │ │ │ ├── index.html │ │ │ └── smalltalk.js │ │ ├── smarty │ │ │ ├── index.html │ │ │ └── smarty.js │ │ ├── sparql │ │ │ ├── index.html │ │ │ └── sparql.js │ │ ├── stex │ │ │ ├── index.html │ │ │ ├── stex.js │ │ │ └── test.js │ │ ├── tcl │ │ │ ├── index.html │ │ │ └── tcl.js │ │ ├── tiddlywiki │ │ │ ├── index.html │ │ │ ├── tiddlywiki.css │ │ │ └── tiddlywiki.js │ │ ├── tiki │ │ │ ├── index.html │ │ │ ├── tiki.css │ │ │ └── tiki.js │ │ ├── turtle │ │ │ ├── index.html │ │ │ └── turtle.js │ │ ├── vb │ │ │ ├── LICENSE.txt │ │ │ ├── index.html │ │ │ └── vb.js │ │ ├── vbscript │ │ │ ├── index.html │ │ │ └── vbscript.js │ │ ├── velocity │ │ │ ├── index.html │ │ │ └── velocity.js │ │ ├── verilog │ │ │ ├── index.html │ │ │ └── verilog.js │ │ ├── xml │ │ │ ├── index.html │ │ │ └── xml.js │ │ ├── xquery │ │ │ ├── LICENSE │ │ │ ├── index.html │ │ │ ├── test.js │ │ │ └── xquery.js │ │ ├── yaml │ │ │ ├── index.html │ │ │ └── yaml.js │ │ └── z80 │ │ │ ├── index.html │ │ │ └── z80.js │ ├── package.json │ ├── test │ │ ├── doc_test.js │ │ ├── driver.js │ │ ├── index.html │ │ ├── lint │ │ │ ├── acorn.js │ │ │ ├── lint.js │ │ │ ├── parse-js.js │ │ │ └── walk.js │ │ ├── mode_test.css │ │ ├── mode_test.js │ │ ├── phantom_driver.js │ │ ├── run.js │ │ ├── test.js │ │ └── vim_test.js │ └── theme │ │ ├── ambiance-mobile.css │ │ ├── ambiance.css │ │ ├── blackboard.css │ │ ├── cobalt.css │ │ ├── eclipse.css │ │ ├── elegant.css │ │ ├── erlang-dark.css │ │ ├── lesser-dark.css │ │ ├── midnight.css │ │ ├── monokai.css │ │ ├── neat.css │ │ ├── night.css │ │ ├── rubyblue.css │ │ ├── solarized.css │ │ ├── twilight.css │ │ ├── vibrant-ink.css │ │ ├── xq-dark.css │ │ └── xq-light.css ├── jquery-1.8.3.min.js └── prettify │ ├── desert.css │ ├── lang-css.js │ ├── lang-tex.js │ ├── prettify.css │ ├── prettify.js │ └── sunburst.css ├── package.json └── start.bat /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | *.sln merge=union 7 | *.csproj merge=union 8 | *.vbproj merge=union 9 | *.fsproj merge=union 10 | *.dbproj merge=union 11 | 12 | # Standard to msysgit 13 | *.doc diff=astextplain 14 | *.DOC diff=astextplain 15 | *.docx diff=astextplain 16 | *.DOCX diff=astextplain 17 | *.dot diff=astextplain 18 | *.DOT diff=astextplain 19 | *.pdf diff=astextplain 20 | *.PDF diff=astextplain 21 | *.rtf diff=astextplain 22 | *.RTF diff=astextplain 23 | -------------------------------------------------------------------------------- /.idea/jsLinters/jshint.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /.idea/libraries/sass_stdlib.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /Client/Web.css: -------------------------------------------------------------------------------- 1 | #logger { 2 | background-color: white; 3 | overflow: auto; 4 | margin: 5px; 5 | -o-box-shadow: 0 0 5px 1px #888; 6 | -moz-box-shadow: 0 0 5px 1px #888; 7 | -webkit-box-shadow: 0 0 5px 1px #888; 8 | box-shadow: 0 0 5px 1px #888; 9 | } 10 | 11 | #logger::-webkit-scrollbar { 12 | width: 15px 13 | } 14 | 15 | #logger::-webkit-scrollbar-button:vertical { 16 | background-color: transparent; 17 | height: 5px 18 | } 19 | 20 | #logger::-webkit-scrollbar-button:start:decrement { 21 | display: block 22 | } 23 | 24 | #logger::-webkit-scrollbar-button:end:increment { 25 | display: block 26 | } 27 | 28 | #logger::-webkit-scrollbar-button:vertical:start:increment { 29 | display: none 30 | } 31 | 32 | #logger::-webkit-scrollbar-button:vertical:end:decrement { 33 | display: none 34 | } 35 | 36 | #logger::-webkit-scrollbar-track-piece { 37 | background-color: white 38 | } 39 | 40 | #logger::-webkit-scrollbar-thumb:vertical { 41 | background-color: rgba(0, 0, 0, 0.2); 42 | height: 50px; 43 | border-right: 4px solid white; 44 | border-left: 4px solid white 45 | } 46 | 47 | #logger::-webkit-scrollbar-thumb:vertical:hover { 48 | background-color: rgba(0, 0, 0, 0.4) 49 | } 50 | 51 | #logger::-webkit-scrollbar-corner:vertical { 52 | background-color: white 53 | } 54 | 55 | #logger::-webkit-scrollbar-resizer:vertical { 56 | background-color: red 57 | } -------------------------------------------------------------------------------- /ConsoleJS.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Example/demo.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | ConsoleJS - HTTP - Test Page 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 |

Info:

23 | 24 |
25 |
26 |
This
27 |
is
28 |
ConsoleJS
29 |
30 |
31 | 32 | -------------------------------------------------------------------------------- /Example/demoOnSSL.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | ConsoleJS - HTTPS - Test Page 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 |

Info:

23 | 24 |
25 |
26 |
This
27 |
is
28 |
ConsoleJS
29 |
30 |
31 | 32 | -------------------------------------------------------------------------------- /Example/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | ConsoleJS - HTTP - Test Page 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 |

Info:

23 | 24 |
25 |
26 |
This
27 |
is
28 |
ConsoleJS
29 |
30 |
31 | 32 | -------------------------------------------------------------------------------- /Example/indexOnSSL.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | ConsoleJS - HTTPS - Test Page 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 |

Info:

23 | 24 |
25 |
26 |
This
27 |
is
28 |
ConsoleJS
29 |
30 |
31 | 32 | -------------------------------------------------------------------------------- /Example/main.css: -------------------------------------------------------------------------------- 1 | html, body { 2 | background-color: #a9a9a9; 3 | margin: 0; 4 | padding: 0; 5 | } 6 | 7 | li { 8 | font-size: 12px; 9 | overflow: hidden; 10 | white-space: nowrap; 11 | text-overflow: ellipsis; 12 | width: 800px; 13 | } 14 | 15 | #wrapper { 16 | margin: 0; 17 | padding: 5px; 18 | font-size: 14px; 19 | background-color: #d3d3d3; 20 | color: black; 21 | margin: 5px; 22 | } -------------------------------------------------------------------------------- /Example/main.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created with JetBrains WebStorm. 3 | * User: nisheeth 4 | * Date: 22/01/13 5 | * Time: 16:51 6 | * To change this template use File | Settings | File Templates. 7 | */ 8 | var domReady = false; 9 | 10 | function init() { 11 | 12 | "use strict"; 13 | 14 | if (domReady) { 15 | return; 16 | } 17 | 18 | domReady = true; 19 | 20 | var log = document.getElementById('log'), 21 | connectionMode = document.getElementById('ConnectionMode'), 22 | debug = document.getElementById('debug'), 23 | name = ConsoleJS.Browser.toString(), 24 | currentIndex = 0, 25 | Commands = [ 26 | "console.log('log test');", 27 | "console.info('info test');", 28 | "console.warn('warn test');", 29 | "console.debug('debug test');", 30 | "console.assert(1 === 1, 'assert test');", 31 | "console.assert(1 !== 1, 'assert test');", 32 | "console.dir(document.getElementById('dummy'));", 33 | "console.dirxml(document.getElementById('dummy'));", 34 | "console.time('test');", 35 | "console.time('test-child');", 36 | "console.count('test');", 37 | "console.count('test-child');", 38 | "console.count('test-child');", 39 | "console.count('test');", 40 | "console.timeEnd('test-child');", 41 | "console.timeEnd('test');", 42 | "console.trace();", 43 | "console.error();" 44 | ], 45 | length = Commands.length; 46 | 47 | setInterval(function () { 48 | if (currentIndex < length) { 49 | eval(Commands[currentIndex++]); 50 | eval(Commands[currentIndex++]); 51 | } else { 52 | currentIndex = 0; 53 | } 54 | }, 3000); 55 | 56 | window.onerror = function (msg, url, line) { 57 | debug.innerHTML += '
Error message: ' + msg + '\nURL: ' + url + '\nLine Number: ' + line; 58 | return true; 59 | }; 60 | 61 | ConsoleJS.on('console', function (data) { 62 | var connection; 63 | if (ConsoleJS.Socket) { 64 | connection = ConsoleJS.Socket.getConnectionStatus() + ' : ' + ConsoleJS.Socket.getConnectionMode(); 65 | } 66 | 67 | connectionMode.innerHTML = 'Name: ' + name + ' : ' + connection; 68 | }); 69 | } 70 | 71 | ConsoleJS.ready(init); -------------------------------------------------------------------------------- /Remote/Config.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created with IntelliJ IDEA. 3 | * User: nisheeth 4 | * Date: 12/02/13 5 | * Time: 19:54 6 | * To change this template use File | Settings | File Templates. 7 | */ 8 | 9 | ConsoleJS.Utils.namespace("ConsoleJS.Remote.Config"); 10 | 11 | ConsoleJS.Remote.Config = (function () { 12 | 13 | "use strict"; 14 | 15 | var key = "ConsoleJS.config", 16 | store = ConsoleJS.Remote.Store.Local, 17 | settings = store.get(key); 18 | 19 | if (!settings) { 20 | settings = { 21 | preserveLogs: true, 22 | maxLogPreserved: 500, 23 | maxLogs: 500, 24 | cache: 1.5 25 | }; 26 | 27 | settings.logCache = (settings.maxLogs * settings.cache); 28 | settings.storeCache = (settings.maxLogPreserved * settings.cache); 29 | } 30 | 31 | function set(cfg) { 32 | ConsoleJS.Utils.merge(cfg, settings); 33 | settings.logCache = (settings.maxLogs * settings.cache); 34 | settings.storeCache = (settings.maxLogPreserved * settings.cache); 35 | store.set(key, settings); 36 | } 37 | 38 | function get(name) { 39 | return settings[name] || null; 40 | } 41 | 42 | return { 43 | set: set, 44 | get: get 45 | }; 46 | }()); 47 | 48 | -------------------------------------------------------------------------------- /Remote/Store.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created with IntelliJ IDEA. 3 | * User: nisheeth 4 | * Date: 12/02/13 5 | * Time: 19:54 6 | * To change this template use File | Settings | File Templates. 7 | */ 8 | 9 | ConsoleJS.Utils.namespace("ConsoleJS.Remote.Store"); 10 | 11 | ConsoleJS.Remote.Store = function Store(type) { 12 | var scope = this; 13 | this.storageType = (type || "").toLowerCase() === 'local' ? 'localStorage' : 'sessionStorage'; 14 | this.isStorageSupported = (function isStorageSupported() { 15 | try { 16 | return scope.storageType in window && window[scope.storageType] !== null; 17 | } catch (e) { 18 | return false; 19 | } 20 | }()); 21 | 22 | this.storage = this.isStorageSupported ? window[this.storageType] : {}; 23 | }; 24 | 25 | ConsoleJS.Remote.Store.prototype.set = function set(key, value) { 26 | if (this.isStorageSupported) { 27 | this.storage.setItem(key, JSON.stringify(value)); 28 | } else { 29 | this.storage[key] = value; 30 | } 31 | }; 32 | 33 | ConsoleJS.Remote.Store.prototype.append = function append(key, value) { 34 | var store = this.get(key); 35 | if (!store) { 36 | this.set(key, [value]); 37 | } else if (!ConsoleJS.Utils.isArray(store)) { 38 | this.set(key, [store, value]); 39 | } else { 40 | store.push(value); 41 | this.set(key, store); 42 | } 43 | }; 44 | 45 | ConsoleJS.Remote.Store.prototype.unSet = function unSet(key) { 46 | if (this.isStorageSupported) { 47 | this.storage.removeItem(key); 48 | } else { 49 | delete this.storage[key]; 50 | } 51 | }; 52 | 53 | ConsoleJS.Remote.Store.prototype.get = function get(key) { 54 | if (this.isStorageSupported) { 55 | var data = this.storage.getItem(key); 56 | return data ? JSON.parse(data) : null; 57 | } else { 58 | return this.storage[key] || null; 59 | } 60 | }; 61 | 62 | ConsoleJS.Remote.Store.prototype.reset = function reset() { 63 | if (this.isStorageSupported) { 64 | this.storage.clear(); 65 | } else { 66 | this.storage = {}; 67 | } 68 | }; 69 | 70 | ConsoleJS.Remote.Store.Local = new ConsoleJS.Remote.Store('local'); 71 | ConsoleJS.Remote.Store.Memory = new ConsoleJS.Remote.Store(); -------------------------------------------------------------------------------- /Remote/icons/offline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nkashyap/ConsoleJS/64613aba1d3a03c16ce5cb3464fe18e18b41ba36/Remote/icons/offline.png -------------------------------------------------------------------------------- /Remote/icons/online.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nkashyap/ConsoleJS/64613aba1d3a03c16ce5cb3464fe18e18b41ba36/Remote/icons/online.png -------------------------------------------------------------------------------- /Server/Config.js: -------------------------------------------------------------------------------- 1 | var config = { 2 | port: 8082, 3 | secure: false 4 | }; 5 | 6 | module.exports = config; 7 | 8 | -------------------------------------------------------------------------------- /Server/ConsoleClient.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created with JetBrains WebStorm. 3 | * User: nisheeth 4 | * Date: 14/01/13 5 | * Time: 15:31 6 | * To change this template use File | Settings | File Templates. 7 | */ 8 | 9 | function ConsoleClient(manager, socket) { 10 | this.manager = manager; 11 | this.socket = socket; 12 | this.id = this.socket.handshake.guid || this.socket.id; 13 | this.room = null; 14 | } 15 | 16 | ConsoleClient.prototype.join = function join(room) { 17 | if (this.room) { 18 | this.leave(); 19 | } 20 | 21 | this.room = room; 22 | this.room.join(this); 23 | this.subscribe(this.room.name); 24 | }; 25 | 26 | ConsoleClient.prototype.leave = function leave() { 27 | if (this.room) { 28 | this.unSubscribe(this.room.name); 29 | this.room.leave(this); 30 | this.room = null; 31 | } 32 | }; 33 | 34 | ConsoleClient.prototype.getTransportMode = function getTransportMode() { 35 | return this.id + ":" + this.manager.getTransportMode(this.socket); 36 | }; 37 | 38 | ConsoleClient.prototype.subscribe = function subscribe(name) { 39 | this.emit('subscribed', { name: name }); 40 | this.socket.join(name); 41 | }; 42 | 43 | ConsoleClient.prototype.unSubscribe = function unSubscribe(name) { 44 | this.socket.leave(name); 45 | this.emit('unsubscribed', { name: name }); 46 | }; 47 | 48 | ConsoleClient.prototype.emit = function emit(eventName, data) { 49 | this.socket.emit(eventName, data); 50 | }; 51 | 52 | ConsoleClient.prototype.broadcast = function broadcast(eventName, data, room) { 53 | this.socket.broadcast.to(room).emit(eventName, data); 54 | }; 55 | 56 | ConsoleClient.prototype.remove = function remove() { 57 | this.leave(); 58 | }; 59 | 60 | module.exports = ConsoleClient; -------------------------------------------------------------------------------- /Server/ControlClient.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created with JetBrains WebStorm. 3 | * User: nisheeth 4 | * Date: 14/01/13 5 | * Time: 15:31 6 | * To change this template use File | Settings | File Templates. 7 | */ 8 | 9 | function ControlClient(manager, socket) { 10 | this.manager = manager; 11 | this.socket = socket; 12 | this.id = this.socket.handshake.guid || this.socket.id; 13 | this.rooms = []; 14 | } 15 | 16 | ControlClient.prototype.join = function join(room) { 17 | if (this.rooms.indexOf(room) === -1) { 18 | this.rooms.push(room); 19 | room.subscribe(this); 20 | this.subscribe(room.name); 21 | } 22 | }; 23 | 24 | ControlClient.prototype.leave = function leave(room) { 25 | var index = this.rooms.indexOf(room); 26 | if (index > -1) { 27 | this.rooms.splice(index, 1); 28 | room.unSubscribe(this); 29 | this.unSubscribe(room.name); 30 | } 31 | }; 32 | 33 | ControlClient.prototype.subscribe = function subscribe(name) { 34 | this.emit('subscribed', { name: name }); 35 | this.socket.join(name); 36 | }; 37 | 38 | ControlClient.prototype.unSubscribe = function unSubscribe(name) { 39 | this.emit('unsubscribed', { name: name }); 40 | this.socket.leave(name); 41 | }; 42 | 43 | ControlClient.prototype.emit = function emit(eventName, data) { 44 | this.socket.emit(eventName, data); 45 | }; 46 | 47 | ControlClient.prototype.broadcast = function broadcast(eventName, data, room) { 48 | this.socket.broadcast.to(room).emit(eventName, data); 49 | }; 50 | 51 | ControlClient.prototype.remove = function remove() { 52 | var self = this; 53 | this.rooms.forEach(function (room) { 54 | self.leave(room); 55 | }); 56 | }; 57 | 58 | module.exports = ControlClient; -------------------------------------------------------------------------------- /Server/Guid.js: -------------------------------------------------------------------------------- 1 | var GUID = { 2 | 3 | cookieName: "guid", 4 | 5 | expiry: 365, 6 | 7 | getCookie: function getCookie(document) { 8 | if (document && document.cookie) { 9 | var i, 10 | cookieName, 11 | cookieValue, 12 | cookies = document.cookie.split(";"); 13 | 14 | for (i = 0; i < cookies.length; i++) { 15 | cookieName = (cookies[i].substr(0, cookies[i].indexOf("="))).replace(/^\s+|\s+$/g, ""); 16 | cookieValue = cookies[i].substr(cookies[i].indexOf("=") + 1); 17 | 18 | if (cookieName === this.cookieName) { 19 | return unescape(cookieValue); 20 | } 21 | } 22 | } 23 | 24 | return null; 25 | }, 26 | 27 | generateUniqueId: function generateUniqueId() { 28 | return ((new Date().getTime()) + "-" + Math.random()).replace(".", ""); 29 | }, 30 | 31 | getValue: function getValue(value) { 32 | var expiryDate = new Date(); 33 | expiryDate.setDate(expiryDate.getDate() + this.expiry); 34 | return this.cookieName + "=" + escape(value) + ((this.expiry === null) ? "" : "; expires=" + expiryDate.toUTCString()) + "; path=/"; 35 | }, 36 | 37 | set: function set(document, value) { 38 | if (!value) { 39 | value = this.get(document.headers); 40 | } 41 | 42 | value = this.getValue(value); 43 | 44 | if (document.setHeader) { 45 | document.setHeader("Set-Cookie", [value]); 46 | } else if (document.headers) { 47 | document.headers.cookie = value; 48 | } 49 | }, 50 | 51 | get: function get(document) { 52 | var uniqueId = this.getCookie(document); 53 | if (!uniqueId) { 54 | uniqueId = this.generateUniqueId(); 55 | } 56 | return uniqueId; 57 | }, 58 | 59 | isSet: function isSet(document) { 60 | return !!this.getCookie(document); 61 | } 62 | }; 63 | 64 | module.exports = GUID; -------------------------------------------------------------------------------- /Server/Room.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created with IntelliJ IDEA. 3 | * User: Nisheeth 4 | * Date: 14/01/13 5 | * Time: 18:21 6 | * To change this template use File | Settings | File Templates. 7 | */ 8 | 9 | function Room(manager, data) { 10 | this.manager = manager; 11 | this.name = data.name; 12 | this.controls = []; 13 | this.consoles = []; 14 | } 15 | 16 | Room.prototype.join = function join(client) { 17 | if (this.consoles.indexOf(client) === -1) { 18 | this.consoles.push(client); 19 | this.detectState(); 20 | } 21 | }; 22 | 23 | Room.prototype.leave = function leave(client) { 24 | var index = this.consoles.indexOf(client); 25 | if (index > -1) { 26 | this.consoles.splice(index, 1); 27 | this.detectState(); 28 | } 29 | }; 30 | 31 | Room.prototype.subscribe = function subscribe(control) { 32 | if (this.controls.indexOf(control) === -1) { 33 | this.controls.push(control); 34 | } 35 | }; 36 | 37 | Room.prototype.unSubscribe = function unSubscribe(control) { 38 | var index = this.controls.indexOf(control); 39 | if (index > -1) { 40 | this.controls.splice(index, 1); 41 | } 42 | }; 43 | 44 | Room.prototype.detectState = function detectState() { 45 | if (this.consoles.length > 0) { 46 | this.online(); 47 | } else { 48 | this.offline(); 49 | } 50 | }; 51 | 52 | Room.prototype.getTransportMode = function getTransportMode() { 53 | var mode = []; 54 | this.consoles.forEach(function (item) { 55 | mode.push(item.getTransportMode()); 56 | }); 57 | return mode.join(","); 58 | }; 59 | 60 | Room.prototype.online = function online() { 61 | this.manager.emit('online', { 62 | name: this.name, 63 | mode: this.getTransportMode() 64 | }); 65 | }; 66 | 67 | Room.prototype.offline = function offline() { 68 | this.manager.emit('offline', { 69 | name: this.name, 70 | mode: this.getTransportMode() 71 | }); 72 | }; 73 | 74 | Room.prototype.log = function log(data) { 75 | this.controls.forEach(function (control) { 76 | control.emit('console', data); 77 | }); 78 | }; 79 | 80 | Room.prototype.command = function command(data) { 81 | this.consoles.forEach(function (item) { 82 | item.emit('command', data); 83 | }); 84 | }; 85 | 86 | module.exports = Room; -------------------------------------------------------------------------------- /Server/Start.js: -------------------------------------------------------------------------------- 1 | var config = require('./Config'), 2 | server = require('./Server'); 3 | 4 | server.start(config); -------------------------------------------------------------------------------- /certificates/certificate.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICxzCCAjACCQDiVaBx4ufohTANBgkqhkiG9w0BAQUFADCBpzELMAkGA1UEBhMC 3 | VUsxEzARBgNVBAgMClNvbWUtU3RhdGUxDzANBgNVBAcMBkxvbmRvbjEVMBMGA1UE 4 | CgwMQmxpbmtib3ggTHRkMRMwEQYDVQQLDApUZWNobm9sb2d5MSAwHgYDVQQDDBdj 5 | b25zb2xlLnRoZWRpY3RhdG9yLmNvbTEkMCIGCSqGSIb3DQEJARYVbmlzaGVldGhA 6 | Ymxpbmtib3guY29tMB4XDTEzMDIxODExMDk0MVoXDTEzMDMyMDExMDk0MVowgacx 7 | CzAJBgNVBAYTAlVLMRMwEQYDVQQIDApTb21lLVN0YXRlMQ8wDQYDVQQHDAZMb25k 8 | b24xFTATBgNVBAoMDEJsaW5rYm94IEx0ZDETMBEGA1UECwwKVGVjaG5vbG9neTEg 9 | MB4GA1UEAwwXY29uc29sZS50aGVkaWN0YXRvci5jb20xJDAiBgkqhkiG9w0BCQEW 10 | FW5pc2hlZXRoQGJsaW5rYm94LmNvbTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkC 11 | gYEAzAx1+DWJWsh8PKR7QXsFrxolUSzg963SkDffp5aUIPw2P9e9qAWArxt+dh1M 12 | rfnMOO9ZYzEwxHv/Y5ar0nmPqoOObYtJmWHW8Y643OSs5m3HZdn3fjkNYLmH195E 13 | 1oj3DGyX71h+Csh47KDoYG8+0QQbNDXn01Fr9Ff9MKGvVjsCAwEAATANBgkqhkiG 14 | 9w0BAQUFAAOBgQCDkuc8vul43FB1RBytwFyMIhTRP1l8lkbYn3P4LMymaDzFcKFV 15 | mhMufUviT0MSG/jiDv63WuJD1lC1Xdl+pnC3q1sKW81/3T+yH/ODwENFQSicmhE3 16 | TFthLvRQM8OI1nmyw0Bgj8DWBEosQahdF8HOrKw8qj4ypj8XKysRuxaEdw== 17 | -----END CERTIFICATE----- 18 | -------------------------------------------------------------------------------- /certificates/certrequest.csr: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE REQUEST----- 2 | MIICATCCAWoCAQAwgacxCzAJBgNVBAYTAlVLMRMwEQYDVQQIDApTb21lLVN0YXRl 3 | MQ8wDQYDVQQHDAZMb25kb24xFTATBgNVBAoMDEJsaW5rYm94IEx0ZDETMBEGA1UE 4 | CwwKVGVjaG5vbG9neTEgMB4GA1UEAwwXY29uc29sZS50aGVkaWN0YXRvci5jb20x 5 | JDAiBgkqhkiG9w0BCQEWFW5pc2hlZXRoQGJsaW5rYm94LmNvbTCBnzANBgkqhkiG 6 | 9w0BAQEFAAOBjQAwgYkCgYEAzAx1+DWJWsh8PKR7QXsFrxolUSzg963SkDffp5aU 7 | IPw2P9e9qAWArxt+dh1MrfnMOO9ZYzEwxHv/Y5ar0nmPqoOObYtJmWHW8Y643OSs 8 | 5m3HZdn3fjkNYLmH195E1oj3DGyX71h+Csh47KDoYG8+0QQbNDXn01Fr9Ff9MKGv 9 | VjsCAwEAAaAZMBcGCSqGSIb3DQEJBzEKDAhBYXJ0aTEiMzANBgkqhkiG9w0BAQUF 10 | AAOBgQCYuDrcWO3tHFJ2E399WRFbyGw/sPjYMdQINMsGDz70pqB/H98x0z+xSzmR 11 | 0eCJYxy14UJdIPrhuMixesbh8Pf69h0mFo4x7lJAkLoS/BAKbjZ/+C0UdX2I/BFY 12 | g7s0r6bOwlGCKN9m6n42YD/FKoTTGo/CP2LBFVL2Yu0Ke9QASw== 13 | -----END CERTIFICATE REQUEST----- 14 | -------------------------------------------------------------------------------- /certificates/privatekey.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN RSA PRIVATE KEY----- 2 | MIICXwIBAAKBgQDMDHX4NYlayHw8pHtBewWvGiVRLOD3rdKQN9+nlpQg/DY/172o 3 | BYCvG352HUyt+cw471ljMTDEe/9jlqvSeY+qg45ti0mZYdbxjrjc5Kzmbcdl2fd+ 4 | OQ1guYfX3kTWiPcMbJfvWH4KyHjsoOhgbz7RBBs0NefTUWv0V/0woa9WOwIDAQAB 5 | AoGBAK95G84rBAbtGGHyNQjXqciuXF8VkBWPBt/9HLn7NUG0g1adyjx/Fu3/X95l 6 | TfbjNavUsXMq7zxZQgQ7o2FqJo+6sr+9Wfg7Wdgn1bDZ3kgtqo4h5VRctArBveMP 7 | iuJzUdSqYLlRep0Up/668NYplzyWkbtSkIP8+UM2k1TCNIUpAkEA+qdvZ88EC1W6 8 | 7icD7HjT8V1Y7nt0kGP4W6uaQEjMK0TTgfp/wGc76EHqSKaWYOkxy+/ZjYaz6WAB 9 | Cd2i9YbY1QJBANBmj73qBGVaa3XU8q0tb4kSAf+Dlfv3QsHetUOevdKXWsmasG9E 10 | hh7Vtg1rfLnM3tExma0nckv7sCcEG3VO+s8CQQCFW1fWbznDnhUaZ/+abJ62p+eM 11 | 2nol6EpW23HyCck2rCOr387gWwxwgcFYbelMHkW0LyQcPDK0U7O5wAXXg6sRAkEA 12 | nrvf9KnQ21o5y7B9f4bCE8eRmguiLB8zy/NUYcMBluwODM00YivxdH8XgbVDdUok 13 | 1XZQNWF8X3+/tpgcSgf0ZQJBAL12G1zst2CjQvf2aNKUd00K2qM2DwnpyClmhdkh 14 | DY5Huppg3ADHnWIhvimV9qkNwWanxtc1l3OTKnAVT9aUn8M= 15 | -----END RSA PRIVATE KEY----- 16 | -------------------------------------------------------------------------------- /consoleJS.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nkashyap/ConsoleJS/64613aba1d3a03c16ce5cb3464fe18e18b41ba36/consoleJS.PNG -------------------------------------------------------------------------------- /install.bat: -------------------------------------------------------------------------------- 1 | npm install socket.io -------------------------------------------------------------------------------- /lib/bootstrap/img/glyphicons-halflings-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nkashyap/ConsoleJS/64613aba1d3a03c16ce5cb3464fe18e18b41ba36/lib/bootstrap/img/glyphicons-halflings-white.png -------------------------------------------------------------------------------- /lib/bootstrap/img/glyphicons-halflings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nkashyap/ConsoleJS/64613aba1d3a03c16ce5cb3464fe18e18b41ba36/lib/bootstrap/img/glyphicons-halflings.png -------------------------------------------------------------------------------- /lib/codemirror/.gitattributes: -------------------------------------------------------------------------------- 1 | *.txt text 2 | *.js text 3 | *.html text 4 | *.md text 5 | *.json text 6 | *.yml text 7 | *.css text 8 | *.svg text 9 | -------------------------------------------------------------------------------- /lib/codemirror/.gitignore: -------------------------------------------------------------------------------- 1 | /node_modules 2 | /npm-debug.log 3 | test.html 4 | .tern-* 5 | -------------------------------------------------------------------------------- /lib/codemirror/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - 0.8 4 | -------------------------------------------------------------------------------- /lib/codemirror/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (C) 2013 by Marijn Haverbeke 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | 21 | Please note that some subdirectories of the CodeMirror distribution 22 | include their own LICENSE files, and are released under different 23 | licences. 24 | -------------------------------------------------------------------------------- /lib/codemirror/README.md: -------------------------------------------------------------------------------- 1 | # CodeMirror 2 | [![Build Status](https://secure.travis-ci.org/marijnh/CodeMirror.png?branch=master)](http://travis-ci.org/marijnh/CodeMirror) 3 | [![NPM version](https://badge.fury.io/js/codemirror.png)](http://badge.fury.io/js/codemirror) 4 | 5 | CodeMirror is a JavaScript component that provides a code editor in 6 | the browser. When a mode is available for the language you are coding 7 | in, it will color your code, and optionally help with indentation. 8 | 9 | The project page is http://codemirror.net 10 | The manual is at http://codemirror.net/doc/manual.html 11 | The contributing guidelines are in [CONTRIBUTING.md](https://github.com/marijnh/CodeMirror/blob/master/CONTRIBUTING.md) 12 | -------------------------------------------------------------------------------- /lib/codemirror/addon/dialog/dialog.css: -------------------------------------------------------------------------------- 1 | .CodeMirror-dialog { 2 | position: absolute; 3 | left: 0; right: 0; 4 | background: white; 5 | z-index: 15; 6 | padding: .1em .8em; 7 | overflow: hidden; 8 | color: #333; 9 | } 10 | 11 | .CodeMirror-dialog-top { 12 | border-bottom: 1px solid #eee; 13 | top: 0; 14 | } 15 | 16 | .CodeMirror-dialog-bottom { 17 | border-top: 1px solid #eee; 18 | bottom: 0; 19 | } 20 | 21 | .CodeMirror-dialog input { 22 | border: none; 23 | outline: none; 24 | background: transparent; 25 | width: 20em; 26 | color: inherit; 27 | font-family: monospace; 28 | } 29 | 30 | .CodeMirror-dialog button { 31 | font-size: 70%; 32 | } 33 | -------------------------------------------------------------------------------- /lib/codemirror/addon/display/placeholder.js: -------------------------------------------------------------------------------- 1 | (function() { 2 | CodeMirror.defineOption("placeholder", "", function(cm, val, old) { 3 | var prev = old && old != CodeMirror.Init; 4 | if (val && !prev) { 5 | cm.on("focus", onFocus); 6 | cm.on("blur", onBlur); 7 | cm.on("change", onChange); 8 | onChange(cm); 9 | } else if (!val && prev) { 10 | cm.off("focus", onFocus); 11 | cm.off("blur", onBlur); 12 | cm.off("change", onChange); 13 | clearPlaceholder(cm); 14 | var wrapper = cm.getWrapperElement(); 15 | wrapper.className = wrapper.className.replace(" CodeMirror-empty", ""); 16 | } 17 | 18 | if (val && !cm.hasFocus()) onBlur(cm); 19 | }); 20 | 21 | function clearPlaceholder(cm) { 22 | if (cm._placeholder) { 23 | cm._placeholder.parentNode.removeChild(cm._placeholder); 24 | cm._placeholder = null; 25 | } 26 | } 27 | function setPlaceholder(cm) { 28 | clearPlaceholder(cm); 29 | var elt = cm._placeholder = document.createElement("pre"); 30 | elt.style.cssText = "height: 0; overflow: visible"; 31 | elt.className = "CodeMirror-placeholder"; 32 | elt.appendChild(document.createTextNode(cm.getOption("placeholder"))); 33 | cm.display.lineSpace.insertBefore(elt, cm.display.lineSpace.firstChild); 34 | } 35 | 36 | function onFocus(cm) { 37 | clearPlaceholder(cm); 38 | } 39 | function onBlur(cm) { 40 | if (isEmpty(cm)) setPlaceholder(cm); 41 | } 42 | function onChange(cm) { 43 | var wrapper = cm.getWrapperElement(), empty = isEmpty(cm); 44 | wrapper.className = wrapper.className.replace(" CodeMirror-empty", "") + (empty ? " CodeMirror-empty" : ""); 45 | 46 | if (cm.hasFocus()) return; 47 | if (empty) setPlaceholder(cm); 48 | else clearPlaceholder(cm); 49 | } 50 | 51 | function isEmpty(cm) { 52 | return (cm.lineCount() === 1) && (cm.getLine(0) === ""); 53 | } 54 | })(); 55 | -------------------------------------------------------------------------------- /lib/codemirror/addon/edit/closebrackets.js: -------------------------------------------------------------------------------- 1 | (function() { 2 | var DEFAULT_BRACKETS = "()[]{}''\"\""; 3 | var SPACE_CHAR_REGEX = /\s/; 4 | 5 | CodeMirror.defineOption("autoCloseBrackets", false, function(cm, val, old) { 6 | var wasOn = old && old != CodeMirror.Init; 7 | if (val && !wasOn) 8 | cm.addKeyMap(buildKeymap(typeof val == "string" ? val : DEFAULT_BRACKETS)); 9 | else if (!val && wasOn) 10 | cm.removeKeyMap("autoCloseBrackets"); 11 | }); 12 | 13 | function buildKeymap(pairs) { 14 | var map = { 15 | name : "autoCloseBrackets", 16 | Backspace: function(cm) { 17 | if (cm.somethingSelected()) return CodeMirror.Pass; 18 | var cur = cm.getCursor(), line = cm.getLine(cur.line); 19 | if (cur.ch && cur.ch < line.length && 20 | pairs.indexOf(line.slice(cur.ch - 1, cur.ch + 1)) % 2 == 0) 21 | cm.replaceRange("", CodeMirror.Pos(cur.line, cur.ch - 1), CodeMirror.Pos(cur.line, cur.ch + 1)); 22 | else 23 | return CodeMirror.Pass; 24 | } 25 | }; 26 | var closingBrackets = []; 27 | for (var i = 0; i < pairs.length; i += 2) (function(left, right) { 28 | if (left != right) closingBrackets.push(right); 29 | function surround(cm) { 30 | var selection = cm.getSelection(); 31 | cm.replaceSelection(left + selection + right); 32 | } 33 | function maybeOverwrite(cm) { 34 | var cur = cm.getCursor(), ahead = cm.getRange(cur, CodeMirror.Pos(cur.line, cur.ch + 1)); 35 | if (ahead != right || cm.somethingSelected()) return CodeMirror.Pass; 36 | else cm.execCommand("goCharRight"); 37 | } 38 | map["'" + left + "'"] = function(cm) { 39 | if (left == "'" && cm.getTokenAt(cm.getCursor()).type == "comment") 40 | return CodeMirror.Pass; 41 | if (cm.somethingSelected()) return surround(cm); 42 | if (left == right && maybeOverwrite(cm) != CodeMirror.Pass) return; 43 | var cur = cm.getCursor(), ahead = CodeMirror.Pos(cur.line, cur.ch + 1); 44 | var line = cm.getLine(cur.line), nextChar = line.charAt(cur.ch); 45 | if (line.length == cur.ch || closingBrackets.indexOf(nextChar) >= 0 || SPACE_CHAR_REGEX.test(nextChar)) 46 | cm.replaceSelection(left + right, {head: ahead, anchor: ahead}); 47 | else 48 | return CodeMirror.Pass; 49 | }; 50 | if (left != right) map["'" + right + "'"] = maybeOverwrite; 51 | })(pairs.charAt(i), pairs.charAt(i + 1)); 52 | return map; 53 | } 54 | })(); 55 | -------------------------------------------------------------------------------- /lib/codemirror/addon/edit/continuecomment.js: -------------------------------------------------------------------------------- 1 | (function() { 2 | var modes = ["clike", "css", "javascript"]; 3 | for (var i = 0; i < modes.length; ++i) 4 | CodeMirror.extendMode(modes[i], {blockCommentStart: "/*", 5 | blockCommentEnd: "*/", 6 | blockCommentContinue: " * "}); 7 | 8 | function continueComment(cm) { 9 | var pos = cm.getCursor(), token = cm.getTokenAt(pos); 10 | var mode = CodeMirror.innerMode(cm.getMode(), token.state).mode; 11 | var space; 12 | 13 | if (token.type == "comment" && mode.blockCommentStart) { 14 | var end = token.string.indexOf(mode.blockCommentEnd); 15 | var full = cm.getRange(CodeMirror.Pos(pos.line, 0), CodeMirror.Pos(pos.line, token.end)), found; 16 | if (end != -1 && end == token.string.length - mode.blockCommentEnd.length) { 17 | // Comment ended, don't continue it 18 | } else if (token.string.indexOf(mode.blockCommentStart) == 0) { 19 | space = full.slice(0, token.start); 20 | if (!/^\s*$/.test(space)) { 21 | space = ""; 22 | for (var i = 0; i < token.start; ++i) space += " "; 23 | } 24 | } else if ((found = full.indexOf(mode.blockCommentContinue)) != -1 && 25 | found + mode.blockCommentContinue.length > token.start && 26 | /^\s*$/.test(full.slice(0, found))) { 27 | space = full.slice(0, found); 28 | } 29 | } 30 | 31 | if (space != null) 32 | cm.replaceSelection("\n" + space + mode.blockCommentContinue, "end"); 33 | else 34 | return CodeMirror.Pass; 35 | } 36 | 37 | CodeMirror.defineOption("continueComments", null, function(cm, val, prev) { 38 | if (prev && prev != CodeMirror.Init) 39 | cm.removeKeyMap("continueComment"); 40 | var map = {name: "continueComment"}; 41 | map[typeof val == "string" ? val : "Enter"] = continueComment; 42 | cm.addKeyMap(map); 43 | }); 44 | })(); 45 | -------------------------------------------------------------------------------- /lib/codemirror/addon/edit/continuelist.js: -------------------------------------------------------------------------------- 1 | (function() { 2 | 'use strict'; 3 | 4 | var listRE = /^(\s*)([*+-]|(\d+)\.)(\s*)/, 5 | unorderedBullets = '*+-'; 6 | 7 | CodeMirror.commands.newlineAndIndentContinueMarkdownList = function(cm) { 8 | var pos = cm.getCursor(), 9 | inList = cm.getStateAfter(pos.line).list, 10 | match; 11 | 12 | if (!inList || !(match = cm.getLine(pos.line).match(listRE))) { 13 | cm.execCommand('newlineAndIndent'); 14 | return; 15 | } 16 | 17 | var indent = match[1], after = match[4]; 18 | var bullet = unorderedBullets.indexOf(match[2]) >= 0 19 | ? match[2] 20 | : (parseInt(match[3], 10) + 1) + '.'; 21 | 22 | cm.replaceSelection('\n' + indent + bullet + after, 'end'); 23 | }; 24 | 25 | }()); 26 | -------------------------------------------------------------------------------- /lib/codemirror/addon/fold/brace-fold.js: -------------------------------------------------------------------------------- 1 | CodeMirror.braceRangeFinder = function(cm, start) { 2 | var line = start.line, lineText = cm.getLine(line); 3 | var at = lineText.length, startChar, tokenType; 4 | for (; at > 0;) { 5 | var found = lineText.lastIndexOf("{", at); 6 | if (found < start.ch) break; 7 | tokenType = cm.getTokenAt(CodeMirror.Pos(line, found + 1)).type; 8 | if (!/^(comment|string)/.test(tokenType)) { startChar = found; break; } 9 | at = found - 1; 10 | } 11 | if (startChar == null || lineText.lastIndexOf("}") > startChar) return; 12 | var count = 1, lastLine = cm.lineCount(), end, endCh; 13 | outer: for (var i = line + 1; i < lastLine; ++i) { 14 | var text = cm.getLine(i), pos = 0; 15 | for (;;) { 16 | var nextOpen = text.indexOf("{", pos), nextClose = text.indexOf("}", pos); 17 | if (nextOpen < 0) nextOpen = text.length; 18 | if (nextClose < 0) nextClose = text.length; 19 | pos = Math.min(nextOpen, nextClose); 20 | if (pos == text.length) break; 21 | if (cm.getTokenAt(CodeMirror.Pos(i, pos + 1)).type == tokenType) { 22 | if (pos == nextOpen) ++count; 23 | else if (!--count) { end = i; endCh = pos; break outer; } 24 | } 25 | ++pos; 26 | } 27 | } 28 | if (end == null || end == line + 1) return; 29 | return {from: CodeMirror.Pos(line, startChar + 1), 30 | to: CodeMirror.Pos(end, endCh)}; 31 | }; 32 | -------------------------------------------------------------------------------- /lib/codemirror/addon/fold/foldcode.js: -------------------------------------------------------------------------------- 1 | CodeMirror.newFoldFunction = function(rangeFinder, widget) { 2 | if (widget == null) widget = "\u2194"; 3 | if (typeof widget == "string") { 4 | var text = document.createTextNode(widget); 5 | widget = document.createElement("span"); 6 | widget.appendChild(text); 7 | widget.className = "CodeMirror-foldmarker"; 8 | } 9 | 10 | return function(cm, pos) { 11 | if (typeof pos == "number") pos = CodeMirror.Pos(pos, 0); 12 | var range = rangeFinder(cm, pos); 13 | if (!range) return; 14 | 15 | var present = cm.findMarksAt(range.from), cleared = 0; 16 | for (var i = 0; i < present.length; ++i) { 17 | if (present[i].__isFold) { 18 | ++cleared; 19 | present[i].clear(); 20 | } 21 | } 22 | if (cleared) return; 23 | 24 | var myWidget = widget.cloneNode(true); 25 | CodeMirror.on(myWidget, "mousedown", function() {myRange.clear();}); 26 | var myRange = cm.markText(range.from, range.to, { 27 | replacedWith: myWidget, 28 | clearOnEnter: true, 29 | __isFold: true 30 | }); 31 | }; 32 | }; 33 | -------------------------------------------------------------------------------- /lib/codemirror/addon/fold/indent-fold.js: -------------------------------------------------------------------------------- 1 | CodeMirror.indentRangeFinder = function(cm, start) { 2 | var tabSize = cm.getOption("tabSize"), firstLine = cm.getLine(start.line); 3 | var myIndent = CodeMirror.countColumn(firstLine, null, tabSize); 4 | for (var i = start.line + 1, end = cm.lineCount(); i < end; ++i) { 5 | var curLine = cm.getLine(i); 6 | if (CodeMirror.countColumn(curLine, null, tabSize) < myIndent && 7 | CodeMirror.countColumn(cm.getLine(i-1), null, tabSize) > myIndent) 8 | return {from: CodeMirror.Pos(start.line, firstLine.length), 9 | to: CodeMirror.Pos(i, curLine.length)}; 10 | } 11 | }; 12 | -------------------------------------------------------------------------------- /lib/codemirror/addon/fold/xml-fold.js: -------------------------------------------------------------------------------- 1 | CodeMirror.tagRangeFinder = (function() { 2 | var nameStartChar = "A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD"; 3 | var nameChar = nameStartChar + "\-\:\.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040"; 4 | var xmlTagStart = new RegExp("<(/?)([" + nameStartChar + "][" + nameChar + "]*)", "g"); 5 | 6 | return function(cm, start) { 7 | var line = start.line, ch = start.ch, lineText = cm.getLine(line); 8 | 9 | function nextLine() { 10 | if (line >= cm.lastLine()) return; 11 | ch = 0; 12 | lineText = cm.getLine(++line); 13 | return true; 14 | } 15 | function toTagEnd() { 16 | for (;;) { 17 | var gt = lineText.indexOf(">", ch); 18 | if (gt == -1) { if (nextLine()) continue; else return; } 19 | var lastSlash = lineText.lastIndexOf("/", gt); 20 | var selfClose = lastSlash > -1 && /^\s*$/.test(lineText.slice(lastSlash + 1, gt)); 21 | ch = gt + 1; 22 | return selfClose ? "selfClose" : "regular"; 23 | } 24 | } 25 | function toNextTag() { 26 | for (;;) { 27 | xmlTagStart.lastIndex = ch; 28 | var found = xmlTagStart.exec(lineText); 29 | if (!found) { if (nextLine()) continue; else return; } 30 | ch = found.index + found[0].length; 31 | return found; 32 | } 33 | } 34 | 35 | var stack = [], startCh; 36 | for (;;) { 37 | var openTag = toNextTag(), end; 38 | if (!openTag || line != start.line || !(end = toTagEnd())) return; 39 | if (!openTag[1] && end != "selfClose") { 40 | stack.push(openTag[2]); 41 | startCh = ch; 42 | break; 43 | } 44 | } 45 | 46 | for (;;) { 47 | var next = toNextTag(), end, tagLine = line, tagCh = ch - (next ? next[0].length : 0); 48 | if (!next || !(end = toTagEnd())) return; 49 | if (end == "selfClose") continue; 50 | if (next[1]) { // closing tag 51 | for (var i = stack.length - 1; i >= 0; --i) if (stack[i] == next[2]) { 52 | stack.length = i; 53 | break; 54 | } 55 | if (!stack.length) return { 56 | from: CodeMirror.Pos(start.line, startCh), 57 | to: CodeMirror.Pos(tagLine, tagCh) 58 | }; 59 | } else { // opening tag 60 | stack.push(next[2]); 61 | } 62 | } 63 | }; 64 | })(); 65 | -------------------------------------------------------------------------------- /lib/codemirror/addon/hint/show-hint.css: -------------------------------------------------------------------------------- 1 | .CodeMirror-hints { 2 | position: absolute; 3 | z-index: 10; 4 | overflow: hidden; 5 | list-style: none; 6 | 7 | margin: 0; 8 | padding: 2px; 9 | 10 | -webkit-box-shadow: 2px 3px 5px rgba(0,0,0,.2); 11 | -moz-box-shadow: 2px 3px 5px rgba(0,0,0,.2); 12 | box-shadow: 2px 3px 5px rgba(0,0,0,.2); 13 | border-radius: 3px; 14 | border: 1px solid silver; 15 | 16 | background: white; 17 | font-size: 90%; 18 | font-family: monospace; 19 | 20 | max-height: 20em; 21 | overflow-y: auto; 22 | } 23 | 24 | .CodeMirror-hint { 25 | margin: 0; 26 | padding: 0 4px; 27 | border-radius: 2px; 28 | max-width: 19em; 29 | overflow: hidden; 30 | white-space: pre; 31 | color: black; 32 | cursor: pointer; 33 | } 34 | 35 | .CodeMirror-hint-active { 36 | background: #08f; 37 | color: white; 38 | } 39 | -------------------------------------------------------------------------------- /lib/codemirror/addon/lint/json-lint.js: -------------------------------------------------------------------------------- 1 | // Depends on jsonlint.js from https://github.com/zaach/jsonlint 2 | 3 | CodeMirror.jsonValidator = function(text) { 4 | var found = []; 5 | jsonlint.parseError = function(str, hash) { 6 | var loc = hash.loc; 7 | found.push({from: CodeMirror.Pos(loc.first_line - 1, loc.first_column), 8 | to: CodeMirror.Pos(loc.last_line - 1, loc.last_column), 9 | message: str}); 10 | }; 11 | try { jsonlint.parse(text); } 12 | catch(e) {} 13 | return found; 14 | }; 15 | -------------------------------------------------------------------------------- /lib/codemirror/addon/mode/loadmode.js: -------------------------------------------------------------------------------- 1 | (function() { 2 | if (!CodeMirror.modeURL) CodeMirror.modeURL = "../mode/%N/%N.js"; 3 | 4 | var loading = {}; 5 | function splitCallback(cont, n) { 6 | var countDown = n; 7 | return function() { if (--countDown == 0) cont(); }; 8 | } 9 | function ensureDeps(mode, cont) { 10 | var deps = CodeMirror.modes[mode].dependencies; 11 | if (!deps) return cont(); 12 | var missing = []; 13 | for (var i = 0; i < deps.length; ++i) { 14 | if (!CodeMirror.modes.hasOwnProperty(deps[i])) 15 | missing.push(deps[i]); 16 | } 17 | if (!missing.length) return cont(); 18 | var split = splitCallback(cont, missing.length); 19 | for (var i = 0; i < missing.length; ++i) 20 | CodeMirror.requireMode(missing[i], split); 21 | } 22 | 23 | CodeMirror.requireMode = function(mode, cont) { 24 | if (typeof mode != "string") mode = mode.name; 25 | if (CodeMirror.modes.hasOwnProperty(mode)) return ensureDeps(mode, cont); 26 | if (loading.hasOwnProperty(mode)) return loading[mode].push(cont); 27 | 28 | var script = document.createElement("script"); 29 | script.src = CodeMirror.modeURL.replace(/%N/g, mode); 30 | var others = document.getElementsByTagName("script")[0]; 31 | others.parentNode.insertBefore(script, others); 32 | var list = loading[mode] = [cont]; 33 | var count = 0, poll = setInterval(function() { 34 | if (++count > 100) return clearInterval(poll); 35 | if (CodeMirror.modes.hasOwnProperty(mode)) { 36 | clearInterval(poll); 37 | loading[mode] = null; 38 | ensureDeps(mode, function() { 39 | for (var i = 0; i < list.length; ++i) list[i](); 40 | }); 41 | } 42 | }, 200); 43 | }; 44 | 45 | CodeMirror.autoLoadMode = function(instance, mode) { 46 | if (!CodeMirror.modes.hasOwnProperty(mode)) 47 | CodeMirror.requireMode(mode, function() { 48 | instance.setOption("mode", instance.getOption("mode")); 49 | }); 50 | }; 51 | }()); 52 | -------------------------------------------------------------------------------- /lib/codemirror/addon/mode/overlay.js: -------------------------------------------------------------------------------- 1 | // Utility function that allows modes to be combined. The mode given 2 | // as the base argument takes care of most of the normal mode 3 | // functionality, but a second (typically simple) mode is used, which 4 | // can override the style of text. Both modes get to parse all of the 5 | // text, but when both assign a non-null style to a piece of code, the 6 | // overlay wins, unless the combine argument was true, in which case 7 | // the styles are combined. 8 | 9 | // overlayParser is the old, deprecated name 10 | CodeMirror.overlayMode = CodeMirror.overlayParser = function(base, overlay, combine) { 11 | return { 12 | startState: function() { 13 | return { 14 | base: CodeMirror.startState(base), 15 | overlay: CodeMirror.startState(overlay), 16 | basePos: 0, baseCur: null, 17 | overlayPos: 0, overlayCur: null 18 | }; 19 | }, 20 | copyState: function(state) { 21 | return { 22 | base: CodeMirror.copyState(base, state.base), 23 | overlay: CodeMirror.copyState(overlay, state.overlay), 24 | basePos: state.basePos, baseCur: null, 25 | overlayPos: state.overlayPos, overlayCur: null 26 | }; 27 | }, 28 | 29 | token: function(stream, state) { 30 | if (stream.start == state.basePos) { 31 | state.baseCur = base.token(stream, state.base); 32 | state.basePos = stream.pos; 33 | } 34 | if (stream.start == state.overlayPos) { 35 | stream.pos = stream.start; 36 | state.overlayCur = overlay.token(stream, state.overlay); 37 | state.overlayPos = stream.pos; 38 | } 39 | stream.pos = Math.min(state.basePos, state.overlayPos); 40 | if (stream.eol()) state.basePos = state.overlayPos = 0; 41 | 42 | if (state.overlayCur == null) return state.baseCur; 43 | if (state.baseCur != null && combine) return state.baseCur + " " + state.overlayCur; 44 | else return state.overlayCur; 45 | }, 46 | 47 | indent: base.indent && function(state, textAfter) { 48 | return base.indent(state.base, textAfter); 49 | }, 50 | electricChars: base.electricChars, 51 | 52 | innerMode: function(state) { return {state: state.base, mode: base}; }, 53 | 54 | blankLine: function(state) { 55 | if (base.blankLine) base.blankLine(state.base); 56 | if (overlay.blankLine) overlay.blankLine(state.overlay); 57 | } 58 | }; 59 | }; 60 | -------------------------------------------------------------------------------- /lib/codemirror/addon/runmode/colorize.js: -------------------------------------------------------------------------------- 1 | CodeMirror.colorize = (function() { 2 | 3 | var isBlock = /^(p|li|div|h\\d|pre|blockquote|td)$/; 4 | 5 | function textContent(node, out) { 6 | if (node.nodeType == 3) return out.push(node.nodeValue); 7 | for (var ch = node.firstChild; ch; ch = ch.nextSibling) { 8 | textContent(ch, out); 9 | if (isBlock.test(node.nodeType)) out.push("\n"); 10 | } 11 | } 12 | 13 | return function(collection, defaultMode) { 14 | if (!collection) collection = document.body.getElementsByTagName("pre"); 15 | 16 | for (var i = 0; i < collection.length; ++i) { 17 | var node = collection[i]; 18 | var mode = node.getAttribute("data-lang") || defaultMode; 19 | if (!mode) continue; 20 | 21 | var text = []; 22 | textContent(node, text); 23 | node.innerHTML = ""; 24 | CodeMirror.runMode(text.join(""), mode, node); 25 | 26 | node.className += " cm-s-default"; 27 | } 28 | }; 29 | })(); 30 | -------------------------------------------------------------------------------- /lib/codemirror/addon/runmode/runmode.js: -------------------------------------------------------------------------------- 1 | CodeMirror.runMode = function(string, modespec, callback, options) { 2 | var mode = CodeMirror.getMode(CodeMirror.defaults, modespec); 3 | 4 | if (callback.nodeType == 1) { 5 | var tabSize = (options && options.tabSize) || CodeMirror.defaults.tabSize; 6 | var node = callback, col = 0; 7 | node.innerHTML = ""; 8 | callback = function(text, style) { 9 | if (text == "\n") { 10 | node.appendChild(document.createElement("br")); 11 | col = 0; 12 | return; 13 | } 14 | var content = ""; 15 | // replace tabs 16 | for (var pos = 0;;) { 17 | var idx = text.indexOf("\t", pos); 18 | if (idx == -1) { 19 | content += text.slice(pos); 20 | col += text.length - pos; 21 | break; 22 | } else { 23 | col += idx - pos; 24 | content += text.slice(pos, idx); 25 | var size = tabSize - col % tabSize; 26 | col += size; 27 | for (var i = 0; i < size; ++i) content += " "; 28 | pos = idx + 1; 29 | } 30 | } 31 | 32 | if (style) { 33 | var sp = node.appendChild(document.createElement("span")); 34 | sp.className = "cm-" + style.replace(/ +/g, " cm-"); 35 | sp.appendChild(document.createTextNode(content)); 36 | } else { 37 | node.appendChild(document.createTextNode(content)); 38 | } 39 | }; 40 | } 41 | 42 | var lines = CodeMirror.splitLines(string), state = CodeMirror.startState(mode); 43 | for (var i = 0, e = lines.length; i < e; ++i) { 44 | if (i) callback("\n"); 45 | var stream = new CodeMirror.StringStream(lines[i]); 46 | while (!stream.eol()) { 47 | var style = mode.token(stream, state); 48 | callback(stream.current(), style, i, stream.start); 49 | stream.start = stream.pos; 50 | } 51 | } 52 | }; 53 | -------------------------------------------------------------------------------- /lib/codemirror/addon/search/match-highlighter.js: -------------------------------------------------------------------------------- 1 | // Highlighting text that matches the selection 2 | // 3 | // Defines an option highlightSelectionMatches, which, when enabled, 4 | // will style strings that match the selection throughout the 5 | // document. 6 | // 7 | // The option can be set to true to simply enable it, or to a 8 | // {minChars, style} object to explicitly configure it. minChars is 9 | // the minimum amount of characters that should be selected for the 10 | // behavior to occur, and style is the token style to apply to the 11 | // matches. This will be prefixed by "cm-" to create an actual CSS 12 | // class name. 13 | 14 | (function() { 15 | var DEFAULT_MIN_CHARS = 2; 16 | var DEFAULT_TOKEN_STYLE = "matchhighlight"; 17 | 18 | function State(options) { 19 | this.minChars = typeof options == "object" && options.minChars || DEFAULT_MIN_CHARS; 20 | this.style = typeof options == "object" && options.style || DEFAULT_TOKEN_STYLE; 21 | this.overlay = null; 22 | } 23 | 24 | CodeMirror.defineOption("highlightSelectionMatches", false, function(cm, val, old) { 25 | var prev = old && old != CodeMirror.Init; 26 | if (val && !prev) { 27 | cm._matchHighlightState = new State(val); 28 | cm.on("cursorActivity", highlightMatches); 29 | } else if (!val && prev) { 30 | var over = cm._matchHighlightState.overlay; 31 | if (over) cm.removeOverlay(over); 32 | cm._matchHighlightState = null; 33 | cm.off("cursorActivity", highlightMatches); 34 | } 35 | }); 36 | 37 | function highlightMatches(cm) { 38 | cm.operation(function() { 39 | var state = cm._matchHighlightState; 40 | if (state.overlay) { 41 | cm.removeOverlay(state.overlay); 42 | state.overlay = null; 43 | } 44 | 45 | if (!cm.somethingSelected()) return; 46 | var selection = cm.getSelection().replace(/^\s+|\s+$/g, ""); 47 | if (selection.length < state.minChars) return; 48 | 49 | cm.addOverlay(state.overlay = makeOverlay(selection, state.style)); 50 | }); 51 | } 52 | 53 | function makeOverlay(query, style) { 54 | return {token: function(stream) { 55 | if (stream.match(query)) return style; 56 | stream.next(); 57 | stream.skipTo(query.charAt(0)) || stream.skipToEnd(); 58 | }}; 59 | } 60 | })(); 61 | -------------------------------------------------------------------------------- /lib/codemirror/addon/selection/active-line.js: -------------------------------------------------------------------------------- 1 | // Because sometimes you need to style the cursor's line. 2 | // 3 | // Adds an option 'styleActiveLine' which, when enabled, gives the 4 | // active line's wrapping
the CSS class "CodeMirror-activeline", 5 | // and gives its background
the class "CodeMirror-activeline-background". 6 | 7 | (function() { 8 | "use strict"; 9 | var WRAP_CLASS = "CodeMirror-activeline"; 10 | var BACK_CLASS = "CodeMirror-activeline-background"; 11 | 12 | CodeMirror.defineOption("styleActiveLine", false, function(cm, val, old) { 13 | var prev = old && old != CodeMirror.Init; 14 | if (val && !prev) { 15 | updateActiveLine(cm); 16 | cm.on("cursorActivity", updateActiveLine); 17 | } else if (!val && prev) { 18 | cm.off("cursorActivity", updateActiveLine); 19 | clearActiveLine(cm); 20 | delete cm._activeLine; 21 | } 22 | }); 23 | 24 | function clearActiveLine(cm) { 25 | if ("_activeLine" in cm) { 26 | cm.removeLineClass(cm._activeLine, "wrap", WRAP_CLASS); 27 | cm.removeLineClass(cm._activeLine, "background", BACK_CLASS); 28 | } 29 | } 30 | 31 | function updateActiveLine(cm) { 32 | var line = cm.getLineHandle(cm.getCursor().line); 33 | if (cm._activeLine == line) return; 34 | clearActiveLine(cm); 35 | cm.addLineClass(line, "wrap", WRAP_CLASS); 36 | cm.addLineClass(line, "background", BACK_CLASS); 37 | cm._activeLine = line; 38 | } 39 | })(); 40 | -------------------------------------------------------------------------------- /lib/codemirror/addon/selection/mark-selection.js: -------------------------------------------------------------------------------- 1 | // Because sometimes you need to mark the selected *text*. 2 | // 3 | // Adds an option 'styleSelectedText' which, when enabled, gives 4 | // selected text the CSS class "CodeMirror-selectedtext". 5 | 6 | (function() { 7 | "use strict"; 8 | 9 | CodeMirror.defineOption("styleSelectedText", false, function(cm, val, old) { 10 | var prev = old && old != CodeMirror.Init; 11 | if (val && !prev) { 12 | updateSelectedText(cm); 13 | cm.on("cursorActivity", updateSelectedText); 14 | } else if (!val && prev) { 15 | cm.off("cursorActivity", updateSelectedText); 16 | clearSelectedText(cm); 17 | delete cm._selectionMark; 18 | } 19 | }); 20 | 21 | function clearSelectedText(cm) { 22 | if (cm._selectionMark) cm._selectionMark.clear(); 23 | } 24 | 25 | function updateSelectedText(cm) { 26 | clearSelectedText(cm); 27 | 28 | if (cm.somethingSelected()) 29 | cm._selectionMark = cm.markText(cm.getCursor("start"), cm.getCursor("end"), 30 | {className: "CodeMirror-selectedtext"}); 31 | else 32 | cm._selectionMark = null; 33 | } 34 | })(); 35 | -------------------------------------------------------------------------------- /lib/codemirror/demo/changemode.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CodeMirror: Mode-Changing Demo 6 | 7 | 8 | 9 | 10 | 11 | 12 | 15 | 16 | 17 |

CodeMirror: Mode-Changing demo

18 | 19 |
26 | 27 |

On changes to the content of the above editor, a (crude) script 28 | tries to auto-detect the language used, and switches the editor to 29 | either JavaScript or Scheme mode based on that.

30 | 31 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /lib/codemirror/demo/closetag.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CodeMirror: Close-Tag Demo 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 17 | 18 | 19 | 20 |

Close-Tag Demo

21 |
    22 |
  • Type an html tag. When you type '>' or '/', the tag will auto-close/complete. Block-level tags will indent.
  • 23 |
  • There are options for disabling tag closing or customizing the list of tags to indent.
  • 24 |
  • Works with "text/html" (based on htmlmixed.js or xml.js) mode.
  • 25 |
  • View source for key binding details.
  • 26 |
27 | 28 |
29 | 30 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /lib/codemirror/demo/emacs.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CodeMirror: Emacs bindings demo 6 | 7 | 8 | 9 | 10 | 11 | 12 | 15 | 16 | 17 |

CodeMirror: Emacs bindings demo

18 | 19 |
34 | 35 |

The emacs keybindings are enabled by 36 | including keymap/emacs.js and setting 37 | the keyMap option to "emacs". Because 38 | CodeMirror's internal API is quite different from Emacs, they are only 39 | a loose approximation of actual emacs bindings, though.

40 | 41 |

Also note that a lot of browsers disallow certain keys from being 42 | captured. For example, Chrome blocks both Ctrl-W and Ctrl-N, with the 43 | result that idiomatic use of Emacs keys will constantly close your tab 44 | or open a new window.

45 | 46 | 58 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /lib/codemirror/demo/indentwrap.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CodeMirror: Indented wrapped line demo 6 | 7 | 8 | 9 | 10 | 11 | 14 | 15 | 16 |

CodeMirror: Indented wrapped line demo

17 | 18 |
28 | 29 |

This page uses a hack on top of the "renderLine" 30 | event to make wrapped text line up with the base indentation of 31 | the line.

32 | 33 | 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /lib/codemirror/demo/loadmode.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CodeMirror: Lazy Mode Loading Demo 6 | 7 | 8 | 9 | 10 | 11 | 14 | 15 | 16 |

CodeMirror: Lazy Mode Loading

17 | 18 |
23 |

24 | 25 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /lib/codemirror/demo/marker.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CodeMirror: Breakpoint Demo 6 | 7 | 8 | 9 | 10 | 11 | 16 | 17 | 18 |

CodeMirror: Breakpoint demo

19 | 20 |
37 | 38 |

Click the line-number gutter to add or remove 'breakpoints'.

39 | 40 | 57 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /lib/codemirror/demo/markselection.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CodeMirror: Match Highlighter Demo 6 | 7 | 8 | 9 | 10 | 11 | 12 | 17 | 18 | 19 |

CodeMirror: Mark Selection Demo

20 | 21 |
25 | 26 | 32 | 33 |

Simple addon to easily mark (and style) selected text.

34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /lib/codemirror/demo/matchhighlighter.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CodeMirror: Match Highlighter Demo 6 | 7 | 8 | 9 | 10 | 11 | 12 | 20 | 21 | 22 |

CodeMirror: Match Highlighter Demo

23 | 24 |
27 | 28 | 34 | 35 |

Search and highlight occurences of the selected text.

36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /lib/codemirror/demo/multiplex.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CodeMirror: Multiplexing Parser Demo 6 | 7 | 8 | 9 | 10 | 11 | 12 | 16 | 17 | 18 |

CodeMirror: Multiplexing Parser Demo

19 | 20 |
33 | 34 | 50 | 51 |

Demonstration of a multiplexing mode, which, at certain 52 | boundary strings, switches to one or more inner modes. The out 53 | (HTML) mode does not get fed the content of the << 54 | >> blocks. See 55 | the manual and 56 | the source for more 57 | information.

58 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /lib/codemirror/demo/mustache.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CodeMirror: Overlay Parser Demo 6 | 7 | 8 | 9 | 10 | 11 | 12 | 16 | 17 | 18 |

CodeMirror: Overlay Parser Demo

19 | 20 |
31 | 32 | 51 | 52 |

Demonstration of a mode that parses HTML, highlighting 53 | the Mustache templating 54 | directives inside of it by using the code 55 | in overlay.js. View 56 | source to see the 15 lines of code needed to accomplish this.

57 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /lib/codemirror/demo/placeholder.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CodeMirror: Placeholder demo 6 | 7 | 8 | 9 | 10 | 11 | 17 | 18 | 19 |

CodeMirror: Placeholder demo

20 | 21 |
22 | 23 |

The placeholder 24 | plug-in adds an option placeholder that can be set to 25 | make text appear in the editor when it is empty and not focused. 26 | If the source textarea has a placeholder attribute, 27 | it will automatically be inherited.

28 | 29 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /lib/codemirror/demo/preview.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CodeMirror: HTML5 preview 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 27 | 28 | 29 |

CodeMirror: HTML5 preview

30 | 53 | 54 | 75 | 76 | 77 | -------------------------------------------------------------------------------- /lib/codemirror/demo/resize.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CodeMirror: Autoresize Demo 6 | 7 | 8 | 9 | 10 | 11 | 21 | 22 | 23 |

CodeMirror: Autoresize demo

24 | 25 |
35 | 36 |

By setting a few CSS properties, and giving 37 | the viewportMargin 38 | a value of Infinity, CodeMirror can be made to 39 | automatically resize to fit its content.

40 | 41 | 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /lib/codemirror/demo/runmode.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CodeMirror: Mode Runner Demo 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |

CodeMirror: Mode Runner Demo

14 | 15 |
21 | 22 |

23 | 
24 |     
30 | 
31 |     

Running a CodeMirror mode outside of the editor. 32 | The CodeMirror.runMode function, defined 33 | in lib/runmode.js takes the following arguments:

34 | 35 |
36 |
text (string)
37 |
The document to run through the highlighter.
38 |
mode (mode spec)
39 |
The mode to use (must be loaded as normal).
40 |
output (function or DOM node)
41 |
If this is a function, it will be called for each token with 42 | two arguments, the token's text and the token's style class (may 43 | be null for unstyled tokens). If it is a DOM node, 44 | the tokens will be converted to span elements as in 45 | an editor, and inserted into the node 46 | (through innerHTML).
47 |
48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /lib/codemirror/demo/variableheight.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CodeMirror: Variable Height Demo 6 | 7 | 8 | 9 | 10 | 11 | 12 | 17 | 18 | 19 |

CodeMirror: Variable Height Demo

20 | 21 |
44 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /lib/codemirror/demo/vim.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CodeMirror: Vim bindings demo 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 18 | 19 | 20 |

CodeMirror: Vim bindings demo

21 | 22 |
37 | 38 |
41 | 42 |

The vim keybindings are enabled by 43 | including keymap/vim.js and setting 44 | the keyMap option to "vim". Because 45 | CodeMirror's internal API is quite different from Vim, they are only 46 | a loose approximation of actual vim bindings, though.

47 | 48 | 63 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /lib/codemirror/demo/visibletabs.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CodeMirror: Visible tabs demo 6 | 7 | 8 | 9 | 10 | 11 | 19 | 20 | 21 |

CodeMirror: Visible tabs demo

22 | 23 |
38 | 39 |

Tabs inside the editor are spans with the 40 | class cm-tab, and can be styled.

41 | 42 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /lib/codemirror/doc/baboon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nkashyap/ConsoleJS/64613aba1d3a03c16ce5cb3464fe18e18b41ba36/lib/codemirror/doc/baboon.png -------------------------------------------------------------------------------- /lib/codemirror/doc/reporting.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CodeMirror: Reporting Bugs 6 | 7 | 8 | 9 | 10 | 11 | 12 |

{ } CodeMirror

13 | 14 |
15 | 16 |
17 | /* Reporting bugs
18 |    effectively */
19 | 
20 |
21 | 22 |
23 | 24 |

So you found a problem in CodeMirror. By all means, report it! Bug 25 | reports from users are the main drive behind improvements to 26 | CodeMirror. But first, please read over these points:

27 | 28 |
    29 |
  1. CodeMirror is maintained by volunteers. They don't owe you 30 | anything, so be polite. Reports with an indignant or belligerent 31 | tone tend to be moved to the bottom of the pile.
  2. 32 | 33 |
  3. Include information about the browser in which the 34 | problem occurred. Even if you tested several browsers, and 35 | the problem occurred in all of them, mention this fact in the bug 36 | report. Also include browser version numbers and the operating 37 | system that you're on.
  4. 38 | 39 |
  5. Mention which release of CodeMirror you're using. Preferably, 40 | try also with the current development snapshot, to ensure the 41 | problem has not already been fixed.
  6. 42 | 43 |
  7. Mention very precisely what went wrong. "X is broken" is not a 44 | good bug report. What did you expect to happen? What happened 45 | instead? Describe the exact steps a maintainer has to take to make 46 | the problem occur. We can not fix something that we can not 47 | observe.
  8. 48 | 49 |
  9. If the problem can not be reproduced in any of the demos 50 | included in the CodeMirror distribution, please provide an HTML 51 | document that demonstrates the problem. The best way to do this is 52 | to go to jsbin.com, enter 53 | it there, press save, and include the resulting link in your bug 54 | report.
  10. 55 |
56 | 57 |
58 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /lib/codemirror/keymap/emacs.js: -------------------------------------------------------------------------------- 1 | // TODO number prefixes 2 | (function() { 3 | // Really primitive kill-ring implementation. 4 | var killRing = []; 5 | function addToRing(str) { 6 | killRing.push(str); 7 | if (killRing.length > 50) killRing.shift(); 8 | } 9 | function getFromRing() { return killRing[killRing.length - 1] || ""; } 10 | function popFromRing() { if (killRing.length > 1) killRing.pop(); return getFromRing(); } 11 | 12 | CodeMirror.keyMap.emacs = { 13 | "Ctrl-X": function(cm) {cm.setOption("keyMap", "emacs-Ctrl-X");}, 14 | "Ctrl-W": function(cm) {addToRing(cm.getSelection()); cm.replaceSelection("");}, 15 | "Ctrl-Alt-W": function(cm) {addToRing(cm.getSelection()); cm.replaceSelection("");}, 16 | "Alt-W": function(cm) {addToRing(cm.getSelection());}, 17 | "Ctrl-Y": function(cm) {cm.replaceSelection(getFromRing());}, 18 | "Alt-Y": function(cm) {cm.replaceSelection(popFromRing());}, 19 | "Ctrl-/": "undo", "Shift-Ctrl--": "undo", "Shift-Alt-,": "goDocStart", "Shift-Alt-.": "goDocEnd", 20 | "Ctrl-S": "findNext", "Ctrl-R": "findPrev", "Ctrl-G": "clearSearch", "Shift-Alt-5": "replace", 21 | "Ctrl-Z": "undo", "Cmd-Z": "undo", "Alt-/": "autocomplete", "Alt-V": "goPageUp", 22 | "Ctrl-J": "newlineAndIndent", "Enter": false, "Tab": "indentAuto", 23 | fallthrough: ["basic", "emacsy"] 24 | }; 25 | 26 | CodeMirror.keyMap["emacs-Ctrl-X"] = { 27 | "Ctrl-S": "save", "Ctrl-W": "save", "S": "saveAll", "F": "open", "U": "undo", "K": "close", 28 | auto: "emacs", nofallthrough: true 29 | }; 30 | })(); 31 | -------------------------------------------------------------------------------- /lib/codemirror/mode/apl/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CodeMirror: APL mode 6 | 7 | 8 | 9 | 10 | 11 | 14 | 15 | 16 |

CodeMirror: APL mode

17 | 18 |
44 | 45 | 52 | 53 |

Simple mode that tries to handle APL as well as it can.

54 |

It attempts to label functions/operators based upon 55 | monadic/dyadic usage (but this is far from fully fleshed out). 56 | This means there are meaningful classnames so hover states can 57 | have popups etc.

58 | 59 |

MIME types defined: text/apl (APL code)

60 | 61 | 62 | -------------------------------------------------------------------------------- /lib/codemirror/mode/clojure/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CodeMirror: Clojure mode 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |

CodeMirror: Clojure mode

14 |
69 | 72 | 73 |

MIME types defined: text/x-clojure.

74 | 75 | 76 | 77 | -------------------------------------------------------------------------------- /lib/codemirror/mode/coffeescript/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License 2 | 3 | Copyright (c) 2011 Jeff Pickhardt 4 | Modified from the Python CodeMirror mode, Copyright (c) 2010 Timothy Farrell 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in 14 | all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | THE SOFTWARE. -------------------------------------------------------------------------------- /lib/codemirror/mode/css/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CodeMirror: CSS mode 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |

CodeMirror: CSS mode

14 |
49 | 52 | 53 |

MIME types defined: text/css.

54 | 55 |

Parsing/Highlighting Tests: normal, verbose.

56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /lib/codemirror/mode/diff/diff.js: -------------------------------------------------------------------------------- 1 | CodeMirror.defineMode("diff", function() { 2 | 3 | var TOKEN_NAMES = { 4 | '+': 'positive', 5 | '-': 'negative', 6 | '@': 'meta' 7 | }; 8 | 9 | return { 10 | token: function(stream) { 11 | var tw_pos = stream.string.search(/[\t ]+?$/); 12 | 13 | if (!stream.sol() || tw_pos === 0) { 14 | stream.skipToEnd(); 15 | return ("error " + ( 16 | TOKEN_NAMES[stream.string.charAt(0)] || '')).replace(/ $/, ''); 17 | } 18 | 19 | var token_name = TOKEN_NAMES[stream.peek()] || stream.skipToEnd(); 20 | 21 | if (tw_pos === -1) { 22 | stream.skipToEnd(); 23 | } else { 24 | stream.pos = tw_pos; 25 | } 26 | 27 | return token_name; 28 | } 29 | }; 30 | }); 31 | 32 | CodeMirror.defineMIME("text/x-diff", "diff"); 33 | -------------------------------------------------------------------------------- /lib/codemirror/mode/ecl/index.html: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | CodeMirror: ECL mode 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |

CodeMirror: ECL mode

13 |
31 | 34 | 35 |

Based on CodeMirror's clike mode. For more information see HPCC Systems web site.

36 |

MIME types defined: text/x-ecl.

37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /lib/codemirror/mode/erlang/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CodeMirror: Erlang mode 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |

CodeMirror: Erlang mode

16 | 17 |
52 | 53 | 61 | 62 |

MIME types defined: text/x-erlang.

63 | 64 | 65 | -------------------------------------------------------------------------------- /lib/codemirror/mode/gas/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CodeMirror: Gas mode 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |

CodeMirror: Gas mode

14 | 15 |
16 | 38 |
39 | 40 | 46 | 47 |

Handles AT&T assembler syntax (more specifically this handles 48 | the GNU Assembler (gas) syntax.) 49 | It takes a single optional configuration parameter: 50 | architecture, which can be one of "ARM", 51 | "ARMv6" or "x86". 52 | Including the parameter adds syntax for the registers and special 53 | directives for the supplied architecture. 54 | 55 |

MIME types defined: text/x-gas

56 | 57 | 58 | -------------------------------------------------------------------------------- /lib/codemirror/mode/gfm/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CodeMirror: GFM mode 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 |

CodeMirror: GFM mode

24 | 25 |
60 | 61 | 68 | 69 |

Optionally depends on other modes for properly highlighted code blocks.

70 | 71 |

Parsing/Highlighting Tests: normal, verbose.

72 | 73 | 74 | 75 | -------------------------------------------------------------------------------- /lib/codemirror/mode/go/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CodeMirror: Go mode 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |

CodeMirror: Go mode

16 | 17 |
60 | 61 | 71 | 72 |

MIME type: text/x-go

73 | 74 | 75 | -------------------------------------------------------------------------------- /lib/codemirror/mode/groovy/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CodeMirror: Groovy mode 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |

CodeMirror: Groovy mode

15 | 16 |
62 | 63 | 70 | 71 |

MIME types defined: text/x-groovy

72 | 73 | 74 | -------------------------------------------------------------------------------- /lib/codemirror/mode/haskell/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CodeMirror: Haskell mode 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |

CodeMirror: Haskell mode

16 | 17 |
51 | 52 | 59 | 60 |

MIME types defined: text/x-haskell.

61 | 62 | 63 | -------------------------------------------------------------------------------- /lib/codemirror/mode/haxe/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CodeMirror: Haxe mode 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |

CodeMirror: Haxe mode

14 | 15 |
79 | 80 | 87 | 88 |

MIME types defined: text/x-haxe.

89 | 90 | 91 | -------------------------------------------------------------------------------- /lib/codemirror/mode/htmlembedded/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CodeMirror: Html Embedded Scripts mode 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |

CodeMirror: Html Embedded Scripts mode

18 | 19 |
31 | 32 | 42 | 43 |

Mode for html embedded scripts like JSP and ASP.NET. Depends on HtmlMixed which in turn depends on 44 | JavaScript, CSS and XML.
Other dependancies include those of the scriping language chosen.

45 | 46 |

MIME types defined: application/x-aspx (ASP.NET), 47 | application/x-ejs (Embedded Javascript), application/x-jsp (JavaServer Pages)

48 | 49 | 50 | -------------------------------------------------------------------------------- /lib/codemirror/mode/http/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CodeMirror: HTTP mode 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |

CodeMirror: HTTP mode

14 | 15 |
25 | 26 | 29 | 30 |

MIME types defined: message/http.

31 | 32 | 33 | -------------------------------------------------------------------------------- /lib/codemirror/mode/javascript/typescript.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CodeMirror: TypeScript mode 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |

CodeMirror: TypeScript mode

14 | 15 |
37 | 38 | 45 | 46 |

This is a specialization of the JavaScript mode.

47 | 48 | 49 | -------------------------------------------------------------------------------- /lib/codemirror/mode/jinja2/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CodeMirror: Jinja2 mode 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |

CodeMirror: Jinja2 mode

14 |
32 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /lib/codemirror/mode/jinja2/jinja2.js: -------------------------------------------------------------------------------- 1 | CodeMirror.defineMode("jinja2", function() { 2 | var keywords = ["block", "endblock", "for", "endfor", "in", "true", "false", 3 | "loop", "none", "self", "super", "if", "as", "not", "and", 4 | "else", "import", "with", "without", "context"]; 5 | keywords = new RegExp("^((" + keywords.join(")|(") + "))\\b"); 6 | 7 | function tokenBase (stream, state) { 8 | var ch = stream.next(); 9 | if (ch == "{") { 10 | if (ch = stream.eat(/\{|%|#/)) { 11 | stream.eat("-"); 12 | state.tokenize = inTag(ch); 13 | return "tag"; 14 | } 15 | } 16 | } 17 | function inTag (close) { 18 | if (close == "{") { 19 | close = "}"; 20 | } 21 | return function (stream, state) { 22 | var ch = stream.next(); 23 | if ((ch == close || (ch == "-" && stream.eat(close))) 24 | && stream.eat("}")) { 25 | state.tokenize = tokenBase; 26 | return "tag"; 27 | } 28 | if (stream.match(keywords)) { 29 | return "keyword"; 30 | } 31 | return close == "#" ? "comment" : "string"; 32 | }; 33 | } 34 | return { 35 | startState: function () { 36 | return {tokenize: tokenBase}; 37 | }, 38 | token: function (stream, state) { 39 | return state.tokenize(stream, state); 40 | } 41 | }; 42 | }); 43 | -------------------------------------------------------------------------------- /lib/codemirror/mode/livescript/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License 2 | 3 | Copyright (c) 2013 Kenneth Bentley 4 | Modified from the CoffeeScript CodeMirror mode, Copyright (c) 2011 Jeff Pickhardt 5 | Modified from the Python CodeMirror mode, Copyright (c) 2010 Timothy Farrell 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in 15 | all copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | THE SOFTWARE. 24 | -------------------------------------------------------------------------------- /lib/codemirror/mode/lua/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CodeMirror: Lua mode 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |

CodeMirror: Lua mode

16 |
57 | 64 | 65 |

Loosely based on Franciszek 66 | Wawrzak's CodeMirror 67 | 1 mode. One configuration parameter is 68 | supported, specials, to which you can provide an 69 | array of strings to have those identifiers highlighted with 70 | the lua-special style.

71 |

MIME types defined: text/x-lua.

72 | 73 | 74 | 75 | -------------------------------------------------------------------------------- /lib/codemirror/mode/ntriples/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CodeMirror: NTriples mode 6 | 7 | 8 | 9 | 10 | 15 | 16 | 17 |

CodeMirror: NTriples mode

18 |
19 | 26 |
27 | 28 | 31 |

MIME types defined: text/n-triples.

32 | 33 | 34 | -------------------------------------------------------------------------------- /lib/codemirror/mode/pascal/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2011 souceLair 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 4 | 5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 8 | -------------------------------------------------------------------------------- /lib/codemirror/mode/pascal/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CodeMirror: Pascal mode 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |

CodeMirror: Pascal mode

14 | 15 |
38 | 39 | 45 | 46 |

MIME types defined: text/x-pascal.

47 | 48 | 49 | -------------------------------------------------------------------------------- /lib/codemirror/mode/perl/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (C) 2011 by Sabaca under the MIT license. 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /lib/codemirror/mode/perl/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CodeMirror: Perl mode 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |

CodeMirror: Perl mode

14 | 15 |
53 | 54 | 59 | 60 |

MIME types defined: text/x-perl.

61 | 62 | 63 | -------------------------------------------------------------------------------- /lib/codemirror/mode/php/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CodeMirror: PHP mode 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 |

CodeMirror: PHP mode

20 | 21 |
32 | 33 | 44 | 45 |

Simple HTML/PHP mode based on 46 | the C-like mode. Depends on XML, 47 | JavaScript, CSS, HTMLMixed, and C-like modes.

48 | 49 |

MIME types defined: application/x-httpd-php (HTML with PHP code), text/x-php (plain, non-wrapped PHP code).

50 | 51 | 52 | -------------------------------------------------------------------------------- /lib/codemirror/mode/pig/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CodeMirror: Pig Latin mode 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |

CodeMirror: Pig Latin mode

14 | 15 |
27 | 28 | 35 | 36 |

37 | Simple mode that handles Pig Latin language. 38 |

39 | 40 |

MIME type defined: text/x-pig 41 | (PIG code) 42 | 43 | -------------------------------------------------------------------------------- /lib/codemirror/mode/properties/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CodeMirror: Properties files mode 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |

CodeMirror: Properties files mode

14 |
33 | 36 | 37 |

MIME types defined: text/x-properties, 38 | text/x-ini.

39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /lib/codemirror/mode/properties/properties.js: -------------------------------------------------------------------------------- 1 | CodeMirror.defineMode("properties", function() { 2 | return { 3 | token: function(stream, state) { 4 | var sol = stream.sol() || state.afterSection; 5 | var eol = stream.eol(); 6 | 7 | state.afterSection = false; 8 | 9 | if (sol) { 10 | if (state.nextMultiline) { 11 | state.inMultiline = true; 12 | state.nextMultiline = false; 13 | } else { 14 | state.position = "def"; 15 | } 16 | } 17 | 18 | if (eol && ! state.nextMultiline) { 19 | state.inMultiline = false; 20 | state.position = "def"; 21 | } 22 | 23 | if (sol) { 24 | while(stream.eatSpace()); 25 | } 26 | 27 | var ch = stream.next(); 28 | 29 | if (sol && (ch === "#" || ch === "!" || ch === ";")) { 30 | state.position = "comment"; 31 | stream.skipToEnd(); 32 | return "comment"; 33 | } else if (sol && ch === "[") { 34 | state.afterSection = true; 35 | stream.skipTo("]"); stream.eat("]"); 36 | return "header"; 37 | } else if (ch === "=" || ch === ":") { 38 | state.position = "quote"; 39 | return null; 40 | } else if (ch === "\\" && state.position === "quote") { 41 | if (stream.next() !== "u") { // u = Unicode sequence \u1234 42 | // Multiline value 43 | state.nextMultiline = true; 44 | } 45 | } 46 | 47 | return state.position; 48 | }, 49 | 50 | startState: function() { 51 | return { 52 | position : "def", // Current position, "def", "quote" or "comment" 53 | nextMultiline : false, // Is the next line multiline value 54 | inMultiline : false, // Is the current line a multiline value 55 | afterSection : false // Did we just open a section 56 | }; 57 | } 58 | 59 | }; 60 | }); 61 | 62 | CodeMirror.defineMIME("text/x-properties", "properties"); 63 | CodeMirror.defineMIME("text/x-ini", "properties"); 64 | -------------------------------------------------------------------------------- /lib/codemirror/mode/python/LICENSE.txt: -------------------------------------------------------------------------------- 1 | The MIT License 2 | 3 | Copyright (c) 2010 Timothy Farrell 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. -------------------------------------------------------------------------------- /lib/codemirror/mode/r/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2011, Ubalo, Inc. 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | * Redistributions of source code must retain the above copyright 7 | notice, this list of conditions and the following disclaimer. 8 | * Redistributions in binary form must reproduce the above copyright 9 | notice, this list of conditions and the following disclaimer in the 10 | documentation and/or other materials provided with the distribution. 11 | * Neither the name of the Ubalo, Inc nor the names of its 12 | contributors may be used to endorse or promote products derived 13 | from this software without specific prior written permission. 14 | 15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 16 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18 | DISCLAIMED. IN NO EVENT SHALL UBALO, INC BE LIABLE FOR ANY 19 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | -------------------------------------------------------------------------------- /lib/codemirror/mode/r/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CodeMirror: R mode 6 | 7 | 8 | 9 | 16 | 17 | 18 | 19 |

CodeMirror: R mode

20 |
63 | 66 | 67 |

MIME types defined: text/x-rsrc.

68 | 69 |

Development of the CodeMirror R mode was kindly sponsored 70 | by Ubalo, who hold 71 | the license.

72 | 73 | 74 | 75 | -------------------------------------------------------------------------------- /lib/codemirror/mode/rpm/changes/changes.js: -------------------------------------------------------------------------------- 1 | CodeMirror.defineMode("changes", function() { 2 | var headerSeperator = /^-+$/; 3 | var headerLine = /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ?\d{1,2} \d{2}:\d{2}(:\d{2})? [A-Z]{3,4} \d{4} - /; 4 | var simpleEmail = /^[\w+.-]+@[\w.-]+/; 5 | 6 | return { 7 | token: function(stream) { 8 | if (stream.sol()) { 9 | if (stream.match(headerSeperator)) { return 'tag'; } 10 | if (stream.match(headerLine)) { return 'tag'; } 11 | } 12 | if (stream.match(simpleEmail)) { return 'string'; } 13 | stream.next(); 14 | return null; 15 | } 16 | }; 17 | }); 18 | 19 | CodeMirror.defineMIME("text/x-rpm-changes", "changes"); 20 | -------------------------------------------------------------------------------- /lib/codemirror/mode/rpm/changes/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CodeMirror: RPM changes mode 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |

CodeMirror: RPM changes mode

14 | 15 |
42 | 50 | 51 |

MIME types defined: text/x-rpm-changes.

52 | 53 | 54 | -------------------------------------------------------------------------------- /lib/codemirror/mode/rpm/spec/spec.css: -------------------------------------------------------------------------------- 1 | .cm-s-default span.cm-preamble {color: #b26818; font-weight: bold;} 2 | .cm-s-default span.cm-macro {color: #b218b2;} 3 | .cm-s-default span.cm-section {color: green; font-weight: bold;} 4 | .cm-s-default span.cm-script {color: red;} 5 | .cm-s-default span.cm-issue {color: yellow;} 6 | -------------------------------------------------------------------------------- /lib/codemirror/mode/rst/LICENSE.txt: -------------------------------------------------------------------------------- 1 | The MIT License 2 | 3 | Copyright (c) 2013 Hasan Karahan 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. -------------------------------------------------------------------------------- /lib/codemirror/mode/ruby/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2011, Ubalo, Inc. 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | * Redistributions of source code must retain the above copyright 7 | notice, this list of conditions and the following disclaimer. 8 | * Redistributions in binary form must reproduce the above copyright 9 | notice, this list of conditions and the following disclaimer in the 10 | documentation and/or other materials provided with the distribution. 11 | * Neither the name of the Ubalo, Inc. nor the names of its 12 | contributors may be used to endorse or promote products derived 13 | from this software without specific prior written permission. 14 | 15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 16 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18 | DISCLAIMED. IN NO EVENT SHALL UBALO, INC BE LIABLE FOR ANY 19 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | -------------------------------------------------------------------------------- /lib/codemirror/mode/rust/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CodeMirror: Rust mode 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |

CodeMirror: Rust mode

14 | 15 |
38 | 39 | 45 | 46 |

MIME types defined: text/x-rustsrc.

47 | 48 | 49 | -------------------------------------------------------------------------------- /lib/codemirror/mode/sass/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CodeMirror: Sass mode 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |

CodeMirror: Sass mode

15 |
45 | 51 | 52 |

MIME types defined: text/x-sass.

53 | 54 | 55 | -------------------------------------------------------------------------------- /lib/codemirror/mode/scheme/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CodeMirror: Scheme mode 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |

CodeMirror: Scheme mode

14 |
58 | 61 | 62 |

MIME types defined: text/x-scheme.

63 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /lib/codemirror/mode/shell/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | CodeMirror: Shell mode 4 | 5 | 6 | 7 | 8 | 11 | 12 | 13 | 14 | 15 | 16 |

CodeMirror: Shell mode

17 | 18 | 42 | 43 | 50 | 51 |

MIME types defined: text/x-sh.

52 | -------------------------------------------------------------------------------- /lib/codemirror/mode/sieve/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (C) 2012 Thomas Schmid 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /lib/codemirror/mode/sieve/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CodeMirror: Sieve (RFC5228) mode 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |

CodeMirror: Sieve (RFC5228) mode

14 |
74 | 77 | 78 |

MIME types defined: application/sieve.

79 | 80 | 81 | 82 | -------------------------------------------------------------------------------- /lib/codemirror/mode/smalltalk/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CodeMirror: Smalltalk mode 6 | 7 | 8 | 9 | 10 | 11 | 16 | 17 | 18 |

CodeMirror: Smalltalk mode

19 | 20 |
43 | 44 | 52 | 53 |

Simple Smalltalk mode.

54 | 55 |

MIME types defined: text/x-stsrc.

56 | 57 | 58 | -------------------------------------------------------------------------------- /lib/codemirror/mode/sparql/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CodeMirror: SPARQL mode 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |

CodeMirror: SPARQL mode

15 |
31 | 38 | 39 |

MIME types defined: application/x-sparql-query.

40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /lib/codemirror/mode/tiddlywiki/tiddlywiki.css: -------------------------------------------------------------------------------- 1 | span.cm-underlined { 2 | text-decoration: underline; 3 | } 4 | span.cm-strikethrough { 5 | text-decoration: line-through; 6 | } 7 | span.cm-brace { 8 | color: #170; 9 | font-weight: bold; 10 | } 11 | span.cm-table { 12 | color: blue; 13 | font-weight: bold; 14 | } 15 | -------------------------------------------------------------------------------- /lib/codemirror/mode/tiki/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | CodeMirror: Tiki wiki mode 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |

CodeMirror: Tiki wiki mode

14 | 15 |
72 | 73 | 79 | 80 | 81 | 82 | -------------------------------------------------------------------------------- /lib/codemirror/mode/tiki/tiki.css: -------------------------------------------------------------------------------- 1 | .cm-tw-syntaxerror { 2 | color: #FFF; 3 | background-color: #900; 4 | } 5 | 6 | .cm-tw-deleted { 7 | text-decoration: line-through; 8 | } 9 | 10 | .cm-tw-header5 { 11 | font-weight: bold; 12 | } 13 | .cm-tw-listitem:first-child { /*Added first child to fix duplicate padding when highlighting*/ 14 | padding-left: 10px; 15 | } 16 | 17 | .cm-tw-box { 18 | border-top-width: 0px ! important; 19 | border-style: solid; 20 | border-width: 1px; 21 | border-color: inherit; 22 | } 23 | 24 | .cm-tw-underline { 25 | text-decoration: underline; 26 | } -------------------------------------------------------------------------------- /lib/codemirror/mode/turtle/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CodeMirror: Turtle mode 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |

CodeMirror: Turtle mode

14 |
28 | 35 | 36 |

MIME types defined: text/turtle.

37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /lib/codemirror/mode/vb/LICENSE.txt: -------------------------------------------------------------------------------- 1 | The MIT License 2 | 3 | Copyright (c) 2012 Codility Limited, 107 Cheapside, London EC2V 6DN, UK 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /lib/codemirror/mode/vbscript/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CodeMirror: VBScript mode 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |

CodeMirror: VBScript mode

14 | 15 |
32 | 33 | 38 | 39 |

MIME types defined: text/vbscript.

40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /lib/codemirror/mode/vbscript/vbscript.js: -------------------------------------------------------------------------------- 1 | CodeMirror.defineMode("vbscript", function() { 2 | var regexVBScriptKeyword = /^(?:Call|Case|CDate|Clear|CInt|CLng|Const|CStr|Description|Dim|Do|Each|Else|ElseIf|End|Err|Error|Exit|False|For|Function|If|LCase|Loop|LTrim|Next|Nothing|Now|Number|On|Preserve|Quit|ReDim|Resume|RTrim|Select|Set|Sub|Then|To|Trim|True|UBound|UCase|Until|VbCr|VbCrLf|VbLf|VbTab)$/im; 3 | 4 | return { 5 | token: function(stream) { 6 | if (stream.eatSpace()) return null; 7 | var ch = stream.next(); 8 | if (ch == "'") { 9 | stream.skipToEnd(); 10 | return "comment"; 11 | } 12 | if (ch == '"') { 13 | stream.skipTo('"'); 14 | return "string"; 15 | } 16 | 17 | if (/\w/.test(ch)) { 18 | stream.eatWhile(/\w/); 19 | if (regexVBScriptKeyword.test(stream.current())) return "keyword"; 20 | } 21 | return null; 22 | } 23 | }; 24 | }); 25 | 26 | CodeMirror.defineMIME("text/vbscript", "vbscript"); 27 | -------------------------------------------------------------------------------- /lib/codemirror/mode/xml/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CodeMirror: XML mode 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |

CodeMirror: XML mode

14 |
26 | 32 |

The XML mode supports two configuration parameters:

33 |
34 |
htmlMode (boolean)
35 |
This switches the mode to parse HTML instead of XML. This 36 | means attributes do not have to be quoted, and some elements 37 | (such as br) do not require a closing tag.
38 |
alignCDATA (boolean)
39 |
Setting this to true will force the opening tag of CDATA 40 | blocks to not be indented.
41 |
42 | 43 |

MIME types defined: application/xml, text/html.

44 | 45 | 46 | -------------------------------------------------------------------------------- /lib/codemirror/mode/xquery/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (C) 2011 by MarkLogic Corporation 2 | Author: Mike Brevoort 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy 5 | of this software and associated documentation files (the "Software"), to deal 6 | in the Software without restriction, including without limitation the rights 7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the Software is 9 | furnished to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in 12 | all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | THE SOFTWARE. -------------------------------------------------------------------------------- /lib/codemirror/mode/yaml/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CodeMirror: YAML mode 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |

CodeMirror: YAML mode

14 |
61 | 64 | 65 |

MIME types defined: text/x-yaml.

66 | 67 | 68 | 69 | -------------------------------------------------------------------------------- /lib/codemirror/mode/z80/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CodeMirror: Z80 assembly mode 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |

CodeMirror: Z80 assembly mode

14 | 15 |
30 | 31 | 36 | 37 |

MIME type defined: text/x-z80.

38 | 39 | 40 | -------------------------------------------------------------------------------- /lib/codemirror/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "codemirror", 3 | "version":"3.12.00", 4 | "main": "lib/codemirror.js", 5 | "description": "In-browser code editing made bearable", 6 | "licenses": [{"type": "MIT", 7 | "url": "http://codemirror.net/LICENSE"}], 8 | "directories": {"lib": "./lib"}, 9 | "scripts": {"test": "node ./test/run.js"}, 10 | "devDependencies": {"node-static": "0.6.0"}, 11 | "bugs": "http://github.com/marijnh/CodeMirror/issues", 12 | "keywords": ["JavaScript", "CodeMirror", "Editor"], 13 | "homepage": "http://codemirror.net", 14 | "maintainers":[{"name": "Marijn Haverbeke", 15 | "email": "marijnh@gmail.com", 16 | "web": "http://marijnhaverbeke.nl"}], 17 | "repositories": [{"type": "git", 18 | "url": "http://marijnhaverbeke.nl/git/codemirror"}, 19 | {"type": "git", 20 | "url": "https://github.com/marijnh/CodeMirror.git"}] 21 | } 22 | -------------------------------------------------------------------------------- /lib/codemirror/test/mode_test.css: -------------------------------------------------------------------------------- 1 | .mt-output .mt-token { 2 | border: 1px solid #ddd; 3 | white-space: pre; 4 | font-family: "Consolas", monospace; 5 | text-align: center; 6 | } 7 | 8 | .mt-output .mt-style { 9 | font-size: x-small; 10 | } 11 | -------------------------------------------------------------------------------- /lib/codemirror/test/phantom_driver.js: -------------------------------------------------------------------------------- 1 | var page = require('webpage').create(); 2 | 3 | page.open("http://localhost:3000/test/index.html", function (status) { 4 | if (status != "success") { 5 | console.log("page couldn't be loaded successfully"); 6 | phantom.exit(1); 7 | } 8 | waitFor(function () { 9 | return page.evaluate(function () { 10 | var output = document.getElementById('status'); 11 | if (!output) { return false; } 12 | return (/^(\d+ failures?|all passed)/i).test(output.innerText); 13 | }); 14 | }, function () { 15 | var failed = page.evaluate(function () { return window.failed; }); 16 | var output = page.evaluate(function () { 17 | return document.getElementById('output').innerText + "\n" + 18 | document.getElementById('status').innerText; 19 | }); 20 | console.log(output); 21 | phantom.exit(failed > 0 ? 1 : 0); 22 | }); 23 | }); 24 | 25 | function waitFor (test, cb) { 26 | if (test()) { 27 | cb(); 28 | } else { 29 | setTimeout(function () { waitFor(test, cb); }, 250); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /lib/codemirror/test/run.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | var lint = require("./lint/lint"); 4 | 5 | lint.checkDir("mode"); 6 | lint.checkDir("lib"); 7 | lint.checkDir("addon"); 8 | 9 | var ok = lint.success(); 10 | 11 | var files = new (require('node-static').Server)('.'); 12 | 13 | var server = require('http').createServer(function (req, res) { 14 | req.addListener('end', function () { 15 | files.serve(req, res); 16 | }); 17 | }).addListener('error', function (err) { 18 | throw err; 19 | }).listen(3000, function () { 20 | var child_process = require('child_process'); 21 | child_process.exec("which phantomjs", function (err) { 22 | if (err) { 23 | console.error("PhantomJS is not installed. Download from http://phantomjs.org"); 24 | process.exit(1); 25 | } 26 | var cmd = 'phantomjs test/phantom_driver.js'; 27 | child_process.exec(cmd, function (err, stdout) { 28 | server.close(); 29 | console.log(stdout); 30 | process.exit(err || !ok ? 1 : 0); 31 | }); 32 | }); 33 | }); 34 | -------------------------------------------------------------------------------- /lib/codemirror/theme/ambiance-mobile.css: -------------------------------------------------------------------------------- 1 | .cm-s-ambiance.CodeMirror { 2 | -webkit-box-shadow: none; 3 | -moz-box-shadow: none; 4 | box-shadow: none; 5 | } 6 | -------------------------------------------------------------------------------- /lib/codemirror/theme/blackboard.css: -------------------------------------------------------------------------------- 1 | /* Port of TextMate's Blackboard theme */ 2 | 3 | .cm-s-blackboard.CodeMirror { background: #0C1021; color: #F8F8F8; } 4 | .cm-s-blackboard .CodeMirror-selected { background: #253B76 !important; } 5 | .cm-s-blackboard .CodeMirror-gutters { background: #0C1021; border-right: 0; } 6 | .cm-s-blackboard .CodeMirror-linenumber { color: #888; } 7 | .cm-s-blackboard .CodeMirror-cursor { border-left: 1px solid #A7A7A7 !important; } 8 | 9 | .cm-s-blackboard .cm-keyword { color: #FBDE2D; } 10 | .cm-s-blackboard .cm-atom { color: #D8FA3C; } 11 | .cm-s-blackboard .cm-number { color: #D8FA3C; } 12 | .cm-s-blackboard .cm-def { color: #8DA6CE; } 13 | .cm-s-blackboard .cm-variable { color: #FF6400; } 14 | .cm-s-blackboard .cm-operator { color: #FBDE2D;} 15 | .cm-s-blackboard .cm-comment { color: #AEAEAE; } 16 | .cm-s-blackboard .cm-string { color: #61CE3C; } 17 | .cm-s-blackboard .cm-string-2 { color: #61CE3C; } 18 | .cm-s-blackboard .cm-meta { color: #D8FA3C; } 19 | .cm-s-blackboard .cm-error { background: #9D1E15; color: #F8F8F8; } 20 | .cm-s-blackboard .cm-builtin { color: #8DA6CE; } 21 | .cm-s-blackboard .cm-tag { color: #8DA6CE; } 22 | .cm-s-blackboard .cm-attribute { color: #8DA6CE; } 23 | .cm-s-blackboard .cm-header { color: #FF6400; } 24 | .cm-s-blackboard .cm-hr { color: #AEAEAE; } 25 | .cm-s-blackboard .cm-link { color: #8DA6CE; } 26 | -------------------------------------------------------------------------------- /lib/codemirror/theme/cobalt.css: -------------------------------------------------------------------------------- 1 | .cm-s-cobalt.CodeMirror { background: #002240; color: white; } 2 | .cm-s-cobalt div.CodeMirror-selected { background: #b36539 !important; } 3 | .cm-s-cobalt .CodeMirror-gutters { background: #002240; border-right: 1px solid #aaa; } 4 | .cm-s-cobalt .CodeMirror-linenumber { color: #d0d0d0; } 5 | .cm-s-cobalt .CodeMirror-cursor { border-left: 1px solid white !important; } 6 | 7 | .cm-s-cobalt span.cm-comment { color: #08f; } 8 | .cm-s-cobalt span.cm-atom { color: #845dc4; } 9 | .cm-s-cobalt span.cm-number, .cm-s-cobalt span.cm-attribute { color: #ff80e1; } 10 | .cm-s-cobalt span.cm-keyword { color: #ffee80; } 11 | .cm-s-cobalt span.cm-string { color: #3ad900; } 12 | .cm-s-cobalt span.cm-meta { color: #ff9d00; } 13 | .cm-s-cobalt span.cm-variable-2, .cm-s-cobalt span.cm-tag { color: #9effff; } 14 | .cm-s-cobalt span.cm-variable-3, .cm-s-cobalt span.cm-def { color: white; } 15 | .cm-s-cobalt span.cm-error { color: #9d1e15; } 16 | .cm-s-cobalt span.cm-bracket { color: #d8d8d8; } 17 | .cm-s-cobalt span.cm-builtin, .cm-s-cobalt span.cm-special { color: #ff9e59; } 18 | .cm-s-cobalt span.cm-link { color: #845dc4; } 19 | -------------------------------------------------------------------------------- /lib/codemirror/theme/eclipse.css: -------------------------------------------------------------------------------- 1 | .cm-s-eclipse span.cm-meta {color: #FF1717;} 2 | .cm-s-eclipse span.cm-keyword { line-height: 1em; font-weight: bold; color: #7F0055; } 3 | .cm-s-eclipse span.cm-atom {color: #219;} 4 | .cm-s-eclipse span.cm-number {color: #164;} 5 | .cm-s-eclipse span.cm-def {color: #00f;} 6 | .cm-s-eclipse span.cm-variable {color: black;} 7 | .cm-s-eclipse span.cm-variable-2 {color: #0000C0;} 8 | .cm-s-eclipse span.cm-variable-3 {color: #0000C0;} 9 | .cm-s-eclipse span.cm-property {color: black;} 10 | .cm-s-eclipse span.cm-operator {color: black;} 11 | .cm-s-eclipse span.cm-comment {color: #3F7F5F;} 12 | .cm-s-eclipse span.cm-string {color: #2A00FF;} 13 | .cm-s-eclipse span.cm-string-2 {color: #f50;} 14 | .cm-s-eclipse span.cm-error {color: #f00;} 15 | .cm-s-eclipse span.cm-qualifier {color: #555;} 16 | .cm-s-eclipse span.cm-builtin {color: #30a;} 17 | .cm-s-eclipse span.cm-bracket {color: #cc7;} 18 | .cm-s-eclipse span.cm-tag {color: #170;} 19 | .cm-s-eclipse span.cm-attribute {color: #00c;} 20 | .cm-s-eclipse span.cm-link {color: #219;} 21 | 22 | .cm-s-eclipse .CodeMirror-matchingbracket { 23 | outline:1px solid grey; 24 | color:black !important; 25 | } 26 | -------------------------------------------------------------------------------- /lib/codemirror/theme/elegant.css: -------------------------------------------------------------------------------- 1 | .cm-s-elegant span.cm-number, .cm-s-elegant span.cm-string, .cm-s-elegant span.cm-atom {color: #762;} 2 | .cm-s-elegant span.cm-comment {color: #262; font-style: italic; line-height: 1em;} 3 | .cm-s-elegant span.cm-meta {color: #555; font-style: italic; line-height: 1em;} 4 | .cm-s-elegant span.cm-variable {color: black;} 5 | .cm-s-elegant span.cm-variable-2 {color: #b11;} 6 | .cm-s-elegant span.cm-qualifier {color: #555;} 7 | .cm-s-elegant span.cm-keyword {color: #730;} 8 | .cm-s-elegant span.cm-builtin {color: #30a;} 9 | .cm-s-elegant span.cm-error {background-color: #fdd;} 10 | .cm-s-elegant span.cm-link {color: #762;} 11 | -------------------------------------------------------------------------------- /lib/codemirror/theme/erlang-dark.css: -------------------------------------------------------------------------------- 1 | .cm-s-erlang-dark.CodeMirror { background: #002240; color: white; } 2 | .cm-s-erlang-dark div.CodeMirror-selected { background: #b36539 !important; } 3 | .cm-s-erlang-dark .CodeMirror-gutters { background: #002240; border-right: 1px solid #aaa; } 4 | .cm-s-erlang-dark .CodeMirror-linenumber { color: #d0d0d0; } 5 | .cm-s-erlang-dark .CodeMirror-cursor { border-left: 1px solid white !important; } 6 | 7 | .cm-s-erlang-dark span.cm-atom { color: #845dc4; } 8 | .cm-s-erlang-dark span.cm-attribute { color: #ff80e1; } 9 | .cm-s-erlang-dark span.cm-bracket { color: #ff9d00; } 10 | .cm-s-erlang-dark span.cm-builtin { color: #eaa; } 11 | .cm-s-erlang-dark span.cm-comment { color: #77f; } 12 | .cm-s-erlang-dark span.cm-def { color: #e7a; } 13 | .cm-s-erlang-dark span.cm-error { color: #9d1e15; } 14 | .cm-s-erlang-dark span.cm-keyword { color: #ffee80; } 15 | .cm-s-erlang-dark span.cm-meta { color: #50fefe; } 16 | .cm-s-erlang-dark span.cm-number { color: #ffd0d0; } 17 | .cm-s-erlang-dark span.cm-operator { color: #d11; } 18 | .cm-s-erlang-dark span.cm-string { color: #3ad900; } 19 | .cm-s-erlang-dark span.cm-tag { color: #9effff; } 20 | .cm-s-erlang-dark span.cm-variable { color: #50fe50; } 21 | .cm-s-erlang-dark span.cm-variable-2 { color: #e0e; } 22 | -------------------------------------------------------------------------------- /lib/codemirror/theme/lesser-dark.css: -------------------------------------------------------------------------------- 1 | /* 2 | http://lesscss.org/ dark theme 3 | Ported to CodeMirror by Peter Kroon 4 | */ 5 | .cm-s-lesser-dark { 6 | line-height: 1.3em; 7 | } 8 | .cm-s-lesser-dark { 9 | font-family: 'Bitstream Vera Sans Mono', 'DejaVu Sans Mono', 'Monaco', Courier, monospace !important; 10 | } 11 | 12 | .cm-s-lesser-dark.CodeMirror { background: #262626; color: #EBEFE7; text-shadow: 0 -1px 1px #262626; } 13 | .cm-s-lesser-dark div.CodeMirror-selected {background: #45443B !important;} /* 33322B*/ 14 | .cm-s-lesser-dark .CodeMirror-cursor { border-left: 1px solid white !important; } 15 | .cm-s-lesser-dark pre { padding: 0 8px; }/*editable code holder*/ 16 | 17 | div.CodeMirror span.CodeMirror-matchingbracket { color: #7EFC7E; }/*65FC65*/ 18 | 19 | .cm-s-lesser-dark .CodeMirror-gutters { background: #262626; border-right:1px solid #aaa; } 20 | .cm-s-lesser-dark .CodeMirror-linenumber { color: #777; } 21 | 22 | .cm-s-lesser-dark span.cm-keyword { color: #599eff; } 23 | .cm-s-lesser-dark span.cm-atom { color: #C2B470; } 24 | .cm-s-lesser-dark span.cm-number { color: #B35E4D; } 25 | .cm-s-lesser-dark span.cm-def {color: white;} 26 | .cm-s-lesser-dark span.cm-variable { color:#D9BF8C; } 27 | .cm-s-lesser-dark span.cm-variable-2 { color: #669199; } 28 | .cm-s-lesser-dark span.cm-variable-3 { color: white; } 29 | .cm-s-lesser-dark span.cm-property {color: #92A75C;} 30 | .cm-s-lesser-dark span.cm-operator {color: #92A75C;} 31 | .cm-s-lesser-dark span.cm-comment { color: #666; } 32 | .cm-s-lesser-dark span.cm-string { color: #BCD279; } 33 | .cm-s-lesser-dark span.cm-string-2 {color: #f50;} 34 | .cm-s-lesser-dark span.cm-meta { color: #738C73; } 35 | .cm-s-lesser-dark span.cm-error { color: #9d1e15; } 36 | .cm-s-lesser-dark span.cm-qualifier {color: #555;} 37 | .cm-s-lesser-dark span.cm-builtin { color: #ff9e59; } 38 | .cm-s-lesser-dark span.cm-bracket { color: #EBEFE7; } 39 | .cm-s-lesser-dark span.cm-tag { color: #669199; } 40 | .cm-s-lesser-dark span.cm-attribute {color: #00c;} 41 | .cm-s-lesser-dark span.cm-header {color: #a0a;} 42 | .cm-s-lesser-dark span.cm-quote {color: #090;} 43 | .cm-s-lesser-dark span.cm-hr {color: #999;} 44 | .cm-s-lesser-dark span.cm-link {color: #00c;} 45 | -------------------------------------------------------------------------------- /lib/codemirror/theme/midnight.css: -------------------------------------------------------------------------------- 1 | /* Based on the theme at http://bonsaiden.github.com/JavaScript-Garden */ 2 | 3 | /**/ 4 | .breakpoints {width: .8em;} 5 | .breakpoint { color: #822; } 6 | 7 | /**/ 8 | span.CodeMirror-matchhighlight { background: #494949 } 9 | .CodeMirror-focused span.CodeMirror-matchhighlight { background: #314D67; !important } 10 | 11 | /**/ 12 | .activeline {background: #253540 !important;} 13 | 14 | .cm-s-midnight.CodeMirror { 15 | background: #0F192A; 16 | color: #D1EDFF; 17 | } 18 | 19 | .CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;} 20 | 21 | .cm-s-midnight div.CodeMirror-selected {background: #314D67 !important;} 22 | .cm-s-midnight .CodeMirror-gutters {background: #0F192A; border-right: 1px solid;} 23 | .cm-s-midnight .CodeMirror-linenumber {color: #D0D0D0;} 24 | .cm-s-midnight .CodeMirror-cursor { 25 | border-left: 1px solid #F8F8F0 !important; 26 | } 27 | 28 | .cm-s-midnight span.cm-comment {color: #428BDD;} 29 | .cm-s-midnight span.cm-atom {color: #AE81FF;} 30 | .cm-s-midnight span.cm-number {color: #D1EDFF;} 31 | 32 | .cm-s-midnight span.cm-property, .cm-s-tropicaleve span.cm-attribute {color: #A6E22E;} 33 | .cm-s-midnight span.cm-keyword {color: #E83737;} 34 | .cm-s-midnight span.cm-string {color: #1DC116;} 35 | 36 | .cm-s-midnight span.cm-variable {color: #FFAA3E;} 37 | .cm-s-midnight span.cm-variable-2 {color: #FFAA3E;} 38 | .cm-s-midnight span.cm-def {color: #4DD;} 39 | .cm-s-midnight span.cm-error {background: #F92672; color: #F8F8F0;} 40 | .cm-s-midnight span.cm-bracket {color: #D1EDFF;} 41 | .cm-s-midnight span.cm-tag {color: #008;} 42 | .cm-s-midnight span.cm-link {color: #AE81FF;} 43 | 44 | .cm-s-midnight .CodeMirror-matchingbracket { 45 | text-decoration: underline; 46 | color: white !important; 47 | } 48 | 49 | .typ { color: #FFAA3E; } 50 | .atn { color: #606; } 51 | .atv { color: #080; } 52 | .dec { color: #606; } 53 | -------------------------------------------------------------------------------- /lib/codemirror/theme/monokai.css: -------------------------------------------------------------------------------- 1 | /* Based on Sublime Text's Monokai theme */ 2 | 3 | .cm-s-monokai.CodeMirror {background: #272822; color: #f8f8f2;} 4 | .cm-s-monokai div.CodeMirror-selected {background: #49483E !important;} 5 | .cm-s-monokai .CodeMirror-gutters {background: #272822; border-right: 0px;} 6 | .cm-s-monokai .CodeMirror-linenumber {color: #d0d0d0;} 7 | .cm-s-monokai .CodeMirror-cursor {border-left: 1px solid #f8f8f0 !important;} 8 | 9 | .cm-s-monokai span.cm-comment {color: #75715e;} 10 | .cm-s-monokai span.cm-atom {color: #ae81ff;} 11 | .cm-s-monokai span.cm-number {color: #ae81ff;} 12 | 13 | .cm-s-monokai span.cm-property, .cm-s-monokai span.cm-attribute {color: #a6e22e;} 14 | .cm-s-monokai span.cm-keyword {color: #f92672;} 15 | .cm-s-monokai span.cm-string {color: #e6db74;} 16 | 17 | .cm-s-monokai span.cm-variable {color: #a6e22e;} 18 | .cm-s-monokai span.cm-variable-2 {color: #9effff;} 19 | .cm-s-monokai span.cm-def {color: #fd971f;} 20 | .cm-s-monokai span.cm-error {background: #f92672; color: #f8f8f0;} 21 | .cm-s-monokai span.cm-bracket {color: #f8f8f2;} 22 | .cm-s-monokai span.cm-tag {color: #f92672;} 23 | .cm-s-monokai span.cm-link {color: #ae81ff;} 24 | 25 | .cm-s-monokai .CodeMirror-matchingbracket { 26 | text-decoration: underline; 27 | color: white !important; 28 | } 29 | -------------------------------------------------------------------------------- /lib/codemirror/theme/neat.css: -------------------------------------------------------------------------------- 1 | .cm-s-neat span.cm-comment { color: #a86; } 2 | .cm-s-neat span.cm-keyword { line-height: 1em; font-weight: bold; color: blue; } 3 | .cm-s-neat span.cm-string { color: #a22; } 4 | .cm-s-neat span.cm-builtin { line-height: 1em; font-weight: bold; color: #077; } 5 | .cm-s-neat span.cm-special { line-height: 1em; font-weight: bold; color: #0aa; } 6 | .cm-s-neat span.cm-variable { color: black; } 7 | .cm-s-neat span.cm-number, .cm-s-neat span.cm-atom { color: #3a3; } 8 | .cm-s-neat span.cm-meta {color: #555;} 9 | .cm-s-neat span.cm-link { color: #3a3; } 10 | -------------------------------------------------------------------------------- /lib/codemirror/theme/night.css: -------------------------------------------------------------------------------- 1 | /* Loosely based on the Midnight Textmate theme */ 2 | 3 | .cm-s-night.CodeMirror { background: #0a001f; color: #f8f8f8; } 4 | .cm-s-night div.CodeMirror-selected { background: #447 !important; } 5 | .cm-s-night .CodeMirror-gutters { background: #0a001f; border-right: 1px solid #aaa; } 6 | .cm-s-night .CodeMirror-linenumber { color: #f8f8f8; } 7 | .cm-s-night .CodeMirror-cursor { border-left: 1px solid white !important; } 8 | 9 | .cm-s-night span.cm-comment { color: #6900a1; } 10 | .cm-s-night span.cm-atom { color: #845dc4; } 11 | .cm-s-night span.cm-number, .cm-s-night span.cm-attribute { color: #ffd500; } 12 | .cm-s-night span.cm-keyword { color: #599eff; } 13 | .cm-s-night span.cm-string { color: #37f14a; } 14 | .cm-s-night span.cm-meta { color: #7678e2; } 15 | .cm-s-night span.cm-variable-2, .cm-s-night span.cm-tag { color: #99b2ff; } 16 | .cm-s-night span.cm-variable-3, .cm-s-night span.cm-def { color: white; } 17 | .cm-s-night span.cm-error { color: #9d1e15; } 18 | .cm-s-night span.cm-bracket { color: #8da6ce; } 19 | .cm-s-night span.cm-comment { color: #6900a1; } 20 | .cm-s-night span.cm-builtin, .cm-s-night span.cm-special { color: #ff9e59; } 21 | .cm-s-night span.cm-link { color: #845dc4; } 22 | -------------------------------------------------------------------------------- /lib/codemirror/theme/rubyblue.css: -------------------------------------------------------------------------------- 1 | .cm-s-rubyblue { font:13px/1.4em Trebuchet, Verdana, sans-serif; } /* - customized editor font - */ 2 | 3 | .cm-s-rubyblue.CodeMirror { background: #112435; color: white; } 4 | .cm-s-rubyblue div.CodeMirror-selected { background: #38566F !important; } 5 | .cm-s-rubyblue .CodeMirror-gutters { background: #1F4661; border-right: 7px solid #3E7087; } 6 | .cm-s-rubyblue .CodeMirror-linenumber { color: white; } 7 | .cm-s-rubyblue .CodeMirror-cursor { border-left: 1px solid white !important; } 8 | 9 | .cm-s-rubyblue span.cm-comment { color: #999; font-style:italic; line-height: 1em; } 10 | .cm-s-rubyblue span.cm-atom { color: #F4C20B; } 11 | .cm-s-rubyblue span.cm-number, .cm-s-rubyblue span.cm-attribute { color: #82C6E0; } 12 | .cm-s-rubyblue span.cm-keyword { color: #F0F; } 13 | .cm-s-rubyblue span.cm-string { color: #F08047; } 14 | .cm-s-rubyblue span.cm-meta { color: #F0F; } 15 | .cm-s-rubyblue span.cm-variable-2, .cm-s-rubyblue span.cm-tag { color: #7BD827; } 16 | .cm-s-rubyblue span.cm-variable-3, .cm-s-rubyblue span.cm-def { color: white; } 17 | .cm-s-rubyblue span.cm-error { color: #AF2018; } 18 | .cm-s-rubyblue span.cm-bracket { color: #F0F; } 19 | .cm-s-rubyblue span.cm-link { color: #F4C20B; } 20 | .cm-s-rubyblue span.CodeMirror-matchingbracket { color:#F0F !important; } 21 | .cm-s-rubyblue span.cm-builtin, .cm-s-rubyblue span.cm-special { color: #FF9D00; } 22 | -------------------------------------------------------------------------------- /lib/codemirror/theme/twilight.css: -------------------------------------------------------------------------------- 1 | .cm-s-twilight.CodeMirror { background: #141414; color: #f7f7f7; } /**/ 2 | .cm-s-twilight .CodeMirror-selected { background: #323232 !important; } /**/ 3 | 4 | .cm-s-twilight .CodeMirror-gutters { background: #222; border-right: 1px solid #aaa; } 5 | .cm-s-twilight .CodeMirror-linenumber { color: #aaa; } 6 | .cm-s-twilight .CodeMirror-cursor { border-left: 1px solid white !important; } 7 | 8 | .cm-s-twilight .cm-keyword { color: #f9ee98; } /**/ 9 | .cm-s-twilight .cm-atom { color: #FC0; } 10 | .cm-s-twilight .cm-number { color: #ca7841; } /**/ 11 | .cm-s-twilight .cm-def { color: #8DA6CE; } 12 | .cm-s-twilight span.cm-variable-2, .cm-s-twilight span.cm-tag { color: #607392; } /**/ 13 | .cm-s-twilight span.cm-variable-3, .cm-s-twilight span.cm-def { color: #607392; } /**/ 14 | .cm-s-twilight .cm-operator { color: #cda869; } /**/ 15 | .cm-s-twilight .cm-comment { color:#777; font-style:italic; font-weight:normal; } /**/ 16 | .cm-s-twilight .cm-string { color:#8f9d6a; font-style:italic; } /**/ 17 | .cm-s-twilight .cm-string-2 { color:#bd6b18 } /*?*/ 18 | .cm-s-twilight .cm-meta { background-color:#141414; color:#f7f7f7; } /*?*/ 19 | .cm-s-twilight .cm-error { border-bottom: 1px solid red; } 20 | .cm-s-twilight .cm-builtin { color: #cda869; } /*?*/ 21 | .cm-s-twilight .cm-tag { color: #997643; } /**/ 22 | .cm-s-twilight .cm-attribute { color: #d6bb6d; } /*?*/ 23 | .cm-s-twilight .cm-header { color: #FF6400; } 24 | .cm-s-twilight .cm-hr { color: #AEAEAE; } 25 | .cm-s-twilight .cm-link { color:#ad9361; font-style:italic; text-decoration:none; } /**/ 26 | 27 | -------------------------------------------------------------------------------- /lib/codemirror/theme/vibrant-ink.css: -------------------------------------------------------------------------------- 1 | /* Taken from the popular Visual Studio Vibrant Ink Schema */ 2 | 3 | .cm-s-vibrant-ink.CodeMirror { background: black; color: white; } 4 | .cm-s-vibrant-ink .CodeMirror-selected { background: #35493c !important; } 5 | 6 | .cm-s-vibrant-ink .CodeMirror-gutters { background: #002240; border-right: 1px solid #aaa; } 7 | .cm-s-vibrant-ink .CodeMirror-linenumber { color: #d0d0d0; } 8 | .cm-s-vibrant-ink .CodeMirror-cursor { border-left: 1px solid white !important; } 9 | 10 | .cm-s-vibrant-ink .cm-keyword { color: #CC7832; } 11 | .cm-s-vibrant-ink .cm-atom { color: #FC0; } 12 | .cm-s-vibrant-ink .cm-number { color: #FFEE98; } 13 | .cm-s-vibrant-ink .cm-def { color: #8DA6CE; } 14 | .cm-s-vibrant-ink span.cm-variable-2, .cm-s-cobalt span.cm-tag { color: #FFC66D } 15 | .cm-s-vibrant-ink span.cm-variable-3, .cm-s-cobalt span.cm-def { color: #FFC66D } 16 | .cm-s-vibrant-ink .cm-operator { color: #888; } 17 | .cm-s-vibrant-ink .cm-comment { color: gray; font-weight: bold; } 18 | .cm-s-vibrant-ink .cm-string { color: #A5C25C } 19 | .cm-s-vibrant-ink .cm-string-2 { color: red } 20 | .cm-s-vibrant-ink .cm-meta { color: #D8FA3C; } 21 | .cm-s-vibrant-ink .cm-error { border-bottom: 1px solid red; } 22 | .cm-s-vibrant-ink .cm-builtin { color: #8DA6CE; } 23 | .cm-s-vibrant-ink .cm-tag { color: #8DA6CE; } 24 | .cm-s-vibrant-ink .cm-attribute { color: #8DA6CE; } 25 | .cm-s-vibrant-ink .cm-header { color: #FF6400; } 26 | .cm-s-vibrant-ink .cm-hr { color: #AEAEAE; } 27 | .cm-s-vibrant-ink .cm-link { color: blue; } 28 | -------------------------------------------------------------------------------- /lib/codemirror/theme/xq-dark.css: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2011 by MarkLogic Corporation 3 | Author: Mike Brevoort 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | */ 23 | .cm-s-xq-dark.CodeMirror { background: #0a001f; color: #f8f8f8; } 24 | .cm-s-xq-dark span.CodeMirror-selected { background: #a8f !important; } 25 | .cm-s-xq-dark .CodeMirror-gutters { background: #0a001f; border-right: 1px solid #aaa; } 26 | .cm-s-xq-dark .CodeMirror-linenumber { color: #f8f8f8; } 27 | .cm-s-xq-dark .CodeMirror-cursor { border-left: 1px solid white !important; } 28 | 29 | .cm-s-xq-dark span.cm-keyword {color: #FFBD40;} 30 | .cm-s-xq-dark span.cm-atom {color: #6C8CD5;} 31 | .cm-s-xq-dark span.cm-number {color: #164;} 32 | .cm-s-xq-dark span.cm-def {color: #FFF; text-decoration:underline;} 33 | .cm-s-xq-dark span.cm-variable {color: #FFF;} 34 | .cm-s-xq-dark span.cm-variable-2 {color: #EEE;} 35 | .cm-s-xq-dark span.cm-variable-3 {color: #DDD;} 36 | .cm-s-xq-dark span.cm-property {} 37 | .cm-s-xq-dark span.cm-operator {} 38 | .cm-s-xq-dark span.cm-comment {color: gray;} 39 | .cm-s-xq-dark span.cm-string {color: #9FEE00;} 40 | .cm-s-xq-dark span.cm-meta {color: yellow;} 41 | .cm-s-xq-dark span.cm-error {color: #f00;} 42 | .cm-s-xq-dark span.cm-qualifier {color: #FFF700;} 43 | .cm-s-xq-dark span.cm-builtin {color: #30a;} 44 | .cm-s-xq-dark span.cm-bracket {color: #cc7;} 45 | .cm-s-xq-dark span.cm-tag {color: #FFBD40;} 46 | .cm-s-xq-dark span.cm-attribute {color: #FFF700;} 47 | -------------------------------------------------------------------------------- /lib/codemirror/theme/xq-light.css: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2011 by MarkLogic Corporation 3 | Author: Mike Brevoort 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | */ 23 | .cm-s-xq-light span.cm-keyword {line-height: 1em; font-weight: bold; color: #5A5CAD; } 24 | .cm-s-xq-light span.cm-atom {color: #6C8CD5;} 25 | .cm-s-xq-light span.cm-number {color: #164;} 26 | .cm-s-xq-light span.cm-def {text-decoration:underline;} 27 | .cm-s-xq-light span.cm-variable {color: black; } 28 | .cm-s-xq-light span.cm-variable-2 {color:black;} 29 | .cm-s-xq-light span.cm-variable-3 {color: black; } 30 | .cm-s-xq-light span.cm-property {} 31 | .cm-s-xq-light span.cm-operator {} 32 | .cm-s-xq-light span.cm-comment {color: #0080FF; font-style: italic;} 33 | .cm-s-xq-light span.cm-string {color: red;} 34 | .cm-s-xq-light span.cm-meta {color: yellow;} 35 | .cm-s-xq-light span.cm-error {color: #f00;} 36 | .cm-s-xq-light span.cm-qualifier {color: grey} 37 | .cm-s-xq-light span.cm-builtin {color: #7EA656;} 38 | .cm-s-xq-light span.cm-bracket {color: #cc7;} 39 | .cm-s-xq-light span.cm-tag {color: #3F7F7F;} 40 | .cm-s-xq-light span.cm-attribute {color: #7F007F;} 41 | 42 | .cm-s-xq-light .CodeMirror-activeline-background {background: #e8f2ff !important;} 43 | .cm-s-xq-light .CodeMirror-matchingbracket {border:1px solid grey;color:black !important;background:yellow;} -------------------------------------------------------------------------------- /lib/prettify/desert.css: -------------------------------------------------------------------------------- 1 | /* desert scheme ported from vim to google prettify */ 2 | pre { display: block; background-color: #333 } 3 | pre .nocode { background-color: none; color: #000 } 4 | pre .str { color: #ffa0a0 } /* string - pink */ 5 | pre .kwd { color: #f0e68c; font-weight: bold } 6 | pre .com { color: #87ceeb } /* comment - skyblue */ 7 | pre .typ { color: #98fb98 } /* type - lightgreen */ 8 | pre .lit { color: #cd5c5c } /* literal - darkred */ 9 | pre .pun { color: #fff } /* punctuation */ 10 | pre .pln { color: #fff } /* plaintext */ 11 | pre .tag { color: #f0e68c; font-weight: bold } /* html/xml tag - lightyellow */ 12 | pre .atn { color: #bdb76b; font-weight: bold } /* attribute name - khaki */ 13 | pre .atv { color: #ffa0a0 } /* attribute value - pink */ 14 | pre .dec { color: #98fb98 } /* decimal - lightgreen */ 15 | 16 | /* Specify class=linenums on a pre to get line numbering */ 17 | ol.linenums { margin-top: 0; margin-bottom: 0; color: #AEAEAE } /* IE indents via margin-left */ 18 | li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8 { list-style-type: none } 19 | /* Alternate shading for lines */ 20 | li.L1,li.L3,li.L5,li.L7,li.L9 { } 21 | 22 | @media print { 23 | pre { background-color: none } 24 | pre .str, code .str { color: #060 } 25 | pre .kwd, code .kwd { color: #006; font-weight: bold } 26 | pre .com, code .com { color: #600; font-style: italic } 27 | pre .typ, code .typ { color: #404; font-weight: bold } 28 | pre .lit, code .lit { color: #044 } 29 | pre .pun, code .pun { color: #440 } 30 | pre .pln, code .pln { color: #000 } 31 | pre .tag, code .tag { color: #006; font-weight: bold } 32 | pre .atn, code .atn { color: #404 } 33 | pre .atv, code .atv { color: #060 } 34 | } 35 | -------------------------------------------------------------------------------- /lib/prettify/lang-tex.js: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2011 Martin S. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | /** 16 | * @fileoverview 17 | * Support for tex highlighting as discussed on 18 | * meta.tex.stackexchange.com. 19 | * 20 | * @author Martin S. 21 | */ 22 | 23 | PR['registerLangHandler']( 24 | PR['createSimpleLexer']( 25 | [ 26 | // whitespace 27 | [PR['PR_PLAIN'], /^[\t\n\r \xA0]+/, null, '\t\n\r \xA0'], 28 | // all comments begin with '%' 29 | [PR['PR_COMMENT'], /^%[^\r\n]*/, null, '%'] 30 | ], 31 | [ 32 | //[PR['PR_DECLARATION'], /^\\([egx]?def|(new|renew|provide)(command|environment))\b/], 33 | // any command starting with a \ and contains 34 | // either only letters (a-z,A-Z), '@' (internal macros) 35 | [PR['PR_KEYWORD'], /^\\[a-zA-Z@]+/], 36 | // or contains only one character 37 | [PR['PR_KEYWORD'], /^\\./], 38 | // Highlight dollar for math mode and ampersam for tabular 39 | [PR['PR_TYPE'], /^[$&]/], 40 | // numeric measurement values with attached units 41 | [PR['PR_LITERAL'], 42 | /[+-]?(?:\.\d+|\d+(?:\.\d*)?)(cm|em|ex|in|pc|pt|bp|mm)/i], 43 | // punctuation usually occurring within commands 44 | [PR['PR_PUNCTUATION'], /^[{}()\[\]=]+/] 45 | ]), 46 | ['latex', 'tex']); 47 | -------------------------------------------------------------------------------- /lib/prettify/prettify.css: -------------------------------------------------------------------------------- 1 | /* Pretty printing styles. Used with prettify.js. */ 2 | 3 | /* SPAN elements with the classes below are added by prettyprint. */ 4 | .pln { color: #000 } /* plain text */ 5 | 6 | @media screen { 7 | .str { color: #080 } /* string content */ 8 | .kwd { color: #008 } /* a keyword */ 9 | .com { color: #800 } /* a comment */ 10 | .typ { color: #606 } /* a type name */ 11 | .lit { color: #066 } /* a literal value */ 12 | /* punctuation, lisp open bracket, lisp close bracket */ 13 | .pun, .opn, .clo { color: #660 } 14 | .tag { color: #008 } /* a markup tag name */ 15 | .atn { color: #606 } /* a markup attribute name */ 16 | .atv { color: #080 } /* a markup attribute value */ 17 | .dec, .var { color: #606 } /* a declaration; a variable name */ 18 | .fun { color: red } /* a function name */ 19 | } 20 | 21 | /* Use higher contrast and text-weight for printable form. */ 22 | @media print, projection { 23 | .str { color: #060 } 24 | .kwd { color: #006; font-weight: bold } 25 | .com { color: #600; font-style: italic } 26 | .typ { color: #404; font-weight: bold } 27 | .lit { color: #044 } 28 | .pun, .opn, .clo { color: #440 } 29 | .tag { color: #006; font-weight: bold } 30 | .atn { color: #404 } 31 | .atv { color: #060 } 32 | } 33 | 34 | /* Put a border around prettyprinted code snippets. */ 35 | pre.prettyprint { padding: 2px; border: 1px solid #888 } 36 | 37 | /* Specify class=linenums on a pre to get line numbering */ 38 | ol.linenums { margin-top: 0; margin-bottom: 0 } /* IE indents via margin-left */ 39 | li.L0, 40 | li.L1, 41 | li.L2, 42 | li.L3, 43 | li.L5, 44 | li.L6, 45 | li.L7, 46 | li.L8 { list-style-type: none } 47 | /* Alternate shading for lines */ 48 | li.L1, 49 | li.L3, 50 | li.L5, 51 | li.L7, 52 | li.L9 { background: #eee } 53 | -------------------------------------------------------------------------------- /lib/prettify/sunburst.css: -------------------------------------------------------------------------------- 1 | /* Pretty printing styles. Used with prettify.js. */ 2 | /* Vim sunburst theme by David Leibovic */ 3 | 4 | pre .str, code .str { color: #65B042; } /* string - green */ 5 | pre .kwd, code .kwd { color: #E28964; } /* keyword - dark pink */ 6 | pre .com, code .com { color: #AEAEAE; font-style: italic; } /* comment - gray */ 7 | pre .typ, code .typ { color: #89bdff; } /* type - light blue */ 8 | pre .lit, code .lit { color: #3387CC; } /* literal - blue */ 9 | pre .pun, code .pun { color: #fff; } /* punctuation - white */ 10 | pre .pln, code .pln { color: #fff; } /* plaintext - white */ 11 | pre .tag, code .tag { color: #89bdff; } /* html/xml tag - light blue */ 12 | pre .atn, code .atn { color: #bdb76b; } /* html/xml attribute name - khaki */ 13 | pre .atv, code .atv { color: #65B042; } /* html/xml attribute value - green */ 14 | pre .dec, code .dec { color: #3387CC; } /* decimal - blue */ 15 | 16 | pre.prettyprint, code.prettyprint { 17 | background-color: #000; 18 | -moz-border-radius: 8px; 19 | -webkit-border-radius: 8px; 20 | -o-border-radius: 8px; 21 | -ms-border-radius: 8px; 22 | -khtml-border-radius: 8px; 23 | border-radius: 8px; 24 | } 25 | 26 | pre.prettyprint { 27 | width: 95%; 28 | margin: 1em auto; 29 | padding: 1em; 30 | white-space: pre-wrap; 31 | } 32 | 33 | 34 | /* Specify class=linenums on a pre to get line numbering */ 35 | ol.linenums { margin-top: 0; margin-bottom: 0; color: #AEAEAE; } /* IE indents via margin-left */ 36 | li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8 { list-style-type: none } 37 | /* Alternate shading for lines */ 38 | li.L1,li.L3,li.L5,li.L7,li.L9 { } 39 | 40 | @media print { 41 | pre .str, code .str { color: #060; } 42 | pre .kwd, code .kwd { color: #006; font-weight: bold; } 43 | pre .com, code .com { color: #600; font-style: italic; } 44 | pre .typ, code .typ { color: #404; font-weight: bold; } 45 | pre .lit, code .lit { color: #044; } 46 | pre .pun, code .pun { color: #440; } 47 | pre .pln, code .pln { color: #000; } 48 | pre .tag, code .tag { color: #006; font-weight: bold; } 49 | pre .atn, code .atn { color: #404; } 50 | pre .atv, code .atv { color: #060; } 51 | } 52 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "author": "Nisheeth Kashyap", 3 | "name": "ConsoleJS", 4 | "version": "0.0.1", 5 | "dependencies": { 6 | "socket.io": "latest" 7 | }, 8 | "main": "./Server/Start.js", 9 | "private": true 10 | } -------------------------------------------------------------------------------- /start.bat: -------------------------------------------------------------------------------- 1 | node ./Server/Start.js --------------------------------------------------------------------------------