Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
added another mime type for JS
azivnerddcb4a0e1064
diff --git a/src/entities/note.js b/src/entities/note.jsindex cd7ec238a3..8595609409 100644--- a/src/entities/note.js+++ b/src/entities/note.js@@ -75,7 +75,9 @@ class Note extends Entity {/** @returns {boolean} true if this note is JavaScript (code or attachment) */isJavaScript() {return (this.type === "code" || this.type === "file")- && (this.mime.startsWith("application/javascript") || this.mime === "application/x-javascript");+ && (this.mime.startsWith("application/javascript")+ || this.mime === "application/x-javascript"+ || this.mime === "text/javascript");}/** @returns {boolean} true if this note is HTML */diff --git a/src/services/backend_script_api.js b/src/services/backend_script_api.jsindex e88f085227..e02051c204 100644--- a/src/services/backend_script_api.js+++ b/src/services/backend_script_api.js@@ -225,6 +225,8 @@ function BackendScriptApi(startNote, currentNote, originEntity) {*/this.transactional = sql.transactional;+ this.sql = sql;+/*** Trigger tree refresh in all connected clients. This is required when some tree change happens in* the backend.