This repository was archived by the owner on Mar 18, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
100 lines (88 loc) · 3.94 KB
/
index.html
File metadata and controls
100 lines (88 loc) · 3.94 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
<!DOCTYPE html>
<html>
<head>
<title>Zip Roulette</title>
<style>
body {
font-family: Arial, sans-serif;
text-align: center;
background-color: #f2f2f2;
padding: 20px;
}
h1 {
color: #333;
font-size: 2em;
}
p {
color: #666;
font-size: 1.5em;
}
.input-container {
display: flex;
justify-content: center;
align-items: center;
margin-bottom: 20px;
}
input[type="number"] {
width: 2%;
padding: 1%;
font-size: 1.2em;
}
button {
background-color: #007bff;
color: #fff;
padding: 1% 40%;
font-size: 1.5em;
cursor: pointer;
border: none;
}
button:hover {
background-color: #0056b3;
}
</style>
</head>
<body>
<h1>Welcome to Zip Roulette!</h1>
<p>Ever wondered what kind of weird websites take up the .zip TLD's (<a href="https://www.malwarebytes.com/blog/news/2023/05/zip-domains">that're still quite a horrible idea</a>)? Enter the number of links you want to open and see:</p>
<p style="font-size: 90%">Any more than 1 requires to allow pop-ups in your browser.</p>
<div class="input-container">
<input type="number" id="numLinks" min="1" max="10" value="1">
</div>
<button id="rouletteButton">Roll the Wheel!</button>
<p>Use at your own risk, do not open random files and ABSOLUTELY do not provide any credentials whatsoever. The author of the website is not responsible for any malware, phishing or traumatization you may receive on those links. I'm simply providing a randomizer.</p>
<p style="font-size: 95%">This website is <a href="https://github.com/zip-roulette/zip-roulette.github.io"> open source</a> and updates automatically thanks to <a href="https://github.com/trickest/zip"> this repository</a> and a custom script. Feel free to contribute to improve the selection logic.</p>
<script>
// Function to open random websites
function openRandomWebsites(numToOpen) {
// Fetch the list of websites from the text file
fetch('workinglinks.txt')
.then(response => response.text())
.then(data => {
const websites = data.split('\n').filter(Boolean); // Split by lines and remove empty lines
const selectedWebsites = [];
// Ensure the requested number is within the available range (up to 10)
numToOpen = Math.min(numToOpen, 10);
for (let i = 0; i < numToOpen; i++) {
const randomIndex = Math.floor(Math.random() * websites.length);
let randomWebsite = websites[randomIndex];
// Add "https://" if it's missing
if (!randomWebsite.startsWith('http://') && !randomWebsite.startsWith('https://')) {
randomWebsite = 'https://' + randomWebsite;
}
// Open the random website in a new tab/window
window.open(randomWebsite, '_blank');
// Add the random website to the selected list
selectedWebsites.push(randomWebsite);
}
})
.catch(error => console.error('Error fetching websites:', error));
}
// Add click event listener to the button
const rouletteButton = document.getElementById('rouletteButton');
rouletteButton.addEventListener('click', () => {
const numToOpen = parseInt(document.getElementById('numLinks').value, 10);
openRandomWebsites(numToOpen);
});
</script>
</body>
</html>