diff --git a/tools/freetz_functions b/tools/freetz_functions index 7b974af69a..3ea0245e0e 100644 --- a/tools/freetz_functions +++ b/tools/freetz_functions @@ -17,6 +17,21 @@ supervisor_delete_service() { } +# removes a div by id name in all cock pits (since fos8) +cockpit_pruner() { + local theid="$1" + for oem in $(supported_brandings) all; do + [ -d "${FILESYSTEM_MOD_DIR}/usr/www/${oem}" -a ! -L "${FILESYSTEM_MOD_DIR}/usr/www/${oem}" ] || continue + for file in ${FILESYSTEM_MOD_DIR}/usr/www/${oem}/js3/views/overview/cockpit.html ${FILESYSTEM_MOD_DIR}/usr/www/${oem}/js3/views/overview/cockpit.*.html; do + [ ! -e ${file} ] && continue + modsed -r \ + "s/(=\"${theid}\"[^>]*)>/\1 style=\"display: none;\">/" \ + "$file" + done + done +} + + #linkbox_remove #removes links within a box on the left linkbox_remove() {