diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2020-02-17 11:02:21 -0500 |
---|---|---|
committer | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2020-02-17 11:02:21 -0500 |
commit | 0f46e3a093e7f0c07ad310d8c17e2582bdfd2741 (patch) | |
tree | 63318e3ce1ac19a32bc96e29f3b9b9477853993b /ext/mixed/js | |
parent | aee16c443195ff8ab2b0f5f5e8551e44895d48a1 (diff) |
Use a token to ensure that messages are coming from Yomichan
Diffstat (limited to 'ext/mixed/js')
-rw-r--r-- | ext/mixed/js/api.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/mixed/js/api.js b/ext/mixed/js/api.js index 14900ecf..7ea68d59 100644 --- a/ext/mixed/js/api.js +++ b/ext/mixed/js/api.js @@ -113,6 +113,10 @@ function apiGetZoom() { return _apiInvoke('getZoom'); } +function apiGetMessageToken() { + return _apiInvoke('getMessageToken'); +} + function _apiInvoke(action, params={}) { const data = {action, params}; return new Promise((resolve, reject) => { |