mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-04-22 18:15:47 +02:00
Update timeline-polls to use td-screenshot-remove & fix poll margin in screenshot
This commit is contained in:
parent
55253e284e
commit
1cbcd5c2da
Resources
@ -9,10 +9,10 @@ Polls in timelines
|
||||
chylex
|
||||
|
||||
[version]
|
||||
1.0
|
||||
1.0.1
|
||||
|
||||
[website]
|
||||
https://tweetduck.chylex.com
|
||||
|
||||
[requires]
|
||||
1.4.1
|
||||
1.7
|
@ -16,7 +16,7 @@ enabled(){
|
||||
};
|
||||
|
||||
// add poll rendering to tweets
|
||||
injectLayout("status/tweet_single.mustache", "status/poll", "{{/quotedTweetMissing}} {{#translation}}", "{{/quotedTweetMissing}} <div class='timeline-poll-container'>{{#poll}}{{>duck/tweet_single/poll}}{{/poll}}</div> {{#translation}}");
|
||||
injectLayout("status/tweet_single.mustache", "status/poll", "{{/quotedTweetMissing}} {{#translation}}", "{{/quotedTweetMissing}} <div class='timeline-poll-container td-screenshot-remove'>{{#poll}}{{>duck/tweet_single/poll}}{{/poll}}</div> {{#translation}}");
|
||||
TD.mustaches["duck/tweet_single/poll.mustache"] = '<div class="js-poll margin-tl"> {{#poll}} <ul class="margin-b--12"> {{#choices}} <li class="position-rel margin-b--8 height-3"> <div class="poll-bar pin-top height-p--100 br-1 {{#isWinner}}poll-bar--winner{{/isWinner}} {{#hasTimeLeft}}br-left{{/hasTimeLeft}} width-p--{{percentage}}"/> <div class="poll-label position-rel padding-a--4"> <span class="txt-bold txt-right inline-block width-5 padding-r--4">{{percentage}}%</span> {{{label}}} {{#isSelectedChoice}} <i class="icon icon-check txt-size-variable--11"></i> {{/isSelectedChoice}} </div> </li> {{/choices}} </ul> <span class="inline-block txt-small padding-ls txt-seamful-deep-gray"> {{{prettyCount}}} · {{#hasTimeLeft}} {{{prettyTimeLeft}}} {{/hasTimeLeft}} {{^hasTimeLeft}} {{_i}}Final results{{/i}} {{/hasTimeLeft}} </span> {{/poll}} </div>';
|
||||
}
|
||||
|
||||
|
@ -306,6 +306,7 @@
|
||||
setImportantProperty(selectedTweet.find(".js-tweet-text"), "margin-bottom", "8px");
|
||||
setImportantProperty(selectedTweet.find(".js-quote-detail"), "margin-bottom", "10px");
|
||||
setImportantProperty(selectedTweet.find(".js-media-preview-container"), "margin-bottom", "10px");
|
||||
setImportantProperty(selectedTweet.find(".js-poll-link").next(), "margin-bottom", "8px");
|
||||
|
||||
if (isDetail){
|
||||
setImportantProperty(selectedTweet.find(".js-tweet-media"), "margin-bottom", "0");
|
||||
@ -319,7 +320,6 @@
|
||||
|
||||
if (isReply){
|
||||
selectedTweet.find(".is-conversation").removeClass("is-conversation");
|
||||
selectedTweet.find(".timeline-poll-container").first().remove(); // fix for timeline polls plugin
|
||||
}
|
||||
|
||||
selectedTweet.find(".js-poll-link").remove();
|
||||
|
Loading…
Reference in New Issue
Block a user