|
Lines 89-94
function addExpandHandler() {
Link Here
|
| 89 |
$(this).hide(); |
89 |
$(this).hide(); |
| 90 |
var target = $(this).data("target"); |
90 |
var target = $(this).data("target"); |
| 91 |
var syntax = $(this).data("syntax"); |
91 |
var syntax = $(this).data("syntax"); |
|
|
92 |
var lint_type = syntax === 'javascript'? { 'esversion': 6 } : true; |
| 92 |
$("#collapse_" + target).show(); |
93 |
$("#collapse_" + target).show(); |
| 93 |
if (syntax) { |
94 |
if (syntax) { |
| 94 |
var editor = CodeMirror.fromTextArea(document.getElementById("pref_" + target), { |
95 |
var editor = CodeMirror.fromTextArea(document.getElementById("pref_" + target), { |
|
Lines 97-103
function addExpandHandler() {
Link Here
|
| 97 |
lineWrapping: true, |
98 |
lineWrapping: true, |
| 98 |
viewportMargin: Infinity, |
99 |
viewportMargin: Infinity, |
| 99 |
gutters: ["CodeMirror-lint-markers"], |
100 |
gutters: ["CodeMirror-lint-markers"], |
| 100 |
lint: true |
101 |
lint: lint_type, |
| 101 |
}); |
102 |
}); |
| 102 |
editor.on("change", function () { |
103 |
editor.on("change", function () { |
| 103 |
mark_modified.call($("#pref_" + target)[0]); |
104 |
mark_modified.call($("#pref_" + target)[0]); |
| 104 |
- |
|
|