Skip to content

Commit

Permalink
Upgraded CodeMirror to version 2. Smaller file size.
Browse files Browse the repository at this point in the history
  • Loading branch information
cheeaun committed May 2, 2011
1 parent ead4c34 commit a80b093
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 160 deletions.
14 changes: 5 additions & 9 deletions advanced-options.html
@@ -1,5 +1,6 @@
<!DOCTYPE html>
<link rel="stylesheet" href="options.css">
<link rel="stylesheet" href="codemirror.css">
<script src="neatools.js"></script>
<script src="codemirror.js"></script>
<script>
Expand Down Expand Up @@ -62,16 +63,11 @@

var textareaUserstyle = $('userstyle');
if (localStorage.userstyle) textareaUserstyle.value = localStorage.userstyle;

var codeArea = CodeMirror.fromTextArea('userstyle', {
basefiles: 'codemirror-base.js',
stylesheet: 'codemirror.css',
width: '40em'
CodeMirror.fromTextArea(textareaUserstyle, {
onChange: function(c){
localStorage.userstyle = c.getValue();
}
});
codeArea.frame.contentWindow.onblur = function(){
var code = codeArea.editor.getCode();
localStorage.userstyle = code;
};
});
</script>
<h1><img src="icon32.png" width="32" height="32" alt=""> <script>__m('extName')</script> <small><script>__m('advancedOptions')</script></small></h1>
Expand Down

0 comments on commit a80b093

Please sign in to comment.