memex-in commited on
Commit
c3e8e9d
·
verified ·
1 Parent(s): 27d431a

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +17 -18
index.html CHANGED
@@ -2,45 +2,44 @@
2
  <html lang="en">
3
  <head>
4
  <meta charset="UTF-8">
5
- <title>Bulk Website Opener</title>
6
  <style>
7
  body { font-family: sans-serif; padding: 20px; }
8
  textarea, input { width: 100%; margin-top: 10px; }
9
- textarea { height: 200px; }
10
  button { padding: 10px 20px; margin-top: 10px; font-size: 16px; }
11
  </style>
12
  </head>
13
  <body>
14
- <h2>Bulk Website Opener</h2>
15
- <p>Enter one URL per line (include https://):</p>
16
  <textarea id="urls" placeholder="https://example.com"></textarea>
17
- <p>Number of websites to open at once:</p>
18
  <input type="number" id="limit" placeholder="e.g. 5" min="1"><br>
19
- <button onclick="openWebsites()">Open Websites</button>
20
 
21
  <script>
22
- function openWebsites() {
23
- const urls = document.getElementById("urls").value
24
- .split('\n')
25
- .map(url => url.trim())
26
- .filter(Boolean);
27
-
28
  const limit = parseInt(document.getElementById("limit").value, 10);
29
 
 
 
 
 
 
30
  if (isNaN(limit) || limit <= 0) {
31
  alert("Please enter a valid number greater than 0.");
32
  return;
33
  }
34
 
35
- const toOpen = urls.slice(0, limit);
36
 
37
- // Open each URL with a delay to reduce popup blocking
38
- toOpen.forEach((url, index) => {
39
- const finalUrl = url.startsWith("http") ? url : "https://" + url;
40
  setTimeout(() => {
41
  window.open(finalUrl, '_blank');
42
- }, index * 500); // 500ms delay between each
43
- });
44
  }
45
  </script>
46
  </body>
 
2
  <html lang="en">
3
  <head>
4
  <meta charset="UTF-8">
5
+ <title>Open Same Website Multiple Times</title>
6
  <style>
7
  body { font-family: sans-serif; padding: 20px; }
8
  textarea, input { width: 100%; margin-top: 10px; }
9
+ textarea { height: 60px; }
10
  button { padding: 10px 20px; margin-top: 10px; font-size: 16px; }
11
  </style>
12
  </head>
13
  <body>
14
+ <h2>Open Website Multiple Times</h2>
15
+ <p>Enter a single URL (include https://):</p>
16
  <textarea id="urls" placeholder="https://example.com"></textarea>
17
+ <p>Number of tabs to open:</p>
18
  <input type="number" id="limit" placeholder="e.g. 5" min="1"><br>
19
+ <button onclick="openWebsiteMultipleTimes()">Open Website</button>
20
 
21
  <script>
22
+ function openWebsiteMultipleTimes() {
23
+ const urlInput = document.getElementById("urls").value.trim();
 
 
 
 
24
  const limit = parseInt(document.getElementById("limit").value, 10);
25
 
26
+ if (!urlInput) {
27
+ alert("Please enter a URL.");
28
+ return;
29
+ }
30
+
31
  if (isNaN(limit) || limit <= 0) {
32
  alert("Please enter a valid number greater than 0.");
33
  return;
34
  }
35
 
36
+ const finalUrl = urlInput.startsWith("http") ? urlInput : "https://" + urlInput;
37
 
38
+ for (let i = 0; i < limit; i++) {
 
 
39
  setTimeout(() => {
40
  window.open(finalUrl, '_blank');
41
+ }, i * 300); // delay each open slightly
42
+ }
43
  }
44
  </script>
45
  </body>