Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix form_key element #218

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions xpi/chrome/content/library/models.js
Original file line number Diff line number Diff line change
Expand Up @@ -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"]');
Copy link

@ailispaw ailispaw Jul 22, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

input[name="tumblr_form_key"] の部分は input ではなく、meta です。

<meta name="tumblr-form-key" id="tumblr_form_key" content="xxxx">

微妙ですが、

meta[id="tumblr_form_key"] or meta[name="tumblr-form-key]"

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ありがとうございます。
#216 の手順とは異なるかもしれませんが、 Reblog ができるようになることを確認できました。


if (element && element.value) {
info.formKey = element.value;
if (element && element.content) {
info.formKey = element.content;

element = doc.querySelector('input[name="t"]');

Expand Down