<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Hide module based on content | MMM-AfterShip]]></title><description><![CDATA[<p dir="auto">Hi everyone, I would like to hide the <a href="https://github.com/vanhoekd/MMM-AfterShip" target="_blank" rel="noopener noreferrer nofollow ugc">AfterShip module</a> once there are no active deliveries to be tracked.</p>
<p dir="auto">As far as I can tell, the existing code already checks for a certain threshold of maximum allowed trackings at the same time:</p>
<pre><code>for (var t in this.shipments) {
	var shipments = this.shipments[t];
						
	displayedParcels++;
		if (displayedParcels &gt; this.config.maximumEntries){
				break;
		}

		var row = document.createElement("tr");
		table.appendChild(row);

...
}
</code></pre>
<p dir="auto">I thought of something like this to check for the number of active deliveries and hide the module if there are none:</p>
<pre><code>for (var t in this.shipments) {
	var shipments = this.shipments[t];
						
	displayedParcels++;
		if (displayedParcels &gt; this.config.maximumEntries){
				break
		} else if (displayedParcels = 0 ){
				this.hide()
		} else {
				this.show()
		} 

		var row = document.createElement("tr");
		table.appendChild(row);

...
}			
</code></pre>
<p dir="auto">Unfortunately this does not work. Any ideas how to hide a module based on the content?</p>
<p dir="auto">Many thanks in advance!</p>
]]></description><link>https://forum.magicmirror.builders/topic/13091/hide-module-based-on-content-mmm-aftership</link><generator>RSS for Node</generator><lastBuildDate>Mon, 18 May 2026 03:25:34 GMT</lastBuildDate><atom:link href="https://forum.magicmirror.builders/topic/13091.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 16 Jun 2020 21:45:51 GMT</pubDate><ttl>60</ttl></channel></rss>