diff --git a/chrome/content/zotero/tools/csledit.js b/chrome/content/zotero/tools/csledit.js
index d44ebb773f..4b846c76e4 100644
--- a/chrome/content/zotero/tools/csledit.js
+++ b/chrome/content/zotero/tools/csledit.js
@@ -25,7 +25,7 @@
import FilePicker from 'zotero/modules/filePicker';
-var Zotero_CSL_Editor = new function() {
+var Zotero_CSL_Editor = new function () {
let monaco, editor;
this.init = init;
@@ -86,7 +86,7 @@ var Zotero_CSL_Editor = new function() {
});
}
- this.onStyleSelected = function(styleID) {
+ this.onStyleSelected = function (styleID) {
Zotero.Prefs.set('export.lastStyle', styleID);
let style = Zotero.Styles.get(styleID);
Zotero.Styles.updateLocaleList(
@@ -97,11 +97,11 @@ var Zotero_CSL_Editor = new function() {
loadCSL(style.styleID);
this.refresh();
- }
+ };
- this.refresh = function() {
+ this.refresh = function () {
this.generateBibliography(this.loadStyleFromEditor());
- }
+ };
this.refreshDebounced = Zotero.Utilities.debounce(this.refresh, 250);
@@ -110,7 +110,7 @@ var Zotero_CSL_Editor = new function() {
var fp = new FilePicker();
fp.init(window, Zotero.getString('styles.editor.save'), fp.modeSave);
fp.appendFilter("Citation Style Language", "*.csl");
- //get the filename from the id; we could consider doing even more here like creating the id from filename.
+ //get the filename from the id; we could consider doing even more here like creating the id from filename.
var parser = new DOMParser();
var doc = parser.parseFromString(style, 'text/xml');
var filename = doc.getElementsByTagName("id");
@@ -134,22 +134,20 @@ var Zotero_CSL_Editor = new function() {
document.getElementById('zotero-csl-list').value = cslID;
}
- this.loadStyleFromEditor = function() {
+ this.loadStyleFromEditor = function () {
var styleObject;
try {
styleObject = new Zotero.Style(
editor.getValue()
);
- } catch(e) {
- document.getElementById('zotero-csl-preview-box')
- .contentDocument.documentElement.innerHTML = '