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 additionally form_key element #219

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ykws
Copy link

@ykws ykws commented Jul 23, 2017

Thanks @gkojax @ailispaw

if fix additionally to #218 , revoke this pull request.

fixes #216

gkojax and others added 2 commits June 22, 2017 01:48
Replace

<input name="form_key">

with

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

@ailispaw

refs tombfix#216
@@ -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('meta[name="tumblr-form-key"]') || doc.querySelector('meta[id="tumblr-form-key"]');

Choose a reason for hiding this comment

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

説明が下手ですみません。

本来なら、input[name="form_key"] はそのままで、
meta[id="tumblr_form_key"] か meta[name="tumblr-form-key"] のどちらかを追加するだけで大丈夫なはずです。

#218 (comment)
で微妙と書いたのは、id の方は _ アンダースコアで、name は - ハイフンになっているところです。

ただ、input[name="form_key"] を残しても、下のコードが element.content だけなので、meta のみを前提にしているので、あまり意味が無いかもしれませんが。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ついにreblogできなくなってしまいました
3 participants