title: Changing button text depending on href
body: <p>I'm trying to change some button text depending on the country in the slug, for example "fr" for France. This function is only picking up the first Meer laden no matter what. Any idea what I'm missing?</p>
  
  <pre><code>  window.onload = function(){
              if(window.location.href.indexOf("nl") &gt; -1){                
                var x = document.getElementsByClassName('juicer-button')[0];
                x.innerHTML = "Meer laden";      
              }
              else if(window.location.href.indexOf("de") &gt; -1){                
                var y = document.getElementsByClassName('juicer-button')[0];
                y.innerHTML = "Mehr laden";      
              }
              else if(window.location.href.indexOf("fr") &gt; -1){
                var z = document.getElementsByClassName('juicer-button')[0];
                z.innerHTML = "Charger plus";      
              }
              else if(window.location.href.indexOf("it") &gt; -1){                
                var a = document.getElementsByClassName('juicer-button')[0];
                a.innerHTML = "Carica altro";      
              }
              else{''}
            }
  </code></pre>