title: Running Script In Multiple Website and Fetch the Result
body: <p><strong>Background:</strong> I manage a forum, and there is a forum event where people post their information. I need all the data from the forum, so i made a script to get all posts within a page. however there are around 100 of pages, so it will be a pain to do it one by one.</p>
  
  <p><strong>My Target:</strong> Able to get all posts from all pages in the forum.</p>
  
  <p><strong>What My script Does:</strong> grabbing the data. below is the script</p>
  
  <pre><code>var dates = document.querySelectorAll('*[id^="postmessage"]');
  var result = "";
  
  for (var i = 0; i &lt; dates.length; i++) {
      result += "&gt; ";
      var post = dates[i].innerHTML.toLowerCase();
      var lines = post.split('&lt;br&gt;');
  
      for (var l = 0; l &lt; lines.length; l++) {
          var line = lines[l];
  
          if (line.indexOf("ign") !== -1) result += line.substring(line.indexOf("ign") +4);
          if (line.indexOf("server") !== -1) result += line.substring(line.indexOf("server") +7);
          if (line.indexOf("platform") !== -1) result += line.substring(line.indexOf("platform") +9);
          if (line.indexOf("top 5 countries") !== -1) result += line.substring(line.indexOf("top 5 countries") +16);
  
          result += "|";
      }
  
      result += "\n";
  }
  
  result;
  </code></pre>
  
  <p><strong>My question:</strong> How can i automatically run this script and get the result from 100 pages?</p>