From 7ddeb0c945168995ee341eccbca3be25c546a5f9 Mon Sep 17 00:00:00 2001
From: zzz <zzz@mail.i2p>
Date: Thu, 21 Jun 2018 11:13:29 +0000
Subject: [PATCH] i2psnark: Remove tracker links unless non-default

---
 apps/i2psnark/java/src/org/klomp/snark/SnarkManager.java  | 8 ++++++++
 .../java/src/org/klomp/snark/web/I2PSnarkServlet.java     | 5 +----
 2 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/apps/i2psnark/java/src/org/klomp/snark/SnarkManager.java b/apps/i2psnark/java/src/org/klomp/snark/SnarkManager.java
index 8c6437a96f..befa2acb4e 100644
--- a/apps/i2psnark/java/src/org/klomp/snark/SnarkManager.java
+++ b/apps/i2psnark/java/src/org/klomp/snark/SnarkManager.java
@@ -2678,6 +2678,14 @@ public class SnarkManager implements CompleteListener, ClientApp {
         return rv;
     }
 
+    /**
+     *  Has the default tracker list been modified?
+     *  @since 0.9.35
+     */
+    public boolean hasModifiedTrackers() { 
+        return _config.containsKey(PROP_TRACKERS);
+    }
+
     /** @since 0.9 */
     private void initTrackerMap() {
         String trackers = _config.getProperty(PROP_TRACKERS);
diff --git a/apps/i2psnark/java/src/org/klomp/snark/web/I2PSnarkServlet.java b/apps/i2psnark/java/src/org/klomp/snark/web/I2PSnarkServlet.java
index 6a3d8d15f7..9b5112f6a3 100644
--- a/apps/i2psnark/java/src/org/klomp/snark/web/I2PSnarkServlet.java
+++ b/apps/i2psnark/java/src/org/klomp/snark/web/I2PSnarkServlet.java
@@ -350,10 +350,7 @@ public class I2PSnarkServlet extends BasicServlet {
                 out.write(_contextName);
             out.write("</a>\n");
             sortedTrackers = _manager.getSortedTrackers();
-            if (_context.isRouterContext()) {
-                //out.write("<a href=\"http://forum.i2p/viewforum.php?f=21\" class=\"snarkNav nav_forum\" target=\"_blank\">");
-                //out.write(_t("Forum"));
-                //out.write("</a>\n");
+            if (_context.isRouterContext() && _manager.hasModifiedTrackers()) {
                 for (Tracker t : sortedTrackers) {
                     if (t.baseURL == null || !t.baseURL.startsWith("http"))
                         continue;
-- 
GitLab