Populate all toot fields also for (single) toot pages - gophercgis - Collection of gopher CGI/DCGI for geomyidae
 (HTM) hg clone https://bitbucket.org/iamleot/gophercgis
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) changeset 9a513280d96c9f6fffab9adce599b74d4543829f
 (DIR) parent 0da3db35dbedd9fecdfeb2da4399b902109bfbe3
 (HTM) Author: Leonardo Taccari <iamleot@gmail.com>
       Date:   Mon, 17 Dec 2018 00:40:25 
       
       Populate all toot fields also for (single) toot pages
       
       Diffstat:
        mastodon/mastodon.dcgi |  8 +++++---
        1 files changed, 5 insertions(+), 3 deletions(-)
       ---
       diff -r 0da3db35dbed -r 9a513280d96c mastodon/mastodon.dcgi
       --- a/mastodon/mastodon.dcgi    Mon Dec 17 00:26:01 2018 +0100
       +++ b/mastodon/mastodon.dcgi    Mon Dec 17 00:40:25 2018 +0100
       @@ -54,14 +54,16 @@
               }
        
               {
       -               if (match($0, /class="status__relative-time/)) {
       +               if (match($0, /class="status__relative-time/) ||
       +                   match($0, /class="detailed-status__datetime/)) {
                               match($0, />[^<]+<\/time>$/)
                               toot["time"] = substr($0, RSTART + 1, RLENGTH - 8)
                               match($0, /href="[^"]+"/)
                               toot["url"] = substr($0, RSTART + 6, RLENGTH - 7)
                       }
        
       -               if (match($0, /class="status__display-name/)) {
       +               if (match($0, /class="status__display-name/) ||
       +                   match($0, /class="detailed-status__display-name/)) {
                               match($0, /@[^"]+/)
                               toot["username"] = substr($0, RSTART + 1, RLENGTH - 1)
                       }
       @@ -76,7 +78,7 @@
                               toot["content"] = $0
                       }
        
       -               if (toot["content"]) {
       +               if (toot["url"] && toot["content"]) {
                               print_toot(toot)
                               print "t"