Skip to content

Instantly share code, notes, and snippets.

@Getaji
Last active March 31, 2017 09:58
Show Gist options
  • Select an option

  • Save Getaji/f4459060f90319f87773712bb4512668 to your computer and use it in GitHub Desktop.

Select an option

Save Getaji/f4459060f90319f87773712bb4512668 to your computer and use it in GitHub Desktop.
TweetDeckのリプライ表示を従来の形式に戻すJavaScript
/**
* | Replying to @Getaji
* | Hogehuga
* こんなやつを
* | @Getaji Hogehuga
* こうするスクリプト。クリック時の挙動はそのまま。
*
* # 更新履歴
* ## 2017/03/31 18:49
* [fix]ツイートテキストの最初にリンクが入っている場合はスキップするように
*/
$('.other-replies').each(function() {
const rep = $(this);
const a = rep.children();
const tweet = $('.js-tweet-text', rep.closest('.js-tweet'));
if (tweet.children().eq(0).hasClass('link-complex')) return;
a.html(a.html().trim() + ' ');
tweet.prepend(a);
rep.remove();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment