From 071c9e15739d003bbbd1a65a8410049fd8a03479 Mon Sep 17 00:00:00 2001 From: Zack Scholl Date: Sat, 23 Feb 2019 07:09:17 -0800 Subject: [PATCH] only show snackbar on public --- static/js/rwtxt.js | 6 ++++-- templates/viewedit.html | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/static/js/rwtxt.js b/static/js/rwtxt.js index 86ebbf9..f92be54 100644 --- a/static/js/rwtxt.js +++ b/static/js/rwtxt.js @@ -202,8 +202,10 @@ if (getParameterByName("edit") != null) { function showMessage() { var x = document.getElementById("snackbar"); - x.className = "show"; - setTimeout(function(){ x.className = x.className.replace("show", ""); }, 3000); + if (x != null) { + x.className = "show"; + setTimeout(function(){ x.className = x.className.replace("show", ""); }, 3000); + } } diff --git a/templates/viewedit.html b/templates/viewedit.html index 9201985..085d431 100644 --- a/templates/viewedit.html +++ b/templates/viewedit.html @@ -31,7 +31,9 @@ +{{ if (eq .Domain "public") }}
Write markdown, reload page when you are done!
+{{ end }}