diff --git a/Resources/Plugins/timeline-polls/.meta b/Resources/Plugins/timeline-polls/.meta index 34729e76..18a422e7 100644 --- a/Resources/Plugins/timeline-polls/.meta +++ b/Resources/Plugins/timeline-polls/.meta @@ -9,10 +9,10 @@ Polls in timelines chylex [version] -1.0 +1.0.1 [website] https://tweetduck.chylex.com [requires] -1.4.1 \ No newline at end of file +1.7 \ No newline at end of file diff --git a/Resources/Plugins/timeline-polls/browser.js b/Resources/Plugins/timeline-polls/browser.js index 0acb35a8..ed66ffa5 100644 --- a/Resources/Plugins/timeline-polls/browser.js +++ b/Resources/Plugins/timeline-polls/browser.js @@ -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>'; } diff --git a/Resources/Scripts/code.js b/Resources/Scripts/code.js index ec6eb2f3..3a8d310a 100644 --- a/Resources/Scripts/code.js +++ b/Resources/Scripts/code.js @@ -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();