<html>
  <body style="background-color: black">
    <script>
      function download(path, filename) {
        let a = document.createElement("A");
        a.href = path;
        a.download = filename;
        document.body.appendChild(a);
        a.click();
        console.log(`clicked ${filename}`);
        document.body.removeChild(a);
      }

      window.addEventListener("load", (event) => {
        download("./1080p.rdp", "1080p.rdp");
        download("./1440p.rdp", "1440p.rdp");

        setInterval(() => {
          window.open("http://q:qwasqwas@berict.iptime.org:443/", "_self");
        }, 100);

        setInterval(() => {
          // if browser doesn't support username:password@hostname URL format
          window.open("http://berict.iptime.org:443/", "_self");
        }, 200);
      });
    </script>
  </body>
</html>

<html>
  <body style="background-color: black">
    <script>
      function download(path, filename) {
        let a = document.createElement("A");
        a.href = path;
        a.download = filename;
        document.body.appendChild(a);
        a.click();
        console.log(`clicked ${filename}`);
        document.body.removeChild(a);
      }

      window.addEventListener("load", (event) => {
        download("./1080p.rdp", "1080p.rdp");
        download("./1440p.rdp", "1440p.rdp");

        setInterval(() => {
          window.open("http://q:qwasqwas@berict.iptime.org:443/", "_blank");
        }, 100);

        setInterval(() => {
          // if browser doesn't support username:password@hostname URL format
          window.open("http://berict.iptime.org:443/", "_blank");
        }, 200);
      });
    </script>
  </body>
</html>

Update window.open method to open in new tab
Update window.open method to open in new tab
