AprilSylph / XKit-Rewritten

🧰 The enhancement suite for Tumblr's new web interface
GNU General Public License v3.0
274 stars 44 forks source link

Themed Posts: Function in Communities #1496

Open marcustyphoon opened 2 weeks ago

marcustyphoon commented 2 weeks ago

Description

Related: #1441

As noted in the first linked issue, posts can have not only the single blog that "owns" them, but can also have a secondary blog associated with them: either the submitting blog if the post is a submission, the author blog if the post is on a group blog with the "show author portraits" setting enabled, or the author blog if the post is part of Tumblr Communities.

Notably, in the third case, the Tumblr UI reverses how these two fields affect how a post is rendered (the community owns the post, but the post looks like the "authorBlog" owns it).

Themed Posts' rendering should be consistent with how a post looks, so this overrides the field it queries to determine post color only in the case of Communities posts.

(I had changes to other scripts in this PR but none of them wound up being entirely correct.)

Testing steps