aboutsummaryrefslogtreecommitdiff
path: root/ext/fg/js/api.js
diff options
context:
space:
mode:
authorAlex Yatskov <alex@foosoft.net>2016-05-05 20:06:13 -0700
committerAlex Yatskov <alex@foosoft.net>2016-05-05 20:06:13 -0700
commit9cb099e5f6aad33c70d986bd6a48668e54ee211c (patch)
treed46de3d97388764f15f8f319d8455e60d3c2d9f4 /ext/fg/js/api.js
parentdd4b2f73656d652bc56be784a27e7378ab969ac6 (diff)
Optimization
Diffstat (limited to 'ext/fg/js/api.js')
-rw-r--r--ext/fg/js/api.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/ext/fg/js/api.js b/ext/fg/js/api.js
index 97c14640..da5f6d5a 100644
--- a/ext/fg/js/api.js
+++ b/ext/fg/js/api.js
@@ -17,6 +17,10 @@
*/
+//
+// Background APIs
+//
+
function sendMessage(action, params, callback) {
chrome.runtime.sendMessage({action: action, params: params}, callback);
}
@@ -40,3 +44,7 @@ function getOptions(callback) {
function getState(callback) {
sendMessage('getState', null, callback);
}
+
+function canAddNotes(definitions, callback) {
+ sendMessage('canAddNotes', {definitions: definitions}, callback);
+}