Tutorial: Hide Icon and whitespace when using webviews

Hi all,

For anyone struggling with using a webview and having an empty item row or blank icon above it

Include the following in the head of the page you are loading in the webview.

<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js"></script>
<script type="text/javascript">
		$(parent.document).find('.mdl-form__row.mdl-form__row--height-auto.mdl-cell.mdl-cell--12-col').prev().css("display", "none");
</script>

Before


After

I should add while this works for my use case, I’ve not fully tested it and may have not spotted a side effect.

Chris

4 Likes

Hello, this is exactly what I want to fix. But where exactly in openhab file directory should I add this code?

I guess icon=none is the proper solution now.

See this answer for details.