[Reblog Display Options] Update for React#2007
Open
dlmarquis wants to merge 1 commit intonew-xkit:masterfrom
Open
[Reblog Display Options] Update for React#2007dlmarquis wants to merge 1 commit intonew-xkit:masterfrom
dlmarquis wants to merge 1 commit intonew-xkit:masterfrom
Conversation
hobinjk
reviewed
Nov 18, 2020
| data.reblog_author + "</a>:</p>" + | ||
| '<blockquote class="reblog-quote">' + all_quotes_text + reblog_content + "</blockquote>"; | ||
| }); | ||
| for (j = 0; j+1 < $(reblog_tree).get().length; j++) { |
nightpool
reviewed
Nov 20, 2020
| if (this.preferences.remove_last_user.value) { | ||
| XKit.tools.add_css(".reblog-list-item.contributed-content .reblog-header {display: none;}", "better_reblogs"); | ||
| list_sel = ".reblog-list "; | ||
| XKit.tools.add_css("div[data-is-contributed-content]>" + reblogHeader + " {display: none;}", "better_reblogs"); |
Member
There was a problem hiding this comment.
keyToCss returns a comma separated list of classes, so this will turn into the css string
div[data-is-contributed-content] > .class1, .class2 {
display: none;
}Instead, you'll want to do something like:
XKit.css_map.keyToClasses("reblogHeader", cls => `[data-is-contributed-content] > ${cls}`).join(", ")
Author
There was a problem hiding this comment.
I did forget to do this in a couple cases, but reblogHeader and others only return a single class. As far as I can tell, the number of list items is constant. Is it our convention to do it anyway?
Member
There was a problem hiding this comment.
The problem is that while the list of classes is constant within a single release, Tumblr could add a new class named reblogHeader at any given time, and depending on compilation order/etc, that could massively break things. Just seems like it's safer to err on the side of caution here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Makes Reblog Display Options usable again. All features are implemented except the "post title on top" option in flat mode, and the padding options and colored background option in nested mode.
I think I've covered every preferences permutation, but there may be some I've missed.
Be aware, timestamps needed a minor update to make it compatible with nested mode.