aboutsummaryrefslogtreecommitdiff
path: root/ext/fg/js/api.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/fg/js/api.js')
-rw-r--r--ext/fg/js/api.js22
1 files changed, 15 insertions, 7 deletions
diff --git a/ext/fg/js/api.js b/ext/fg/js/api.js
index b4d75c3c..174531ba 100644
--- a/ext/fg/js/api.js
+++ b/ext/fg/js/api.js
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2016 Alex Yatskov <alex@foosoft.net>
+ * Copyright (C) 2016-2017 Alex Yatskov <alex@foosoft.net>
* Author: Alex Yatskov <alex@foosoft.net>
*
* This program is free software: you can redistribute it and/or modify
@@ -17,6 +17,10 @@
*/
+function apiOptionsSet(options) {
+ return utilInvoke('optionsSet', {options});
+}
+
function apiOptionsGet() {
return utilInvoke('optionsGet');
}
@@ -29,18 +33,22 @@ function apiKanjiFind(text) {
return utilInvoke('kanjiFind', {text});
}
-function apiTemplateRender(template, data) {
- return utilInvoke('templateRender', {data, template});
+function apiDefinitionAdd(definition, mode) {
+ return utilInvoke('definitionAdd', {definition, mode});
}
function apiDefinitionsAddable(definitions, modes) {
return utilInvoke('definitionsAddable', {definitions, modes}).catch(() => null);
}
-function apiDefinitionAdd(definition, mode) {
- return utilInvoke('definitionAdd', {definition, mode});
-}
-
function apiNoteView(noteId) {
return utilInvoke('noteView', {noteId});
}
+
+function apiTemplateRender(template, data) {
+ return utilInvoke('templateRender', {data, template});
+}
+
+function apiCommandExec(command) {
+ return utilInvoke('commandExec', {command});
+}