From 4fc58e79760bde218b98c644e0b7b7aad13ade5c Mon Sep 17 00:00:00 2001 From: gkojax Date: Thu, 22 Jun 2017 01:48:19 +0900 Subject: [PATCH 1/2] Fix form_key element --- xpi/chrome/content/library/models.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xpi/chrome/content/library/models.js b/xpi/chrome/content/library/models.js index e877233d..bfb6480d 100755 --- a/xpi/chrome/content/library/models.js +++ b/xpi/chrome/content/library/models.js @@ -369,10 +369,10 @@ var Tumblr = update({}, AbstractSessionService, { getInfo() { return this.getDashboard().addCallback(doc => { let info = {}; - let element = doc.querySelector('input[name="form_key"]'); + let element = doc.querySelector('input[name="form_key"]') || doc.querySelector('input[name="tumblr_form_key"]'); - if (element && element.value) { - info.formKey = element.value; + if (element && element.content) { + info.formKey = element.content; element = doc.querySelector('input[name="t"]'); From d2b0426562bae699737c1b154fbe44c248ef8f5a Mon Sep 17 00:00:00 2001 From: Yoshiyuki Kawashima Date: Sun, 23 Jul 2017 16:44:57 +0900 Subject: [PATCH 2/2] Fix form_key element Replace with @ailispaw refs #216 --- xpi/chrome/content/library/models.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xpi/chrome/content/library/models.js b/xpi/chrome/content/library/models.js index bfb6480d..6ad90e04 100755 --- a/xpi/chrome/content/library/models.js +++ b/xpi/chrome/content/library/models.js @@ -369,7 +369,7 @@ var Tumblr = update({}, AbstractSessionService, { getInfo() { return this.getDashboard().addCallback(doc => { let info = {}; - let element = doc.querySelector('input[name="form_key"]') || doc.querySelector('input[name="tumblr_form_key"]'); + let element = doc.querySelector('meta[name="tumblr-form-key"]') || doc.querySelector('meta[id="tumblr-form-key"]'); if (element && element.content) { info.formKey = element.content;