-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLKG.html
More file actions
110 lines (103 loc) · 3.56 KB
/
LKG.html
File metadata and controls
110 lines (103 loc) · 3.56 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
101
102
103
104
105
106
107
108
109
110
<!DOCTYPE html>
<html lang="it">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>LinKeyGenerator</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 20px;
background-color: #f8f9fa;
color: #333;
}
h1 {
margin-top: 0;
text-align: center;
color: #007bff;
}
.container {
max-width: 500px;
margin: 0 auto;
background-color: #fff;
border-radius: 10px;
padding: 20px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
overflow: auto; /* Aggiunto overflow per gestire il flusso del contenuto */
}
input[type="text"] {
padding: 8px;
font-size: 16px;
border-radius: 5px;
border: 1px solid #ccc;
width: calc(100% - 22px);
margin-bottom: 10px;
}
button {
padding: 10px 20px;
font-size: 16px;
border-radius: 5px;
border: none;
background-color: #007bff;
color: #fff;
cursor: pointer;
margin-top: 10px;
width: 100%;
display: block;
}
button:hover {
background-color: #0056b3;
}
p {
font-size: 16px;
margin-top: 10px;
}
.warning {
background-color: #ffcccb;
color: #721c24;
padding: 10px;
border-radius: 5px;
margin-top: 20px;
text-align: center;
}
</style>
</head>
<body>
<div class="container">
<h1>LinKeyGenerator</h1>
<h2>Inserisci il link qui:</h2>
<input type="text" id="linkInput" placeholder="Inserisci il link...">
<button onclick="aggiungiKey()">Aggiungi Key</button>
<h2>Link con Key:</h2>
<p id="linkConKey"></p>
<button onclick="downloadM3U()">Download M3U</button>
</div>
<div class="warning">
Attenzione: Questa pagina funziona solo con i link di streaming community.
</div>
<script>
function aggiungiKey() {
var linkInput = document.getElementById("linkInput").value;
var linkConKey = linkInput + "&key=https://vixcloud.co/storage/enc.key";
document.getElementById("linkConKey").innerHTML = '<a href="' + linkConKey + '">' + linkConKey + '</a>';
}
function downloadM3U() {
const linkInput = document.getElementById("linkInput").value;
const key = "https://vixcloud.co/storage/enc.key";
const fileName = extractFileName(linkInput);
const m3uContent = `#EXT-X-KEY:METHOD=AES-128,URI="${key}",IV=0x43A6D967D5C17290D98322F5C8F6660B\n${linkInput}&key=${key}`;
const blob = new Blob([m3uContent], { type: "text/plain" });
const linkElement = document.createElement("a");
linkElement.href = URL.createObjectURL(blob);
linkElement.download = `${fileName}.m3u`;
linkElement.click();
}
function extractFileName(url) {
const pathArray = url.split('/');
const lastSegment = pathArray[pathArray.length - 1];
const fileName = lastSegment.split('?')[0]; // Rimuove eventuali parametri GET
return fileName;
}
</script>
</body>
</html>