]> git.plutz.net Git - webpoll/blobdiff - widgets.sh
reset table padding from updated cgilite style
[webpoll] / widgets.sh
index 3eb4850b274d764b28078f1e5eb0d7148bdf2ebe..8410a0cb92eaa61ab3a469fe6fd3859adc8f1d6f 100755 (executable)
@@ -1,5 +1,8 @@
 #!/bin/sh
 
+[ -n "$include_widgets" ] && return 0
+include_widgets="$0"
+
 export MD_HTML="false"
 if [ "$(which awk)" ]; then
   markdown() { awk -f "$_EXEC/cgilite/markdown.awk"; }
@@ -7,6 +10,14 @@ else
   markdown() { busybox awk -f "$_EXEC/cgilite/markdown.awk"; }
 fi
 
+dec(){
+  local n
+  for n in "$@"; do
+    while [ "${n}" != "${n#0}" ]; do n="${n#0}"; done
+    printf %i\\n "$n"
+  done
+}
+
 checked(){
   local check="$1"; shift 1;
   for comp in "$@"; do