Skip to content

Conversation

beccasafan
Copy link

@beccasafan beccasafan commented Aug 22, 2020

Update for react, remove options that aren't relevant anymore with NPF, add a threshold preference as discussed in Discord.


run: function() {

this.running = true;

This comment was marked as off-topic.

@AprilSylph AprilSylph self-requested a review August 25, 2020 19:50
XKit.extensions.shorten_posts.cpanel_check_height();

if ($(".posts .post").length > 0) {
if ($("[data-id], .posts .post").length > 0) {
Copy link
Member

Choose a reason for hiding this comment

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

this check should be removed entirely in case the user hard-loads onto a page without posts and then soft-loads onto a page with posts


$obj.addClass("xkit-shorten-posts-shortened");

$article.append("<div class=\"xkit-shorten-posts-embiggen xkit-shorten-posts-embiggen-for-post-" + post_id + "\" data-post-id=\"" + post_id + "\" data-old-height=\"" + height + "\">This post has been shortened. Click here to show the full post</div>");
Copy link
Member

Choose a reason for hiding this comment

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

all these escapes and string concatenation is a little rough, could this be a template string instead?

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.

3 participants