I didn’t get it to work. As soon as a different hierarchy level is selected the script is no longer carried out. I do not speak enough JavaScript to have an idea how to address this problem. I also do not see how the css injection approach you mentioned worked in the first place since it should face the very same problem: the injection script is only executed when the hierarchy level is shown that has the webview with the injection. Anyway, what works is an additional icon buster Webview as the last item in each hierarchy level that one wants to treat. The following has the code for the icon buster Webview that worked for me:
<head>
<style>
</style>
</head>
<body>
<script type="text/javascript">
// Hide the last web element of the page ...
_webViewElements = window.parent.document.body.getElementsByClassName("mdl-form__row mdl-form__row--height-auto mdl-cell mdl-cell--12-col ");
_lastWebViewElement = _webViewElements[_webViewElements.length - 1];
_lastWebViewElement.style.display = "none";
_lastWebViewElement.previousElementSibling.style.display = "none";
// hide the Webview icon for all Webview instances
Array.prototype.forEach.call(_webViewElements, function(element) {
element.previousElementSibling.style.display = "none";
});
</script>
</body>
If anyone comes up with a better solution (i.e., only a single icon buster Webview in the entire sitemap) please let us all know.