]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/WwwStream.pm
Merge remote-tracking branch 'origin/wwwlisting'
[public-inbox.git] / lib / PublicInbox / WwwStream.pm
index 8b79923b64efeab0946e18b1b3bf03094dd6a5fc..2893138d563abafa4ffbf4a8bfe612e801413621 100644 (file)
@@ -12,7 +12,6 @@ use warnings;
 use PublicInbox::Hval qw(ascii_html);
 use URI;
 our $TOR_URL = 'https://www.torproject.org/';
-our $TOR2WEB_URL = 'https://www.tor2web.org/';
 our $CODE_URL = 'https://public-inbox.org/';
 our $PROJECT = 'public-inbox';
 
@@ -71,6 +70,12 @@ sub _html_top ($) {
                "</head><body>". $top . $tip;
 }
 
+sub code_footer ($) {
+       my ($env) = @_;
+       my $u = PublicInbox::Hval::prurl($env, $CODE_URL);
+       qq(AGPL code for this site: git clone <a\nhref="$u">$u</a> $PROJECT)
+}
+
 sub _html_end {
        my ($self) = @_;
        my $urls = 'Archives are clonable:';
@@ -134,17 +139,11 @@ EOF
        if ($urls =~ m!\b[^:]+://\w+\.onion/!) {
                $urls .= "\n note: .onion URLs require Tor: ";
                $urls .= qq[<a\nhref="$TOR_URL">$TOR_URL</a>];
-               if ($TOR2WEB_URL) {
-                       $urls .= "\n       or Tor2web: ";
-                       $urls .= qq[<a\nhref="$TOR2WEB_URL">$TOR2WEB_URL</a>];
-               }
        }
-       my $url = PublicInbox::Hval::prurl($ctx->{env}, $CODE_URL);
        '<hr><pre>'.join("\n\n",
                $desc,
                $urls,
-               'AGPL code for this site: '.
-               qq(git clone <a\nhref="$url">$url</a> $PROJECT)
+               code_footer($ctx->{env})
        ).'</pre></body></html>';
 }