aboutsummaryrefslogtreecommitdiff
path: root/ext/fg/js/api.js
diff options
context:
space:
mode:
authorAlex Yatskov <alex@foosoft.net>2017-08-14 21:43:09 -0700
committerAlex Yatskov <alex@foosoft.net>2017-08-14 21:43:09 -0700
commitbdf231082f4b4ca7c4c90d8b0cd40b6c4201723d (patch)
treeb378fa497e850c85145b241541edcace45324ca1 /ext/fg/js/api.js
parent82863cd86156d48b9f18dc10a560bedb82641862 (diff)
lots of fixes to backend
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});
+}