title: Get element by Id from another page
body: <p>I need to change content of page1 if page2 contain specified element. This code works great if I get id from the same page</p>
  
  <pre><code>if (document.getElementById("page_element")) {
      var str = document.getElementById("destination").innerHTML;
      var n = str.replace("Login", "Logout");
      document.getElementById("destination").innerHTML = n;
  }
  </code></pre>
  
  <p>But I need to check if element is present on page2 in order to change content of page1.</p>
  
  <p>I must change this</p>
  
  <pre><code>  if (document.getElementById("page1_element"))
  </code></pre>
  
  <p>with correct path which is page2 (logged.html in my case). How can I do that ?</p>