]> git.plutz.net Git - confetti/blobdiff - templates/frame.html.sh
filter pages accessible in bookmarker
[confetti] / templates / frame.html.sh
index db31ad839b92755f639e77a4191d5f43da8b3a23..a2d8feefe579e5bd95222de7089247fcce26f78a 100755 (executable)
@@ -44,13 +44,15 @@ cat <<EOF
         $(for page in "${_EXEC}/pages/"*.sh; do
           page="${page##*/}"
           page="${page%.sh}"
-          printf '<a href="?p=%s">%s</a>' "${page}" "$(l10n "p_${page}")"
-        done)
+          printf '<a href="?p=%s">%s</a>\n' "${page}" "$(l10n "p_${page}")"
+        done |grep -E '^<a href="\?p='"${page_filter}" )
         $(if grep -qF "$REQUEST_URI" "$bmfile"; then
           printf '<input type="hidden" name="bm_url" value="%s" />
                   <input type="text" name="bm_name" value="%s" readonly="readonly" /
                   ><button type="submit" name="submit" value="del">%s</button>' \
-                  "$(attribsafe ${REQUEST_URI})" "$(attribsafe $(grep -F "$REQUEST_URI " "$bmfile" |sed -r 's;.*\t;;'))" "$(l10n bm_del)"
+                  "$(attribsafe ${REQUEST_URI})" \
+                  "$(attribsafe $(grep -m1 -F "$REQUEST_URI    " "$bmfile" |sed -r 's;.*\t;;'))" \
+                  "$(l10n bm_del)"
         else
           printf '<input type="hidden" name="bm_url" value="%s" />
                   <input type="text" name="bm_name" placeholder="%s" /