aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/js/ankiweb.js
diff options
context:
space:
mode:
authorAlex Yatskov <alex@foosoft.net>2016-10-19 09:26:26 -0700
committerAlex Yatskov <alex@foosoft.net>2016-10-19 09:26:26 -0700
commitdb918d36754529933ae4896032146755675b891a (patch)
tree20bdc30b39ce4a57cffd2161091799ebd06365aa /ext/bg/js/ankiweb.js
parent7d93587acb250266782e3788894a9e26ddf1eaa5 (diff)
Relog when ankiweb auth settings change
Diffstat (limited to 'ext/bg/js/ankiweb.js')
-rw-r--r--ext/bg/js/ankiweb.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/bg/js/ankiweb.js b/ext/bg/js/ankiweb.js
index 1393f668..bed605ec 100644
--- a/ext/bg/js/ankiweb.js
+++ b/ext/bg/js/ankiweb.js
@@ -75,6 +75,10 @@ class AnkiWeb {
});
}
+ logout() {
+ return AnkiWeb.loadPage('https://ankiweb.net/account/logout', null);
+ }
+
static scrape(username, password) {
return AnkiWeb.loadAccountPage('https://ankiweb.net/edit/', null, username, password).then(response => {
const modelsMatch = /editor\.models = (.*}]);/.exec(response);