title: How to conditionally display HTML based on the page URL
body: <p>I have a few different web pages -</p>
  
  <pre><code>www.foo.com/index.html
  www.foo.com/dog.html
  www.foo.com/cat.html
  </code></pre>
  
  <p>Assume the pages are very similar, except for an image and some text in the middle of the page that's unique to that page.</p>
  
  <p>I have an external script that dynamically creates the HTML for each page using templates and substituting in various variables and configurations. I'm trying to figure out how to display a certain piece of HTML only for a certain page (e.g. cat.html)</p>
  
  <p>In psuedo-code, this is what I'd like to do -</p>
  
  <p></p>
  
  <pre><code>  &lt;style&gt;
      function isCatPage() {
        if page.url.contains("cat.html")
          return true;
        else
          return false;
        end
      }
    &lt;/style&gt;
  
    if isCatPage {
    &lt;bold&gt;This text only appears on cat.html&lt;/bold&gt;
    }
  
    &lt;p&gt; This is random dynamically generated HTML&lt;/p&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p>Using basic javascript to show <code>&lt;bold&gt;</code> on an specific HTML page. </p>
  
  <p>Thanks!</p>