Greasy Fork is available in English.

Blabbermouth - generate timestamps and add link to the fb comments area

Generates missing timestamps or converts the existing ones in relative format, and adds link to the fb comments area

作者のサイトでサポートを受ける。または、このスクリプトの質問や評価の投稿はこちら通報はこちらへお寄せください。
作者
darkred
1日のインストール数
0
累計インストール数
55
評価
0 0 0
バージョン
2.0
作成日
2020/02/27
更新日
2022/05/14
ライセンス
MIT
対象サイト

This script applies to blabbermouth.net.

Blabbermouth only displays timestamps (just the date) in news listings and pages.
It doesn't display timestamps in cd/dvd reviews pages at all.
The script generates timestamps in relative format, in all cases.

In details:

  • in news and cd/dvd reviews pages:

    • It generates timestamps (making use of the existing published_time data from inside the pages, e.g. 2020-02-20T19:10:22.000Z) in relative format. Also, it recalculates them every 1 minute.
      (the initial retrieved timestamps -converted to local timezone's offset- are tooltips: just hover mouse on a relative date to view)
    • It also creates an (additional) link to the Facebook comments next to the generated timestamp,
      with the comment count from that fb iframe 1 (i.e. 6 Comments, not just "Comments" ).
  • in news listings:

    • As you scroll down each page, it retrieves the relevant target news page in the background in order to get the relevant published_time data from the page, and then generates timestamps in relative format (like above).
      Note: recently (Nov 2020) blabbermouth started offering infinite scrolling in its home page and in news. Since v1.2 now the script also works in paginated news pages.
    • It fixes the displayed fb comment count (e.g. 6 Comments, instead of "0 Comments" that the site wrongly displays for all such pages).

 

1 Compatibility notes regarding that feature:

  • Violentmonkey: the script works in ok with VM in its default settings.
  • Tampermonkey: in order to work with TM, you have to remove the *://www.facebook.com/plugins/* pattern from TM blacklist (it's blacklisted in TM settings by default).
  • Greasemonkey: not supported.

Credits to Brock Adams for his answer to the StackOverflow question: How can two instances of a userscript communicate between frames?


The script uses moment.js.

If you have any bugs, bug fixes or ideas, please report at my GitHub repo